Structured agentic retrieval over knowledge graphs with MCP and query containers

Fassio, Simone; Gosmar, Dario; Wei, Fanfu; Ehrhart, Thibault; Lisena, Pasquale; Troncy, Raphaël
ISWC 2026, 3rd International Workshop on Retrieval-Augmented Generation Enabled by Knowledge Graphs (RAGE-KG), 25-26 October 2026, Bari, Italy

Integrating Large Language Models (LLMs) with Knowledge Graphs (KGs) remains challenging due to the difficulty of translating natural language questions into valid and semantically grounded graph-based queries. Free-form SPARQL generation is particularly prone to hallucinations and errors when operating over complex and domain-specific schemas. In this paper, we propose a framework for structured agentic retrieval over KGs based on the Model Context Protocol (MCP). Our approach replaces unconstrained generation with a tool-driven workflow in which queries are incrementally constructed through low-granularity operations. Central to this design is the Query Container, a stateful abstraction that maintains a consistent query state and enforces structural validity throughout the process. We further introduce a hybrid decision mechanism combining constrained tool usage with model-guided selection via micro-sampling, coupled with execution-based validation. Experimental results show improved robustness and a reduction in hallucination-related errors compared to standard generation approaches.


Type:
Conférence
City:
Bari
Date:
2026-10-25
Department:
Data Science
Eurecom Ref:
8936
Copyright:
© Springer. Personal use of this material is permitted. The definitive version of this paper was published in ISWC 2026, 3rd International Workshop on Retrieval-Augmented Generation Enabled by Knowledge Graphs (RAGE-KG), 25-26 October 2026, Bari, Italy and is available at :

PERMALINK : https://www.eurecom.fr/publication/8936