OASA-KGQA: Ontology-Aware Semantic Agent for Knowledge Graph Question Answering
In order to enable natural language interaction with structured knowledge bases based on ontologies, widely used to represent knowledge in multiple complex domains, Knowledge Graph Question Answering (KGQA) systems are required. Large Language Models (LLMs) can play a pivotal role in this context, however they suffer from factual inaccuracies, hallucinations, and difficulties in navigating complex semantic schemas. To address these limitations, this paper proposes a novel neuro-symbolic Agentic AI framework for KGQA on real-world knowledge graph. By integrating neural reasoning capabilities of LLMs with symbolic tools within a recursive flow orchestrated by LangGraph, the system is able to identify relevant terms, validate them based on specific ontology, and generate SPARQL queries for data retrieval. To demonstrate effectiveness of this approach an experimental evaluation using a real-world smart city knowledge base, implemented in the Snap4City platform, is carried out. Results indicate that the neuro-symbolic workflows improves the accuracy of information retrieval for non-expert users compared to standalone LLM solutions.