STaR-SQL: Self-Taught Reasoner for Text-to-SQL
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
- 2023GPT-4 Technical Reportcited by 18,396
- 2021Training Verifiers to Solve Math Word Problemscited by 10,109
- 2021Evaluating Large Language Models Trained on Codecited by 8,320
- 2022Self-Consistency Improves Chain of Thought Reasoning in Language Modelscited by 5,708
- 2024Qwen2.5 Technical Reportcited by 4,942
- 2023Let's Verify Step by Stepcited by 3,789
- 2024Scaling LLM Test-Time Compute Optimally can be More Effective than Scaling Model Parameterscited by 1,986
- 2021WebGPT: Browser-assisted question-answering with human feedbackcited by 1,745
- 2018Spider: A Large-Scale Human-Labeled Dataset for Complex and Cross-Domain Semantic Parsing and Text-to-SQL Taskcited by 1,139
- 2023Large Language Models Cannot Self-Correct Reasoning Yetcited by 1,017
- 2024Large Language Monkeys: Scaling Inference Compute with Repeated Samplingcited by 991
- 2023MetaMath: Bootstrap Your Own Mathematical Questions for Large Language Modelscited by 735
33 more
- 2017Seq2SQL: Generating Structured Queries from Natural Language using Reinforcement Learningcited by 687
- 2023WizardMath: Empowering Mathematical Reasoning for Large Language Models via Reinforced Evol-Instructcited by 625
- 2023Reinforced Self-Training (ReST) for Language Modelingcited by 500
- 2023Scaling Relationship on Learning Mathematical Reasoning with Large Language Modelscited by 427
- 2019RAT-SQL: Relation-Aware Schema Encoding and Linking for Text-to-SQL Parserscited by 424
- 2021PICARD: Parsing Incrementally for Constrained Auto-Regressive Decoding from Language Modelscited by 411
- 2023Text-to-SQL Empowered by Large Language Models: A Benchmark Evaluationcited by 385
- 2024Inference Scaling Laws: An Empirical Analysis of Compute-Optimal Inference for Problem-Solving with Language Modelscited by 290
- 2023Challenges and Applications of Large Language Modelscited by 254
- 2023Evaluating the Logical Reasoning Ability of ChatGPT and GPT-4cited by 202
- 2023MAC-SQL: A Multi-Agent Collaborative Framework for Text-to-SQLcited by 164
- 2016Language to Logical Form with Neural Attentioncited by 158
- 2017SQLNet: Generating Structured Queries From Natural Language Without Reinforcement Learningcited by 135
- 2020Bridging Textual and Tabular Data for Cross-Domain Text-to-SQL Semantic Parsingcited by 133
- 2020Semantic Evaluation for Text-to-SQL with Distilled Test Suitescited by 126
- 2023A comprehensive evaluation of ChatGPT's zero-shot Text-to-SQL capabilitycited by 119
- 2022Evaluating the Text-to-SQL Capabilities of Large Language Modelscited by 101
- 2019A Comprehensive Exploration on WikiSQL with Table-Aware Word Contextualizationcited by 88
- 2023OVM, Outcome-supervised Value Models for Planning in Mathematical Reasoningcited by 85
- 2018TypeSQL: Knowledge-based Type-Aware Neural Text-to-SQL Generationcited by 81
- 2022Solving Math Word Problems via Cooperative Reasoning induced Language Modelscited by 77
- 2019Representing Schema Structure with Graph Neural Networks for Text-to-SQL Parsingcited by 74
- 2021Natural SQL: Making SQL Easier to Infer from Natural Language Specificationscited by 68
- 2024Synthesizing Text-to-SQL Data from Weak and Strong LLMscited by 54
- 2024DTS-SQL: Decomposed Text-to-SQL with Small Large Language Modelscited by 45
- 2022Learning Math Reasoning from Self-Sampled Correct and Partially-Correct Solutionscited by 38
- 2021Improving Text-to-SQL with Schema Dependency Learningcited by 25
- 2017An Encoder-Decoder Framework Translating Natural Language to Database Queriescited by 23
- 2023Divide and Prompt: Chain of Thought Prompting for Text-to-SQLcited by 20
- 2024Advancing Process Verification for Large Language Models via Tree-Based Preference Learningcited by 16
- 2023Semantic Decomposition of Question and SQL for Text-to-SQL Parsingcited by 14
- 2024Mitigating Tail Narrowing in LLM Self-Improvement via Socratic-Guided Samplingcited by 13
- 2024ROUTE: Robust Multitask Tuning and Collaboration for Text-to-SQLcited by 13
Built on by
Citing papers per year: 2025: 7; 2026: 10.
17 papers.
Sort:
By area:
- 2025Arctic-Text2SQL-R1: Simple Rewards, Strong Reasoning in Text-to-SQLcited by 38
- 2025Reward-SQL: Boosting Text-to-SQL via Stepwise Execution-Aware Reasoning and Process-Supervised Rewardscited by 27
- 2025CSC-SQL: Corrective Self-Consistency in Text-to-SQL via Reinforcement Learningcited by 15
- 2025MTSQL-R1: Towards Long-Horizon Multi-Turn Text-to-SQL via Agentic Trainingcited by 5
- 2026SQL-ASTRA: Alleviating Sparse Feedback in Agentic SQL via Column-Set Matching and Trajectory Aggregationcited by 3
- 2026TRUST-SQL: Tool-Integrated Multi-Turn Reinforcement Learning for Text-to-SQL over Unknown Schemascited by 3
- 2025PaVeRL-SQL: Text-to-SQL via Partial-Match Rewards and Verbal Reinforcement Learningcited by 2
- 2025SteinerSQL: Graph-Guided Mathematical Reasoning for Text-to-SQL Generationcited by 1
- 2026EvolSQL: Structure-Aware Evolution for Scalable Text-to-SQL Data Synthesiscited by 1
- 2026PExA: Parallel Exploration Agent for Complex Text-to-SQLcited by 1
- 2026SQLConductor: Search-to-Policy Learning for Step-wise Text-to-SQL Orchestrationcited by 1
- 2026Agentic-SQL Revisited: Autonomy-Based Taxonomy and Empirical Benchmark Analysis for LLM Text-to-SQLcited by 1
5 more
- 2025GradeSQL: Test-Time Inference with Outcome Reward Models for Text-to-SQL Generation from Large Language Modelscited by 0
- 2026SIRIUS-SQL: Anchoring Multi-Candidate Text-to-SQL in Execution Feedbackcited by 0
- 2026CAPER: Clause-Aligned Process Supervision for Text-to-SQLcited by 0
- 2026EvoSQL: Memory-Augmented Critic-Generator Co-Evolution for Text-to-SQLcited by 0
- 2026Why, Where, How: Taxonomy-guided Error Grounding for Code Repair in NL2SQLcited by 0
- 2026Why, Where, How: Taxonomy-guided Error Grounding for Code Repair in NL2SQL4 Oct 2026
- 2026Agentic-SQL Revisited: Autonomy-Based Taxonomy and Empirical Benchmark Analysis for LLM Text-to-SQL15 Aug 2026
- 2026SQLConductor: Search-to-Policy Learning for Step-wise Text-to-SQL Orchestration22 Jun 2026
- 2026EvoSQL: Memory-Augmented Critic-Generator Co-Evolution for Text-to-SQL4 Jun 2026
- 2026CAPER: Clause-Aligned Process Supervision for Text-to-SQL2 Jun 2026
- 2026SIRIUS-SQL: Anchoring Multi-Candidate Text-to-SQL in Execution Feedback31 May 2026
- 2026PExA: Parallel Exploration Agent for Complex Text-to-SQL24 Apr 2026
- 2026TRUST-SQL: Tool-Integrated Multi-Turn Reinforcement Learning for Text-to-SQL over Unknown Schemas17 Mar 2026
- 2026SQL-ASTRA: Alleviating Sparse Feedback in Agentic SQL via Column-Set Matching and Trajectory Aggregation17 Mar 2026
- 2026EvolSQL: Structure-Aware Evolution for Scalable Text-to-SQL Data Synthesis8 Jan 2026
- 2025MTSQL-R1: Towards Long-Horizon Multi-Turn Text-to-SQL via Agentic Training12 Oct 2025
- 2025SteinerSQL: Graph-Guided Mathematical Reasoning for Text-to-SQL Generation23 Sep 2025
5 more
- 2025PaVeRL-SQL: Text-to-SQL via Partial-Match Rewards and Verbal Reinforcement Learning8 Sep 2025
- 2025GradeSQL: Test-Time Inference with Outcome Reward Models for Text-to-SQL Generation from Large Language Models1 Sep 2025
- 2025Arctic-Text2SQL-R1: Simple Rewards, Strong Reasoning in Text-to-SQL22 May 2025
- 2025CSC-SQL: Corrective Self-Consistency in Text-to-SQL via Reinforcement Learning19 May 2025
- 2025Reward-SQL: Boosting Text-to-SQL via Stepwise Execution-Aware Reasoning and Process-Supervised Rewards7 May 2025
- 2025Arctic-Text2SQL-R1: Simple Rewards, Strong Reasoning in Text-to-SQLcited by 38
- 2025Reward-SQL: Boosting Text-to-SQL via Stepwise Execution-Aware Reasoning and Process-Supervised Rewardscited by 27
- 2025CSC-SQL: Corrective Self-Consistency in Text-to-SQL via Reinforcement Learningcited by 15
- 2025SteinerSQL: Graph-Guided Mathematical Reasoning for Text-to-SQL Generationcited by 1
- 2025GradeSQL: Test-Time Inference with Outcome Reward Models for Text-to-SQL Generation from Large Language Modelscited by 0
- 2025SteinerSQL: Graph-Guided Mathematical Reasoning for Text-to-SQL Generation23 Sep 2025
- 2025GradeSQL: Test-Time Inference with Outcome Reward Models for Text-to-SQL Generation from Large Language Models1 Sep 2025
- 2025Arctic-Text2SQL-R1: Simple Rewards, Strong Reasoning in Text-to-SQL22 May 2025
- 2025CSC-SQL: Corrective Self-Consistency in Text-to-SQL via Reinforcement Learning19 May 2025
- 2025Reward-SQL: Boosting Text-to-SQL via Stepwise Execution-Aware Reasoning and Process-Supervised Rewards7 May 2025
- 2025MTSQL-R1: Towards Long-Horizon Multi-Turn Text-to-SQL via Agentic Trainingcited by 5
- 2026SQL-ASTRA: Alleviating Sparse Feedback in Agentic SQL via Column-Set Matching and Trajectory Aggregationcited by 3
- 2026PExA: Parallel Exploration Agent for Complex Text-to-SQLcited by 1
- 2026Agentic-SQL Revisited: Autonomy-Based Taxonomy and Empirical Benchmark Analysis for LLM Text-to-SQLcited by 1
- 2026Agentic-SQL Revisited: Autonomy-Based Taxonomy and Empirical Benchmark Analysis for LLM Text-to-SQL15 Aug 2026
- 2026PExA: Parallel Exploration Agent for Complex Text-to-SQL24 Apr 2026
- 2026SQL-ASTRA: Alleviating Sparse Feedback in Agentic SQL via Column-Set Matching and Trajectory Aggregation17 Mar 2026
- 2025MTSQL-R1: Towards Long-Horizon Multi-Turn Text-to-SQL via Agentic Training12 Oct 2025
- 2026SQLConductor: Search-to-Policy Learning for Step-wise Text-to-SQL Orchestrationcited by 1
- 2026SIRIUS-SQL: Anchoring Multi-Candidate Text-to-SQL in Execution Feedbackcited by 0
- 2026EvoSQL: Memory-Augmented Critic-Generator Co-Evolution for Text-to-SQLcited by 0
- 2026Why, Where, How: Taxonomy-guided Error Grounding for Code Repair in NL2SQLcited by 0
- 2026Why, Where, How: Taxonomy-guided Error Grounding for Code Repair in NL2SQL4 Oct 2026
- 2026SQLConductor: Search-to-Policy Learning for Step-wise Text-to-SQL Orchestration22 Jun 2026
- 2026EvoSQL: Memory-Augmented Critic-Generator Co-Evolution for Text-to-SQL4 Jun 2026
- 2026SIRIUS-SQL: Anchoring Multi-Candidate Text-to-SQL in Execution Feedback31 May 2026
Similar, not cited
Close in wording, no citation either way
- 2026Integrating Reasoning and Generalization in Text-to-SQL via Self-Enhanced Fine-Tuning
- 2026Test-Time Verification for Text-to-SQL via Outcome Reward Models
- 2026Learning When to Reason for Text-to-SQL via SFT and DPO
- 2025JudgeSQL: Reasoning over SQL Candidates with Weighted Consensus Tournament
- 2025Reasoning-SQL: Reinforcement Learning with SQL Tailored Partial Rewards for Reasoning-Enhanced Text-to-SQL
- 2024Lucy: Think and Reason to Solve Text-to-SQL
- 2025RAISE: Reasoning Agent for Interactive SQL Exploration
- 2026CA-SQL: Complexity-Aware Inference Time Reasoning for Text-to-SQL via Exploration and Compute Budget Allocation