Learning to Refine: An Agentic RL Approach for Iterative SPARQL Query Construction
On the map: LLM agents and tool use → Web, search, and research agents
Abstract (arXiv)
Generating complex, logically-sound SPARQL queries for multi-hop questions remains a critical bottleneck for Knowledge Graph Question Answering, as the brittle nature of one-shot generation by Large Language Models (LLMs) hinders reliable interaction with structured data. Current methods lack the adaptive policies needed to dynamically debug queries based on real-time execution feedback. This paper introduces a novel agentic framework where an LLM learns a resilient policy for the sequential process of iterative SPARQL construction. We show that a compact 3B-parameter model, trained exclusively via outcome-driven Reinforcement Learning (GRPO) without supervised fine-tuning, can learn effective policies for this task, discovering how to systematically recover from execution errors and refine its queries toward a correct answer. On a curated, executable single-answer subset of LC-QuAD 2.0, our agent achieves 49.7% accuracy post-entity-linking, a significant 17.5 percentage point improvement over the strongest iterative zero-shot baseline. Further analysis reveals that while the agent's capability is driven by RL, its performance is enhanced by an explicit deliberative reasoning step that acts as a cognitive scaffold to improve policy precision. This work presents a generalizable blueprint for teaching agents to master formal, symbolic tools through interaction, bridging the gap between probabilistic LLMs and the structured world of Knowledge Graphs.
Key facts. Cited by 2 papers in the map (data through 14 Oct 2026). Placed in Web, search, and research agents, one of 16 directions in LLM agents and tool use. Builds on 18 of its 35 references that are in the map. First posted on arXiv 14 Nov 2025.
Builds on
18 of 35 references.
References · 18
- 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,459
- 2024DeepSeekMath: Pushing the Limits of Mathematical Reasoning in Open Language Modelscited by 9,379
- 2022ReAct: Synergizing Reasoning and Acting in Language Modelscited by 8,695
- 2022Self-Consistency Improves Chain of Thought Reasoning in Language Modelscited by 5,708
- 2023Tree of Thoughts: Deliberate Problem Solving with Large Language Modelscited by 3,211
- 2022Scaling Instruction-Finetuned Language Modelscited by 3,024
- 2024Scaling LLM Test-Time Compute Optimally can be More Effective than Scaling Model Parameterscited by 1,986
- 2023Unifying Large Language Models and Knowledge Graphs: A Roadmapcited by 668
- 2020Knowledge Graphscited by 621
- 2023StructGPT: A General Framework for Large Language Model to Reason over Structured Datacited by 343
- 2019KagNet: Knowledge-Aware Graph Networks for Commonsense Reasoningcited by 216
- 2019PullNet: Open Domain Question Answering with Iterative Retrieval on Knowledge Bases and Textcited by 184
6 more
- 2020Beyond I.I.D.: Three Levels of Generalization for Question Answering on Knowledge Basescited by 171
- 2017Variational Reasoning for Question Answering with Knowledge Graphcited by 170
- 2018Open Domain Question Answering Using Early Fusion of Knowledge Bases and Textcited by 168
- 2025Agentic Reasoning and Tool Integration for LLMs via Reinforcement Learningcited by 110
- 2025SQL-R1: Training Natural Language to SQL Reasoning Model By Reinforcement Learningcited by 68
- 2024Multi-hop Question Answering over Knowledge Graphs using Large Language Modelscited by 6
Built on by
Citing papers per year: 2026: 2.
2 papers.
Similar, not cited
Close in wording, no citation either way
- 2026Towards Researcher Agents for Knowledge-Graph Question Answering
- 2026Agentic-R: Learning to Retrieve for Agentic Search
- 2025Efficient and Transferable Agentic Knowledge Graph RAG via Reinforcement Learning
- 2026GAPD: Gold-Action Policy Distillation for Agentic Reinforcement Learning in Knowledge Base Question Answering
- 2026MARS: Multi-hop Adaptive Retrieval and SPARQL Generation for KGQA
- 2026KGVoyager: Knowledge Graph Agnostic Question Answering via Agentic Navigation
- 2026GraphWalker: Agentic Knowledge Graph Question Answering via Synthetic Trajectory Curriculum
- 2023ReST meets ReAct: Self-Improvement for Multi-Step Reasoning LLM Agent