LLM-based Text-to-SQL progress is reported across heterogeneous benchmarks, backbones, and inference protocols, making cross-system comparison fragile. We reframe the field as a leaderboard aggregation: we collect the metrics authors themselves report and organize them along an inference-autonomy axis spanning constrained, in-context, iterative, agentic, and reasoning-internalized generation, with traceable provenance for every cell. To anchor the aggregation empirically, we run a focused case study on Spider, comparing 8B open-source backbones with and without chain-of-thought (CoT) supervision against few-shot DeepSeekV3 and GLM-4 baselines. Four patterns emerge: Spider gains transfer unevenly to BIRD and Spider2.0; autonomy buys robustness at non-trivial cost; reasoning internalization sits between answer-only decoding and externally orchestrated agents; and CoT gains concentrate on Hard and Extra-Hard queries. We release a Python harness mirroring the autonomy axis so that future methods can be added directly to the leaderboard.
Figures & tables
Aspect
Spider
BIRD
Spider 2.0
Primary stress
Cross-domain composition
Realistic grounding
Workflow realism
Question style
Single-turn NL → SQL
NL → SQL + evidence K
Multi-step, debug-aware
Schema scale
Multi-table, medium
Wide, large
Very large, evolving
Value realism
Moderate
High
High
External knowledge
Not required
Often required
Frequently required
SQL dialect
SQLite mostly
SQLite mostly
BigQuery / Snowflake / etc.
Table 1: Datasets that anchor the leaderboard. The shift is from compositional-generalization stress to grounding-and-realism stress to enterprise-workflow stress; the three benchmarks are not interchangeable.
System
Autonomy
Training
Backbone class
PICARD [ 6 ]
L0
SFT + constrained dec.
T5-3B
DAIL-SQL [ 7 ]
L1
ICL
GPT-4 / Code-LLaMA
DIN-SQL [ 8 ]
L2
ICL
GPT-4
DART-SQL [ 9 ]
L2
ICL + rewriting
GPT-4 / open
DTS-SQL [ 10 ]
L2
SFT
DeepSeek 7B / open
TS-SQL [ 11 ]
L2
ICL + test-driven
GPT-4 / open
Table 2: Method catalog. ICL = in-context learning; SFT = supervised fine-tuning; STR = self-taught reasoning. The autonomy column maps each system to a level in Section 3.1. The four CoT-SFT and 3-shot rows at the bottom are run under the protocol of Section 5.
System
Backbone
Autonomy
EM
EX
PICARD [ 6 ]
T5-3B
L0
71.9
75.1
DAIL-SQL [ 7 ]
GPT-4
L1
–
–
DIN-SQL+GPT-4 [ 8 ]
GPT-4
L2
60.0
85.3
DART-SQL [ 9 ]
GPT-4
L2
–
–
DTS-SQL [ 10 ]
DeepSeek 7B
L2
–
–
TS-SQL [ 11 ]
GPT-4 / open
L2
–
–
Table 3: Spider leaderboard, v1. Numbers are taken from the source paper of each system, cited in the System column. The bottom block is produced by our case study (Section 5) on the Spider holdout test set under a uniform protocol. Dashes indicate that the original paper did not report the metric in a directly-comparable form.
System
Backbone
Autonomy
EX
VES
DIN-SQL+GPT-4 [ 8 ]
GPT-4
L2
55.90
59.44
DAIL-SQL [ 7 ]
GPT-4
L1
–
–
DART-SQL [ 9 ]
GPT-4
L2
–
–
DTS-SQL [ 10 ]
DeepSeek 7B
L2
–
–
TS-SQL [ 11 ]
GPT-4 / open
L2
–
–
MAC-SQL [ 12 ]
GPT-4
L3
–
–
Table 4: BIRD leaderboard, v1. Same conventions as Table 3 . Each numeric cell is sourced to the paper cited in the System column.
Configuration
Backbone
Easy
Medium
Hard
X-Hard
All
DeepSeek V3 (3-shot)
DeepSeek V3
96.62
53.22
33.33
24.04
51.47
GLM-4 (3-shot)
GLM-4
92.57
67.03
59.08
41.53
66.28
No-CoT SFT
LLaMA3.1-8B+LoRA
96.28
75.30
69.49
67.76
76.01
CoT-SFT
LLaMA3.1-8B+LoRA
96.62
74.93
68.25
73.22
76.01
No-CoT SFT
Qwen3-8B+LoRA
96.62
76.20
70.19
71.58
77.04
CoT-SFT
Qwen3-8B+LoRA
94.95
80.32
81.09
79.25
82.24
Table 5: Case-study results on the Spider test set: difficulty-stratified Execution Accuracy (%). Easy / Medium / Hard / Extra-Hard buckets follow the official Spider difficulty rules. “All EX” is the aggregate over all 2,147 test examples. The two 8B SFT rows differ only in whether the supervision target includes a five-stage reasoning trace; otherwise the protocol is identical [ 20 ] .
Dimension
L0
L1
L1.5
L2
L3
Inference cost
low
low
low–med
medium
high
Error recovery
none
weak
moderate
moderate
strong
Diagnosability
limited
limited
moderate
moderate
strong
Schema-scale tolerance
limited
limited
moderate
moderate
strong
Deployment simplicity
strong
strong
moderate
weaker
weakest
Typical failure
syntax
grounding
supervision
repair quality
control
Table 6: Qualitative comparison of autonomy levels. Cells are derived from the structural definitions in Section 3.1, not from the numeric leaderboard; they are intended to be read alongside Tables 3 and 4 , not in their place.
LLM-based agents for text-to-SQL often struggle with latency-performance trade-off, where performance improvements come at the cost of latency or vice versa. We reformulate text-to-SQL generation within the lens of software test coverage where the original query is prepared with a suite of test cases with simpler, atomic SQLs that are executed in parallel and together ensure semantic coverage of the original query. After iterating on test case coverage, the final SQL is generated only when enough information is gathered, leveraging the explored test case SQLs to ground the final generation. We validated our framework on a state-of-the-art benchmark for text-to-SQL, Spider 2.0, achieving a new state-of-the-art with 70.2% execution accuracy.
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
Text-to-SQL is the task of translating natural language queries into executable SQL for a given database, enabling non-expert users to access structured data without writing SQL manually. Despite rapid advances driven by large language models (LLMs), existing approaches still struggle with complex queries in real-world settings, where database schemas are large and questions require multi-step reasoning over many interrelated tables. In such cases, providing the full schema often exceeds the context window, while one-shot generation frequently produces non-executable SQL due to syntax errors and incorrect schema linking. To address these challenges, we introduce AV-SQL, a framework that decomposes complex Text-to-SQL into a pipeline of specialized LLM agents. Central to AV-SQL is the concept of agentic views: agent-generated Common Table Expressions (CTEs) that encapsulate intermediate query logic and filter relevant schema elements from large schemas. AV-SQL operates in three stages: (1) a rewriter agent compresses and clarifies the input query; (2) a view generator agent processes schema chunks to produce agentic views; and (3) a planner, generator, and revisor agent collaboratively compose these views into the final SQL query. Extensive experiments show that AV-SQL achieves 70.38% execution accuracy on the challenging Spider 2.0 benchmark, outperforming state-of-the-art baselines, while remaining competitive on standard datasets with 85.59% on Spider, 72.16% on BIRD and 63.78% on KaggleDBQA. Our source code is available at https://github.com/pminhtam/AV-SQL.
Minh Tam Pham, Trinh Pham, Tong Chen +3
Griffith University (Australia) · The University of Queensland (Australia)