Large language models have achieved remarkable progress on Text-to-SQL through reasoning-enhanced fine-tuning, yet existing approaches predominantly rely on massive instruction corpora under the assumption that scale drives performance. We challenge this paradigm by investigating a fundamental question: what is the minimal data requirement for effective Text-to-SQL instruction tuning? We propose LIMIT(Less Is More for Instruction Tuning in Text-to-SQL), a data-centric framework that demonstrates strong database reasoning can emerge from an extremely compact training set when examples are strategically selected. LIMIT operates through four stages: difficulty-aware filtering that identifies samples within the model's learning frontier, chain-of-thought synthesis with consistency-based selection, multi-dimensional quality scoring via LLM-as-judge, and genetic algorithm optimization that jointly maximizes schema coverage and sample quality. On the BIRD and Spider benchmark, LIMIT selects only 796 and 863 samples while achieving 100% table coverage, enabling Qwen3-8B to reach 69.1% and 88.9% execution accuracy.This result surpasses methods trained on 20 times more data and establishes a new state-of-the-art among open-source approaches. Our findings suggest that careful data curation, rather than scale, is the key to efficient Text-to-SQL learning.
Figures & tables
Figure 1: Overall framework of LIMIT. Our framework operates through four principal phases: (1) Difficulty-Aware Pre-filtering, (2) Chain-of-Thought Generation, (3) Multi-Dimensional LLM Based Scoring and (4) Genetic Data Selection. The data volume in the figure represents the amount of data after each stage on the BIRD dataset.
Methods
BIRD-Dev-EX
Spider-Dev-EX
Prompting with Closed-Source LLMs
MCS-SQL + GPT-4 ( Wang et al., 2023 )
63.4
89.5
XIYAN ( Gao et al., 2024 )
73.3
69.7
CHASE-SQL + Gemini-1.5 ( Pourreza et al., 2024 )
73.1
87.6
MAC-SQL + GPT-4 ( Wang et al., 2023 )
59.4
86.8
Agentar-Scale-SQL ( Wang et al., 2025 )
74.9
-
Table 1: Experimental results on BIRD benchmarks. Within the Fine-Tuning with Open-Source LLMs 7B-8B group, top-performing entries are bold with runner-up scores underlined .
Figure 2: Comparison of dataset scores between LIMIT and BIRD train.
Methods
BIRD-Dev-EX
Qwen3-8B ( Yang et al., 2025 )
57.4
SFT
65.4
SFT + RL
66.9
SFT + RL + self-consistency@8
69.1
Table 2: Performance of LIMIT at different training stages on the BIRD dataset.
Methods
Data volume
Bird-Train
9428
Codes ( Li et al., 2024b )
21.5GB
OmniSQL ( Li et al., 2025 )
2500000
Route ( Qin et al., 2024 )
30000
DB-Explore ( Ma et al., 2025a )
16457
LIMIT
796
Table 3: LIMIT data volume analysis in BIRD.
Cover Rate
Table
column
Bird-DEV
100%
71.7%
DB-Explore ( Ma et al., 2025a )
100%
100%
LIMIT
100%
86.8%
Table 4: DB coverage analysis.
Figure 3: LIMIT DB Coverage Analysis.
Methods
BIRD-Dev-EX
SFT
RL
Ours: LIMIT + Qwen3-8B
65.4
66.9
- w/o DB Cover Rate
58.4 ↓7.0
61.1 ↓5.8
- w/o Adherence
60.6 ↓4.8
61.4 ↓5.5
- w/o Input Quality
63.8 ↓1.6
65.0 ↓1.9
- w/o SQL Quality
63.5 ↓1.9
64.8 ↓2.1
Table 5: Ablation study on LIMIT, complete method of LIMIT is bold .
Appendix figures & tables7 assets
Supplementary material from the paper’s appendix.
Appendix
Weight
Value
Subset Size
Table Cov. (%)
Column Cov. (%)
EX (%)
wtable
0.2 (Default)
796
100.0
86.8
66.9
0.1
761
99.2
83.5
65.1
0.3
828
100.0
88.5
66.1
0.4
912
100.0
91.4
65.6
wcolumn
0.3 (Default)
796
100.0
86.8
66.9
0.1
785
100.0
78.2
64.3
Appendix
Table 6: Sensitivity analysis of fitness weights. Each block varies one weight while fixing others at default values.
Methods
EX (GRE)
EX (MV)
Samples
Qwen3-8B + Full data
67.8
69.6
24,457
LIMIT
66.9
69.1
796
Appendix
Table 7: Comparison between full data training and LIMIT.
Large language models have driven major advances in Text-to-SQL generation. However, they suffer from high computational cost, long latency, and data privacy concerns, which make them impractical for many real-world applications. A natural alternative is to use small language models (SLMs), which enable efficient and private on-premise deployment. Yet, SLMs often struggle with weak reasoning and poor instruction following. Conventional reinforcement learning methods based on sparse binary rewards (0/1) provide little learning signal when the generated SQLs are incorrect, leading to unstable or collapsed training. To overcome these issues, we propose FINER-SQL, a scalable and reusable reinforcement learning framework that enhances SLMs through fine-grained execution feedback. Built on group relative policy optimization, FINER-SQL replaces sparse supervision with dense and interpretable rewards that offer continuous feedback even for incorrect SQLs. It introduces two key reward functions: a memory reward, which aligns reasoning with verified traces for semantic stability, and an atomic reward, which measures operation-level overlap to grant partial credit for structurally correct but incomplete SQLs. This approach transforms discrete correctness into continuous learning, enabling stable, critic-free optimization. Experiments on the BIRD and Spider benchmarks show that FINER-SQL achieves up to 67.73% and 85% execution accuracy with a 3B model -- matching much larger LLMs while reducing inference latency to 5.57~s/sample. These results highlight a cost-efficient and privacy-preserving path toward high-performance Text-to-SQL generation. Our code is available at https://github.com/thanhdath/finer-sql.
Thanh Dat Hoang, Thanh Trung Huynh, Matthias Weidlich +4
Griffith University (Australia) · VinUniversity (Vietnam) · Humboldt-Universitat zu Berlin (Germany) +1
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.
Text-to-SQL aims to translate natural language questions into executable SQL queries over structured databases, enabling non-expert users to access data intuitively. While recent advances in large language models (LLMs) have shown promise in this task, existing LLM-based approaches often struggle to strike a balance between strong reasoning capabilities and robust generalization. To address these limitations, we propose CoTE-SQL to enhance the LLM-based text-to-SQL generation with three key innovations: (i) self-enhanced reasoning traces distilled from LLMs without human annotation, (ii) structured chain-of-thought (CoT) prompting with modular decomposition and examples retrieval, and (iii) error-aware revision based on SQL execution feedback. Extensive experiments on the Spider and Bird benchmarks demonstrate that CoTE-SQL achieves new state-of-the-art performance among methods built on open-source LLMs with comparable model sizes on Bird (53.39% EX / 59.02 VES) and strong results on Spider (79.60% EX / 77.19 VES), with especially significant gains on complex queries. Results highlight the effectiveness of combining self-enhancement, structured reasoning, and execution-time feedback within an LLM-based framework for text-to-SQL design.
Feng Lyu, Jinfeng Cen, Sijing Duan +4
Central South University · Tsinghua University · Nanjing University +1