mlsanityData to 14 Oct 2026

STaR-SQL: Self-Taught Reasoner for Text-to-SQL

arXiv 2502.13550 ↗First posted 19 Feb 2025cs.CLcited by 17

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

Abstract (arXiv)

Generating step-by-step "chain-of-thought" rationales has proven effective for improving the performance of large language models on complex reasoning tasks. However, applying such techniques to structured tasks, such as text-to-SQL, remains largely unexplored. In this paper, we introduce Self-Taught Reasoner for text-to-SQL (STaR-SQL), a novel approach that reframes SQL query generation as a reasoning-driven process. Our method prompts the LLM to produce detailed reasoning steps for SQL queries and fine-tunes it on rationales that lead to correct outcomes. Unlike traditional methods, STaR-SQL dedicates additional test-time computation to reasoning, thereby positioning LLMs as spontaneous reasoners rather than mere prompt-based agents. To further scale the inference process, we incorporate an outcome-supervised reward model (ORM) as a verifier, which enhances SQL query accuracy. Experimental results on the challenging Spider benchmark demonstrate that STaR-SQL significantly improves text-to-SQL performance, achieving an execution accuracy of 86.6%. This surpasses a few-shot baseline by 31.6% and a baseline fine-tuned to predict answers directly by 18.0%. Additionally, STaR-SQL outperforms agent-like prompting methods that leverage more powerful yet closed-source models such as GPT-4. These findings underscore the potential of reasoning-augmented training for structured tasks and open the door to extending self-improving reasoning models to text-to-SQL generation and beyond.

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

Builds on

45 of 60 references.

References · 45

  1. 2023GPT-4 Technical Reportcited by 18,396
  2. 2021Training Verifiers to Solve Math Word Problemscited by 10,109
  3. 2021Evaluating Large Language Models Trained on Codecited by 8,320
  4. 2022Self-Consistency Improves Chain of Thought Reasoning in Language Modelscited by 5,708
  5. 2024Qwen2.5 Technical Reportcited by 4,942
  6. 2023Let's Verify Step by Stepcited by 3,789
  7. 2024Scaling LLM Test-Time Compute Optimally can be More Effective than Scaling Model Parameterscited by 1,986
  8. 2021WebGPT: Browser-assisted question-answering with human feedbackcited by 1,745
  9. 2018Spider: A Large-Scale Human-Labeled Dataset for Complex and Cross-Domain Semantic Parsing and Text-to-SQL Taskcited by 1,139
  10. 2023Large Language Models Cannot Self-Correct Reasoning Yetcited by 1,017
  11. 2024Large Language Monkeys: Scaling Inference Compute with Repeated Samplingcited by 991
  12. 2023MetaMath: Bootstrap Your Own Mathematical Questions for Large Language Modelscited by 735
33 more
  1. 2017Seq2SQL: Generating Structured Queries from Natural Language using Reinforcement Learningcited by 687
  2. 2023WizardMath: Empowering Mathematical Reasoning for Large Language Models via Reinforced Evol-Instructcited by 625
  3. 2023Reinforced Self-Training (ReST) for Language Modelingcited by 500
  4. 2023Scaling Relationship on Learning Mathematical Reasoning with Large Language Modelscited by 427
  5. 2019RAT-SQL: Relation-Aware Schema Encoding and Linking for Text-to-SQL Parserscited by 424
  6. 2021PICARD: Parsing Incrementally for Constrained Auto-Regressive Decoding from Language Modelscited by 411
  7. 2023Text-to-SQL Empowered by Large Language Models: A Benchmark Evaluationcited by 385
  8. 2024Inference Scaling Laws: An Empirical Analysis of Compute-Optimal Inference for Problem-Solving with Language Modelscited by 290
  9. 2023Challenges and Applications of Large Language Modelscited by 254
  10. 2023Evaluating the Logical Reasoning Ability of ChatGPT and GPT-4cited by 202
  11. 2023MAC-SQL: A Multi-Agent Collaborative Framework for Text-to-SQLcited by 164
  12. 2016Language to Logical Form with Neural Attentioncited by 158
  13. 2017SQLNet: Generating Structured Queries From Natural Language Without Reinforcement Learningcited by 135
  14. 2020Bridging Textual and Tabular Data for Cross-Domain Text-to-SQL Semantic Parsingcited by 133
  15. 2020Semantic Evaluation for Text-to-SQL with Distilled Test Suitescited by 126
  16. 2023A comprehensive evaluation of ChatGPT's zero-shot Text-to-SQL capabilitycited by 119
  17. 2022Evaluating the Text-to-SQL Capabilities of Large Language Modelscited by 101
  18. 2019A Comprehensive Exploration on WikiSQL with Table-Aware Word Contextualizationcited by 88
  19. 2023OVM, Outcome-supervised Value Models for Planning in Mathematical Reasoningcited by 85
  20. 2018TypeSQL: Knowledge-based Type-Aware Neural Text-to-SQL Generationcited by 81
  21. 2022Solving Math Word Problems via Cooperative Reasoning induced Language Modelscited by 77
  22. 2019Representing Schema Structure with Graph Neural Networks for Text-to-SQL Parsingcited by 74
  23. 2021Natural SQL: Making SQL Easier to Infer from Natural Language Specificationscited by 68
  24. 2024Synthesizing Text-to-SQL Data from Weak and Strong LLMscited by 54
  25. 2024DTS-SQL: Decomposed Text-to-SQL with Small Large Language Modelscited by 45
  26. 2022Learning Math Reasoning from Self-Sampled Correct and Partially-Correct Solutionscited by 38
  27. 2021Improving Text-to-SQL with Schema Dependency Learningcited by 25
  28. 2017An Encoder-Decoder Framework Translating Natural Language to Database Queriescited by 23
  29. 2023Divide and Prompt: Chain of Thought Prompting for Text-to-SQLcited by 20
  30. 2024Advancing Process Verification for Large Language Models via Tree-Based Preference Learningcited by 16
  31. 2023Semantic Decomposition of Question and SQL for Text-to-SQL Parsingcited by 14
  32. 2024Mitigating Tail Narrowing in LLM Self-Improvement via Socratic-Guided Samplingcited by 13
  33. 2024ROUTE: Robust Multitask Tuning and Collaboration for Text-to-SQLcited by 13

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2025: 7; 2026: 10.

17 papers.

Sort:

By area:

  1. 2025Arctic-Text2SQL-R1: Simple Rewards, Strong Reasoning in Text-to-SQLcited by 38
  2. 2025Reward-SQL: Boosting Text-to-SQL via Stepwise Execution-Aware Reasoning and Process-Supervised Rewardscited by 27
  3. 2025CSC-SQL: Corrective Self-Consistency in Text-to-SQL via Reinforcement Learningcited by 15
  4. 2025MTSQL-R1: Towards Long-Horizon Multi-Turn Text-to-SQL via Agentic Trainingcited by 5
  5. 2026SQL-ASTRA: Alleviating Sparse Feedback in Agentic SQL via Column-Set Matching and Trajectory Aggregationcited by 3
  6. 2026TRUST-SQL: Tool-Integrated Multi-Turn Reinforcement Learning for Text-to-SQL over Unknown Schemascited by 3
  7. 2025PaVeRL-SQL: Text-to-SQL via Partial-Match Rewards and Verbal Reinforcement Learningcited by 2
  8. 2025SteinerSQL: Graph-Guided Mathematical Reasoning for Text-to-SQL Generationcited by 1
  9. 2026EvolSQL: Structure-Aware Evolution for Scalable Text-to-SQL Data Synthesiscited by 1
  10. 2026PExA: Parallel Exploration Agent for Complex Text-to-SQLcited by 1
  11. 2026SQLConductor: Search-to-Policy Learning for Step-wise Text-to-SQL Orchestrationcited by 1
  12. 2026Agentic-SQL Revisited: Autonomy-Based Taxonomy and Empirical Benchmark Analysis for LLM Text-to-SQLcited by 1
5 more
  1. 2025GradeSQL: Test-Time Inference with Outcome Reward Models for Text-to-SQL Generation from Large Language Modelscited by 0
  2. 2026SIRIUS-SQL: Anchoring Multi-Candidate Text-to-SQL in Execution Feedbackcited by 0
  3. 2026CAPER: Clause-Aligned Process Supervision for Text-to-SQLcited by 0
  4. 2026EvoSQL: Memory-Augmented Critic-Generator Co-Evolution for Text-to-SQLcited by 0
  5. 2026Why, Where, How: Taxonomy-guided Error Grounding for Code Repair in NL2SQLcited by 0

Similar, not cited

Close in wording, no citation either way

  1. 2026Integrating Reasoning and Generalization in Text-to-SQL via Self-Enhanced Fine-Tuning
  2. 2026Test-Time Verification for Text-to-SQL via Outcome Reward Models
  3. 2026Learning When to Reason for Text-to-SQL via SFT and DPO
  4. 2025JudgeSQL: Reasoning over SQL Candidates with Weighted Consensus Tournament
  5. 2025Reasoning-SQL: Reinforcement Learning with SQL Tailored Partial Rewards for Reasoning-Enhanced Text-to-SQL
  6. 2024Lucy: Think and Reason to Solve Text-to-SQL
  7. 2025RAISE: Reasoning Agent for Interactive SQL Exploration
  8. 2026CA-SQL: Complexity-Aware Inference Time Reasoning for Text-to-SQL via Exploration and Compute Budget Allocation