mlsanityData to 14 Oct 2026

ReToolSQL: Agentic Reinforcement Learning for Robust Text-to-SQL

arXiv 2608.27796 ↗First posted 28 Aug 2026cs.AIcited by 0

On the map: LLM agents and tool use → Web, search, and research agents

Abstract (arXiv)

Recent work has shown that reinforcement learning from execution feedback can substantially improve text-to-SQL performance, often enabling smaller models to match or exceed much larger systems. However, most existing approaches treat SQL generation as a single-turn task, limiting the model's ability to recover from errors through iterative refinement. We present ReToolSQL, a two-stage training framework for text-to-SQL that combines (i) a supervised warm-start on rejection-sampled reasoning traces with (ii) agentic reinforcement fine-tuning (RFT) over multi-turn tool-use trajectories. The key insight is that the two stages act on complementary axes, the supervised fine-tuning (SFT) on verified privileged-teacher traces expands the set of solvable questions (raising pass@k coverage on the hardest cases), while RFT converts that expanded capability into higher single-pass accuracy by teaching the model when to verify, what evidence to retrieve, and how to repair faulty SQL from execution feedback. Applied to Gemma 4 instruction-tuned (31B), RFT alone achieves 73.66% execution accuracy (EX) on the BIRD-SQL development benchmark (74.12% EX with self-consistency). Initializing RFT from the SFT checkpoint (SFT→RFT) yields our strongest model at 74.32% EX single-pass and 74.77% EX with self-consistency. At the time of writing, this ranked first on the BIRD single-model development-set leaderboard. The approach uses composite rewards anchored on execution correctness, requires no human annotation beyond the benchmark itself, and operates within a single dense 31B model, showing that a properly designed SFT→RFT pipeline over tool-use trajectories is a practical path toward robust enterprise-grade text-to-SQL.

Key facts. No citing papers in the map yet (data through 14 Oct 2026). Placed in Web, search, and research agents, one of 16 directions in LLM agents and tool use. Builds on 16 of its 21 references that are in the map. First posted on arXiv 28 Aug 2026.

Builds on

16 of 21 references.

Closest ancestors · 1

Same direction, newest first

  1. 2026AgentNLQ: A General-Purpose Agent for Natural Language to SQL18 May

Other references · 15

  1. 2024DeepSeekMath: Pushing the Limits of Mathematical Reasoning in Open Language Modelscited by 9,379
  2. 2022ReAct: Synergizing Reasoning and Acting in Language Modelscited by 8,695
  3. 2025DeepSeek-R1: Incentivizing Reasoning Capability in LLMs via Reinforcement Learningcited by 6,330
  4. 2022Self-Consistency Improves Chain of Thought Reasoning in Language Modelscited by 5,708
  5. 2025DAPO: An Open-Source LLM Reinforcement Learning System at Scalecited by 2,810
  6. 2018Spider: A Large-Scale Human-Labeled Dataset for Complex and Cross-Domain Semantic Parsing and Text-to-SQL Taskcited by 1,139
  7. 2023Can LLM Already Serve as A Database Interface? A BIg Bench for Large-Scale Database Grounded Text-to-SQLscited by 688
  8. 2025The Entropy Mechanism of Reinforcement Learning for Reasoning Language Modelscited by 485
  9. 2023DIN-SQL: Decomposed In-Context Learning of Text-to-SQL with Self-Correctioncited by 477
  10. 2025ReTool: Reinforcement Learning for Strategic Tool Use in LLMscited by 392
  11. 2023FireAct: Toward Language Agent Fine-tuningcited by 256
  12. 2024CHESS: Contextual Harnessing for Efficient SQL Synthesiscited by 169
3 more
  1. 2024CHASE-SQL: Multi-Path Reasoning and Preference Optimized Candidate Selection in Text-to-SQLcited by 138
  2. 2025XiYan-SQL: A Novel Multi-Generator Framework For Text-to-SQLcited by 40
  3. 2025Agentar-Scale-SQL: Advancing Text-to-SQL through Orchestrated Test-Time Scalingcited by 24

Built on by

Not cited yet.

Similar, not cited

Close in wording, no citation either way

  1. 2026SERL-SQL: Selective Hindsight Distillation for Text-to-SQL Reinforcement Agentic Learning
  2. 2026SQL-Trail: Multi-Turn Reinforcement Learning with Interleaved Feedback for Text-to-SQL
  3. 2026DualSQL: Text-to-SQL with Multi-Agent Reinforcement Learning
  4. 2025MARS-SQL: A multi-agent reinforcement learning framework for Text-to-SQL
  5. 2025ReEx-SQL: Reasoning with Execution-Aware Reinforcement Learning for Text-to-SQL
  6. 2025Reasoning-SQL: Reinforcement Learning with SQL Tailored Partial Rewards for Reasoning-Enhanced Text-to-SQL
  7. 2025Arctic-Text2SQL-R1: Simple Rewards, Strong Reasoning in Text-to-SQL
  8. 2026Progress-SQL: Improving Reinforcement Learning for Text-to-SQL via Progressive Rewards