Giorgos Anagnostou, Dimitrios Doumanas, Konstantinos Kotis
Large Language Models (LLMs) are increasingly being integrated into knowledge-based applications, leveraging their language understanding capabilities to construct and interact with Knowledge Graphs (KGs) in meaningful ways. However, effective utilization of LLMs in knowledge-based applications requires more than just language processing; it requires an approach that enables structured/linked data handling, semantic querying, and interaction. This paper presents a novel approach that utilizes LLMs with Retrieval-Augmented Generation (RAG) and AI agents to support the development of KG-based semantic applications. Specifically, the approach is implemented with a custom framework, namely LLM4KGen, and the use of LangChain and LangGraph frameworks, implemented specifically using two versions of Gemini, 1.5 and 2.0. The first prototype implementation of the LLM4KGen framework has been evaluated within the context of a digital culture semantic application. The presented approach involves deploying specialized AI agents capable of performing targeted tasks like KG generation, semantic query handling, and framework-specific systems engineering (semi-automated code generation), enabling dynamic interactions between LLMs, developers, and knowledge engineers, within structured data environments. The proposed approach integrates LLM-generated KGs in graph databases (Neo4J) enabling semantic querying and data retrieval through AI agents. The evaluation of the presented LLM4KGen framework focuses on assessing the effectiveness of agent-based LLM interactions for KG generation and retrieval, measuring the query accuracy and efficiency of the approach.