mlsanityData to 7 Oct 2026

Think2SQL: Reinforce LLM Reasoning Capabilities for Text2SQL

arXiv 2504.15077 ↗First posted 21 Apr 2025cs.LG cs.DBcited by 14

On the map: LLM reasoning → Knowledge- and tool-augmented reasoning

Abstract (arXiv)

Large Language Models (LLMs) can translate natural language into SQL, but small models struggle with multi-table and complex queries in Zero-Shot Learning (ZSL) settings. While Supervised Fine-Tuning (SFT) helps, it falls short for harder cases. To address this, we study how different reasoning strategies (general-purpose reasoning in ZSL, reasoning traces in SFT, and Reinforcement Learning with Verifiable Reward (RLVR) with novel reward functions) affect Text2SQL performance across four benchmarks. We show that partial scoring rewards, computed via SQL execution, are crucial for guiding models even when outputs are not fully correct. These fine-grained signals lead to consistently better Text2SQL outcomes. Small LLMs benefit most from reasoning-aware SFT and RL, with the 14B Qwen-Coder-2.5 surpassing 400B+ models on challenging datasets like BIRD.

Key facts. Cited by 14 papers in the map (data through 7 Oct 2026). Placed in Knowledge- and tool-augmented reasoning, one of 17 directions in LLM reasoning. Builds on 49 of its 74 references that are in the map. First posted on arXiv 21 Apr 2025.

Builds on

49 of 74 references.

Closest ancestors · 3

Same direction, newest first

  1. 2025Reasoning-SQL: Reinforcement Learning with SQL Tailored Partial Rewards for Reasoning-Enhanced Text-to-SQL29 Mar
  2. 2025ExCoT: Optimizing Reasoning for Text-to-SQL with Execution Feedback25 Mar
  3. 2023ACT-SQL: In-Context Learning for Text-to-SQL with Automatically-Generated Chain-of-Thought26 Oct

Other references · 46

  1. 2022Training language models to follow instructions with human feedbackcited by 15,712
  2. 2017Proximal Policy Optimization Algorithmscited by 14,441
  3. 2024The Llama 3 Herd of Modelscited by 14,192
  4. 2024DeepSeekMath: Pushing the Limits of Mathematical Reasoning in Open Language Modelscited by 8,851
  5. 2023Efficient Memory Management for Large Language Model Serving with PagedAttentioncited by 5,767
  6. 2021Finetuned Language Models Are Zero-Shot Learnerscited by 3,747
  7. 2022FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awarenesscited by 3,611
  8. 2022Self-Instruct: Aligning Language Models with Self-Generated Instructionscited by 2,674
  9. 2025s1: Simple test-time scalingcited by 1,311
  10. 2023A Survey on Evaluation of Large Language Modelscited by 1,227
  11. 2025Kimi k1.5: Scaling Reinforcement Learning with LLMscited by 1,193
  12. 2024Qwen2.5-Coder Technical Reportcited by 1,151
34 more
  1. 2018Spider: A Large-Scale Human-Labeled Dataset for Complex and Cross-Domain Semantic Parsing and Text-to-SQL Taskcited by 1,120
  2. 2022Scaling Laws for Reward Model Overoptimizationcited by 1,056
  3. 2024Tulu 3: Pushing Frontiers in Open Language Model Post-Trainingcited by 988
  4. 2023Teaching Large Language Models to Self-Debugcited by 963
  5. 2017Seq2SQL: Generating Structured Queries from Natural Language using Reinforcement Learningcited by 679
  6. 2023Can LLM Already Serve as A Database Interface? A BIg Bench for Large-Scale Database Grounded Text-to-SQLscited by 667
  7. 2023DIN-SQL: Decomposed In-Context Learning of Text-to-SQL with Self-Correctioncited by 465
  8. 2019RAT-SQL: Relation-Aware Schema Encoding and Linking for Text-to-SQL Parserscited by 420
  9. 2023Text-to-SQL Empowered by Large Language Models: A Benchmark Evaluationcited by 378
  10. 2025Cognitive Behaviors that Enable Self-Improving Reasoners, or, Four Habits of Highly Effective STaRscited by 373
  11. 2020Curriculum Learning for Reinforcement Learning Domains: A Framework and Surveycited by 350
  12. 2022CodeRL: Mastering Code Generation through Pretrained Models and Deep Reinforcement Learningcited by 342
  13. 2024Spider 2.0: Evaluating Language Models on Real-World Enterprise Text-to-SQL Workflowscited by 223
  14. 2024CodeS: Towards Building Open-source Language Models for Text-to-SQLcited by 183
  15. 2024CHESS: Contextual Harnessing for Efficient SQL Synthesiscited by 164
  16. 2023MAC-SQL: A Multi-Agent Collaborative Framework for Text-to-SQLcited by 158
  17. 2024RLEF: Grounding Code LLMs in Execution Feedback with Reinforcement Learningcited by 146
  18. 2021Towards Robustness of Text-to-SQL Models against Synonym Substitutioncited by 110
  19. 2019Reward Tampering Problems and Solutions in Reinforcement Learning: A Causal Influence Diagram Perspectivecited by 107
  20. 2021KaggleDBQA: Realistic Evaluation of Text-to-SQL Parserscited by 105
  21. 2021Exploring Underexplored Limitations of Cross-Domain Text-to-SQL Generalizationcited by 92
  22. 2024The Dawn of Natural Language to SQL: Are We Fully Ready?cited by 78
  23. 2019Representing Schema Structure with Graph Neural Networks for Text-to-SQL Parsingcited by 74
  24. 2023How to Prompt LLMs for Text-to-SQL: A Study in Zero-shot, Single-domain, and Cross-domain Settingscited by 57
  25. 2024A Survey of Text-to-SQL in the Era of LLMs: Where are we, and where are we going?cited by 54
  26. 2023SQL-PaLM: Improved Large Language Model Adaptation for Text-to-SQL (extended)cited by 42
  27. 2024Instruction Tuning With Loss Over Instructionscited by 40
  28. 2024TableRAG: Million-Token Table Understanding with Language Modelscited by 40
  29. 2024BEAVER: An Enterprise Benchmark for Text-to-SQLcited by 37
  30. 2024E-SQL: Direct Schema Linking via Question Enrichment in Text-to-SQLcited by 35
  31. 2025Is Long Context All You Need? Leveraging LLM's Extended Context for NL2SQLcited by 30
  32. 2024Self-Refine Instruction-Tuning for Aligning Reasoning in Language Modelscited by 24
  33. 2025SQL-o1: A Self-Reward Heuristic Dynamic Search Method for Text-to-SQLcited by 19
  34. 2024LIONs: An Empirically Optimized Approach to Align Language Modelscited by 7

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2025: 11; 2026: 3.

14 papers.

Sort:

By area:

Similar, not cited

Close in wording, no citation either way

  1. 2025ConstrainedSQL: Training LLMs for Text2SQL via Constrained Reinforcement Learning
  2. 2025Sparks of Tabular Reasoning via Text2SQL Reinforcement Learning
  3. 2025PaVeRL-SQL: Text-to-SQL via Partial-Match Rewards and Verbal Reinforcement Learning
  4. 2026Optimizing Small Language Models for NL2SQL via Chain-of-Thought Fine-Tuning
  5. 2025GradeSQL: Test-Time Inference with Outcome Reward Models for Text-to-SQL Generation from Large Language Models
  6. 2025LearNAT: Learning NL2SQL with AST-guided Task Decomposition for Large Language Models
  7. 2025CogniSQL-R1-Zero: Lightweight Reinforced Reasoning for Efficient SQL Generation
  8. 2026Test-Time Verification for Text-to-SQL via Outcome Reward Models