TLDR: AGENTIC T2S is a new multi-agent AI framework designed to answer complex questions by querying across diverse and distributed knowledge graphs, particularly in the circular economy domain. It breaks down questions into subtasks handled by specialized agents for parsing, graph allocation, SPARQL query generation, and rigorous two-stage verification. This modular approach significantly improves query execution accuracy and efficiency compared to existing methods, making it a powerful tool for extracting structured insights from heterogeneous data for sustainability decision-making.
In the evolving landscape of artificial intelligence, a significant challenge lies in enabling machines to accurately answer questions by reasoning across vast and varied knowledge graphs. These knowledge graphs, often described as structured networks of information, can be heterogeneous, meaning they have different organizational schemas, incomplete data, and are spread across multiple sources. This complexity is particularly evident in domains like the circular economy, where crucial information about classifications, processes, and emissions is distributed across independently managed knowledge graphs.
Traditional approaches to converting natural language questions into machine-readable queries, specifically SPARQL (a query language for knowledge graphs), often fall short. They either require extensive, domain-specific fine-tuning or are limited to operating within a single knowledge graph, making them less adaptable to new or low-resource areas and incapable of handling queries that span multiple graphs.
Introducing AGENTIC T2S: A Collaborative Agent Framework
A groundbreaking new framework, named AGENTIC T2S, addresses these limitations head-on. It’s a modular system that breaks down the complex task of question answering over heterogeneous knowledge graphs (KGQA) into smaller, manageable subtasks. These subtasks are then handled by specialized AI agents that work collaboratively. The framework includes agents responsible for retrieving relevant information, generating the SPARQL queries, and verifying their accuracy.
A key innovation is the scheduler, which intelligently assigns subgoals to different knowledge graphs using a ‘weak-to-strong’ alignment strategy. Furthermore, a sophisticated two-stage verifier is in place to catch both structurally invalid queries and those that are semantically underspecified, ensuring high reliability through symbolic validation and counterfactual consistency checks.
Remarkable Performance and Efficiency
Experiments conducted on real-world circular economy knowledge graphs have demonstrated the significant advantages of AGENTIC T2S. The framework improved execution accuracy by an impressive 17.3% and triple-level F1 score by 25.4% compared to the best existing baselines. What’s more, it achieved these gains while remarkably reducing the average prompt length by 46.4%, showcasing its efficiency.
These results underscore the benefits of using an agent-based, schema-aware reasoning approach for scalable KGQA. By providing robust cross-graph reasoning capabilities, AGENTIC T2S can significantly support decision-making in critical sustainability domains.
Why a Multi-Agent Approach?
Large Language Models (LLMs), while powerful, can suffer from hallucinations and lack factual consistency, especially in knowledge-intensive tasks. Retrieval-Augmented Generation (RAG) helps by incorporating external information, but most RAG systems work with unstructured text, which lacks the semantic depth needed for complex, multi-hop reasoning over structured data. Existing GraphRAG methods also face challenges with large subgraph embeddings, weak retrievers, and monolithic single-agent pipelines that reduce modularity.
AGENTIC T2S tackles these issues by formulating text-to-SPARQL generation over heterogeneous graphs as a multi-agent problem. It consists of five core agents:
-
Compositional Subgoal Parser Agent: This agent initiates the process by breaking down a natural language question into a sequence of smaller subgoals, like entity lookups or condition filtering. It uses a rule-based strategy combined with domain-specific insights and can even prompt the user for clarification if a query is ambiguous.
-
Hierarchical Alignment Allocator Agent: Once subgoals are identified, this agent assigns them to the most relevant knowledge graph. It uses a two-stage retrieval process: a coarse-grained search over embedded metadata and a fine-grained schema-level alignment to ensure compatibility with the graph’s structure.
-
Pattern-Driven SPARQL Synthesizer Agent: This agent is responsible for generating the actual SPARQL queries. It selects query templates, refines them with ontology-level constraints, and includes a crucial ‘post-hoc decoding’ stage that acts as a model-agnostic validation layer, enforcing structural and semantic correctness and applying targeted corrections.
-
Dual-Stage Consistency Checker Agent: Before any query is executed, this agent performs a rigorous two-stage verification. The first stage involves symbolic validation for syntactic correctness and schema compatibility. The second stage uses counterfactual testing, systematically perturbing query components to ensure semantic specificity and prevent overly general or underspecified queries.
-
Multi-Graph Consensus Aggregator Agent: Finally, this agent consolidates the partial results obtained from different knowledge graphs. It performs entity alignment to resolve redundancies and then uses an LLM to generate a unified, natural language response, ensuring consistency across diverse sources.
The modular design of AGENTIC T2S allows for parallel processing, enhances interpretability, and makes error isolation much easier. This separation of concerns—retrieval, generation, and verification—improves the system’s adaptability across different domains.
Also Read:
- Dynamic Knowledge Retrieval: T-GRAG for Time-Sensitive AI Answers
- BIODISCO: An AI System for Generating and Refining Biomedical Hypotheses
Real-World Impact for the Circular Economy
The framework was rigorously evaluated using three in-house curated RDF knowledge graphs related to industrial resource exchanges in the circular economy: German-IS, EU-Pilot, and Waste-Ledger. These datasets vary in schema complexity and coverage, providing a robust testing ground.
The results consistently showed AGENTIC T2S outperforming various baselines, including vanilla LLMs, reasoning-augmented LLMs, and general-purpose agent frameworks. Its ability to correctly allocate subgoals to the right knowledge graphs was also significantly higher, directly impacting its overall accuracy.
The ablation study, which involved removing individual components of AGENTIC T2S, further confirmed the critical role of each agent, particularly the subgoal decomposer, allocator, and verifier, in achieving accurate and robust SPARQL generation.
In conclusion, AGENTIC T2S represents a significant leap forward in text-to-SPARQL generation over heterogeneous knowledge graphs. Its multi-agent architecture, combining grammar-constrained decoding with post-hoc repair and robust verification, ensures high query executability and scalability. Beyond its technical prowess, AGENTIC T2S offers a practical tool for stakeholders in the circular economy—such as policy analysts, sustainability officers, and industrial planners—to answer complex questions about resource reuse, emissions trade-offs, and regulatory alignment by extracting structured insights from fragmented datasets. For more details, you can read the full research paper here.


