MARS: Multi-hop Adaptive Retrieval and SPARQL Generation for KGQA
Listen
Radio episode about this paper
Transcript
Introduction to the show: ident: AI Radio. Generated commentary on the latest Artificial Intelligence papers.
Tom: We're looking at the paper: "MARS: Multi-hop Adaptive Retrieval and SPARQL Generation for KGQA".
Jane: Here's the gist of the paper. The gist: MARS proposes a scalable knowledge graph question answering (KGQA) approach that uses pattern-based graph retrieval and iterative context enrichment to generate SPARQL queries without requiring model fine-tuning.
Tom: Problem and Motivation Large language models (LLMs) have strong reasoning performance but tend to hallucinate, which limits their reliability in knowledge-intensive tasks requiring up-to-date and grounded information While retrieval-augmented generation (RAG) mitigates these challenges through external grounding, text-based RAG systems exhibit limitations with complex multi-hop reasoning as relational structure is only implicitly represented in textual contexts.
Jane: Fact-retrieval approaches become inefficient when query-relevant subgraphs exceed the LLM’s context window.
Tom: Furthermore, agent-oriented approaches are vulnerable to inconsistent behavior due to their heavy reliance on LLMs, leading to hallucination at each step.
Paper summary: Jane: So, looking at the whole picture of MARS and its authors Nikit Srivastava and his team at DICE University, what is their main message here?
Tom: The paper argues that a fixed pipeline approach can actually be more effective than an agent that tries to select tools dynamically at runtime when you are dealing with multi-hop questions.
Lu: They demonstrate this by showing how MARS uses pattern-based graph retrieval and iteratively incorporates next-hop facts into the LLM reasoning instead of letting the model explore randomly.
Meng: It means for us, it suggests that we might be able to use these explicit pipeline structures to get better results on complex, aggregation-heavy queries without needing to rely on heavy fine-tuning of text-to-SPARQL models.
Jane: And they show this works across ten languages, including four low-resource ones, which really shows the power of their multilingual setup for KGQA.
Tom: The authors also highlight that their system achieves the best F1 scores on QALD-nine-plus and LCQuAD2 point 0 datasets, splitting per-language wins with GRASP as a baseline <ref:2607.14561#pg1>.
Lu: They also point out some limitations they found, like issues where the model might return underlying numeric or entity evidence instead of just a yes or no answer, and difficulty consistently projecting facts through count operations.
Meng: So it’s not perfect yet; there are still specific types of errors they found when it comes to outputting certain kinds of facts.
Jane: But overall, the paper suggests that for reliability in knowledge-intensive tasks, building a structured retrieval and reasoning pipeline is a strong and efficient approach compared to fully agentic systems.
Conclusion: Tom: So, MARS is this new approach for knowledge graph question answering that doesn't need you to fine-tune any models at all.
Jane: It’s about a system, MARS, that uses a fixed pipeline instead of an open agent trying to figure things out step by step.
Lu: The authors are focusing on using structured retrieval and iterative context enrichment to generate the final SPARQL query without needing model fine-tuning.
Meng: From an engineering standpoint, it’s interesting because they aren't relying on the LLM to dynamically decide which tool to use at every single hop.
Tom: I like that predictability. It sounds less prone to those big hallucinations we see when agents wander off track in complex reasoning tasks.
Jane: Exactly, and they show it works on three different knowledge graph question answering benchmarks using several large language models across multiple languages too.
Lu: The core idea is linking entities from the natural language question directly to the knowledge graph using entity linking, then retrieving relevant patterns iteratively until the query is grounded.
Meng: So it’s like they have a set of predefined search paths they can follow instead of just letting the AI guess where to go next.
Tom: They mention performance on QALD-ten where over twenty-nine percent of the queries require multiple hops, and MARS does well there.
Jane: That tells us that for those really complex questions with many steps, this structured retrieval method keeps the results consistent across different languages too.
Lu: The authors found it competitive with state-of-the-art methods while still being efficient and scalable, which is important for deploying these kinds of systems in the real world.
Meng: But they did find some limitations, like sometimes it returns raw numeric evidence instead of a simple yes or no answer for certain types of questions.
Tom: Yeah, those specific output errors are always something you have to watch out for when you deploy something like this in production.
Jane: So while it’s powerful for multi-hop tasks and works without fine-tuning, the authors are still working on fixing those kinds of specific factual accuracy issues.
Lu: The implication is that a planning-oriented pipeline might offer more reliable generalization for complex questions than agents that pick tools dynamically at runtime.
Tom: So it’s about building this explicit structure instead of just hoping the AI explores the right path by accident.
Jane: And this points toward a future where we might see these structured retrieval methods becoming a standard way to ground LLMs in knowledge graphs for more reliable answers.
Nikit Srivastava, Daniel Vollmers, René Speck, Nikolaos Karalis, Hamada M. Zahera, Axel-Cyrille Ngonga Ngomo
Data Science Group (DICE) · Heinz Nixdorf Institute · Department of Computer Science, Paderborn University
cs.CL
Submitted: 2026-07-16
Updated: 2026-10-21
Comments: EKAW 2026 (https://ekaw2026.di.unito.it/accepted-contributions/papers)
DOI: 10.1007/978-3-032-41614-8_9
Code: https://github.com/dice-group/mars-kgqa
License: http://creativecommons.org/licenses/by/4.0/
Importance score: 90/100
The gist: The gist: MARS proposes a scalable knowledge graph question answering (KGQA) approach that uses pattern-based graph retrieval and iterative context enrichment to generate SPARQL queries without
Key concepts
- Knowledge Graph Question Answering (KGQA)
- This involves using a structured database called a Knowledge Graph (KG), which stores facts about entities and their relationships. KGQA systems aim to answer natural language questions by traversing this graph to find the specific connections needed to provide an accurate, grounded answer.
- Pattern-based Graph Retrieval
- Instead of letting an LLM explore freely, MARS uses pre-defined patterns (like subject-predicate triples) derived from the question. It converts these patterns into dense vectors and ranks them by semantic similarity to find the most relevant initial facts in the Knowledge Graph.
- Iterative Context Enrichment
- MARS performs a loop where it retrieves initial graph information, enriches that context using LLMs, and then decides whether to continue searching for more related patterns or generate the final SPARQL query. This adaptive process ensures the retrieval depth matches the complexity of the original question.
- SPARQL Generation
- The goal of the system is not just to retrieve data but to construct a formal SPARQL query—a specific language used to query structured data in KGs. MARS iteratively refines this query based on retrieved facts, ensuring the final output is a precise, executable command for querying the graph.
Terminology
Summary
The gist: MARS proposes a scalable knowledge graph question answering (KGQA) approach that uses pattern-based graph retrieval and iterative context enrichment to generate SPARQL queries without requiring model fine-tuning.
Problem and Motivation
Large language models (LLMs) have strong reasoning performance but tend to hallucinate, which limits their reliability in knowledge-intensive tasks requiring up-to-date and grounded information While retrieval-augmented generation (RAG) mitigates these challenges through external grounding, text-based RAG systems exhibit limitations with complex multi-hop reasoning as relational structure is only implicitly represented in textual contexts. Fact-retrieval approaches become inefficient when query-relevant subgraphs exceed the LLM’s context window. Furthermore, agent-oriented approaches are vulnerable to inconsistent behavior due to their heavy reliance on LLMs, leading to hallucination at each step.
MARS Approach Overview
MARS is a SPARQL-based KGQA approach that combines pattern-based graph retrieval with context-augmented knowledge for knowledge-driven reasoning without requiring fine-tuning. The system employs a three-stage pipeline: entity extraction, pattern extraction, and a final stage that either generates the output query or expands the context. The iterative reasoning loop continues until the query is fully grounded, at which point the final SPARQL query is generated.
Key Pipeline Steps
The MARS pipeline involves several critical steps for multi-hop reasoning:
** Entity Linking and Text Augmentation:**
-
The system first identifies entities E from the natural language question qtext that exist within the Knowledge Graph G using an entity linking pipeline based on GRASP.
-
A text augmentation strategy utilizes an instruction-tuned LLM to generate qaugtext, which enriches the query context by incorporating predicted entity type labels.
-
A multilingual LLM is employed for translation to support non-English queries in both entity extraction and text augmentation steps.
Pattern Retrieval and Filtering:
-
The aim of this step is to retrieve a set of patterns (triple patterns) to extract first-hop information from G about the extracted entities E.
-
Patterns are defined as P = (s, p,) s ∈ E,(s, p, o) ∈ G ∪ (, p, o) o ∈ E,(s, p, o) ∈ G.
-
Verbalized patterns VP are generated by concatenating the label of the subject (s), predicate (p), and a placeholder variable
?object
or?subject
. -
These verbalized patterns are converted into d-dimensional dense embedding vectors ΦP = ϕ(v)v ∈ VP and the text embedding ϕ(qtext).
-
The patterns are ranked by their semantic similarity, SP = SemanticSimilarity(ΦP, ϕ(qtext)).
-
The top-N patterns with topn ∈ N+ are selected to form Ptop.
Enrichment and Multi-Hop Reasoning:
-
Features critical for pattern understanding are extracted, including Pattern Instances (Ip), Typological Information t(p), and Enriched Verbalization V enriched Ptop.
-
The enriched verbalization is passed to a SPARQL Reasoner (an LLM) which determines whether it has sufficient context to generate the final SPARQL query qsparql or selects specific patterns Psel for expansion.
-
If a new set of patterns Pnext is extracted, the process repeats by adding these new patterns to Ptop and re-attempting SPARQL query generation until a SPARQL query is successfully generated or a pre-defined multi-hop limit (mhop) is reached.
Experimental Evaluation
MARS was evaluated on three benchmark datasets: LCQuAD2.0, QALD-9-plus, and QALD-10. The results show that MARS achieves state-of-the-art performance on the KGQA task without fine-tuning, consistently outperforming robust baselines. Notably, on the highly complex QALD-10 benchmark, with over 29% of the queries requiring multiple hops, MARS outperforms agentic alternatives across all evaluated languages.
Conclusion and Limitations
MARS demonstrates that a fixed pipeline can be more effective than an agent that selects tools dynamically at runtime in multi-hop question settings. The limitations identified include issues with output errors such as returning underlying numeric or entity evidence instead of a yes/no answer, and the inability to consistently project facts through COUNT for how many X
questions. The work is built on open-weight LLMs and the code is publicly available to support reproducibility. The authors also address benchmark version drift by releasing the underlying Wikidata snapshot alongside updated datasets to ensure fair comparison. The evaluation was restricted to Wikidatabased benchmarks, and extending MARS to other KGs is identified as future work. The paper concludes that fixed, planning-oriented pipelines may offer stronger generalization in multi-hop questions setting than finetuned text-to-SPARQL models or agents that select tools at runtime. The system achieves the best F1 on all four languages in the QALD-10 dataset, outperforming every baseline, including GRASP. The advantage of MARS is most evident on multi-hop and aggregation-heavy queries, consistent with our use of an explicit pipeline rather than a tool-using agent. The final configuration adopted GPT-OSS with topn=20, mhop=10, and all features enabled. The system achieves the best F1 on QALD-9-plus and LCQuAD2.0, splitting per-language wins with GRASP. The advantage of MARS is most evident on multi-hop and aggregation-heavy queries, consistent with our use of an explicit pipeline rather than a tool-using agent. The final configuration adopted GPT-OSS with topn=20, mhop=10, and all features enabled. The system achieves the best F1 on QALD-9-plus and LCQuAD2.0, splitting per-language wins with GRASP. The advantage of MARS is most evident on multi-hop and aggregation-heavy queries, consistent with our use of an explicit pipeline rather than a tool-using agent. The final configuration adopted GPT-OSS with topn=20, mhop=10, and all features enabled. The system achieves the best F1 on QALD-9-plus and LCQuAD2.0, splitting per-language wins with GRASP. The advantage of MARS is most evident on multi-hop and aggregation-heavy queries, consistent with our use of an explicit pipeline rather than a tool-using agent. The final configuration adopted GPT-OSS with topn=20, mhop=10, and all features enabled. The system achieves the best F1 on QALD-9-plus and LCQuAD2.0, splitting per-language wins with GRASP. The advantage of MARS is most evident on multi-hop and aggregation-heavy queries, consistent with our use of an explicit pipeline rather than a tool-using agent. The final configuration adopted GPT-OSS with topn=20, mhop=10, and all features enabled <ref:2607.
Improvements for AI systems
-
Adaptive retrieval depth control: The system can adapt its retrieval strategy by deciding
whether to continue graph traversal or to generate the final SPARQL query
at each step, allowing it toadapt the retrieval depth to the question.
-
Pattern-based context constraint: MARS constrains retrieved context by
filtering and ranking triple patterns rather than operating directly on subgraphs or raw triples,
which reduces context retrieval from a potentially massive graph space. -
Contextual augmentation for grounding: The system incorporates schema information into the verbalization function V enriched Ptop, which includes
typological information
like domain and range, enhancing the LLM's capacity for SPARQL generation by providingKG-grounded context.
-
Iterative next-hop enrichment: The pipeline uses a loop where retrieved resources enrich context, and the
pattern extraction stage is re-invoked to capture next-hop information,
ensuring thatgraph alignment [is] maintained throughout the multi-hop generation process.
-
Multilingual query handling: The system supports multilingual input by employing a
hybrid multilingual setup that uses translation alongside the native question,
allowing it to preserve theoriginal structure for semantic pattern matching while simultaneously leveraging the advantages of machine translation.
-
Robust reasoning via verification: A final step, SPARQL Verification, allows the system to perform a
Second pass verifying and updating the generated SPARQL,
which addresses issues likemissing ASK and COUNT projections
by identifying and correcting systematic errors. -
Efficiency through sparse selection: By selecting only the top-N patterns (e.g., topn=20 instead of 100), MARS keeps
test-time inference cost bounded,
providing a balance between performance gain and computational tractability for large KGs.
Abstract
Large language models (LLMs) have demonstrated strong reasoning performance, but their tendency to hallucinate limits their reliability in knowledge-intensive tasks requiring up-to-date and grounded information. Combining knowledge graphs (KGs) with LLMs facilitates the use of explicit symbolic knowledge that can be continuously updated without costly fine-tuning, while benefiting from rapidly advancing LLM reasoning. We propose MARS, a scalable knowledge graph question answering (KGQA) approach that requires no model fine-tuning. Rather than relying on open-ended agentic exploration, MARS performs a structured retrieval procedure that links question entities to the KG and iteratively retrieves relevant next-hop information. At each step, MARS decides whether to continue graph traversal or to generate the final SPARQL query, allowing the model to adapt the retrieval depth to the question while keeping the overall pipeline more predictable than fully agentic approaches. We evaluate MARS on three established KGQA benchmarks across several LLMs and settings, including multilingual evaluation, and provide insights through ablation studies and error analysis. Our approach achieves competitive performance relative to state-of-the-art methods while remaining efficient and scalable. The evaluation results, code and resources are publicly available: https://github.com/dice-group/mars-kgqa.
Sources
- Gemini 2.5: Pushing the Frontier with Advanced Reasoning, Multimodality, Long Context, and Next Generation Agentic Capabilities
- Language models show human-like content effects on reasoning tasks
- DeepSeek-R1: Incentivizing Reasoning Capability in LLMs via Reinforcement Learning
- The Llama 3 Herd of Models
- Mistral 7B
- Implicit Reasoning in Large Language Models: A Comprehensive Survey
- Large Language Model Agent: A Survey on Methodology, Applications and Challenges
- Training Sparse Mixture Of Experts Text Embedding Models
- gpt-oss-120b & gpt-oss-20b Model Card
- Training language models to follow instructions with human feedback
- Text-to-SPARQL Goes Beyond English: Multilingual Question Answering Over Knowledge Graphs through Human-Inspired Reasoning
- MST5 -- Multilingual Question Answering over Knowledge Graphs
- GLM-4.5: Agentic, Reasoning, and Coding (ARC) Foundation Models
- Gemma 3 Technical Report
- Emergent Abilities of Large Language Models
- From Graph Retrieval to Schema Realization: Counterfactual Validation for Text-to-SPARQL over Heterogeneous Knowledge Graphs
Related papers
- Exploring Solution Divergence and Its Effect on Large Language Model Problem Solving
- Ishigaki-IDS-Bench: A Benchmark for Generating Information Delivery Specification from BIM Information Requirements
- Subliminal Steering: Stronger Encoding of Hidden Signals
- MedStruct-S: A Benchmark for Key Discovery, Key-Conditioned QA and Semi-Structured Extraction from OCR Clinical Reports
- The End of Transformers? On Challenging Attention and the Rise of Sub-Quadratic Architectures
- Untangling the Mechanisms of Misleading Context in Medical Question Answering