Translating natural language questions to SQL queries (Text-to-SQL) is a long-standing problem in database research. Recent efforts have focused on improving accuracy by building increasingly complex multi-stage large LLM pipelines, layering task decomposition, schema linking, and model-based query selection on top of an LLM. Despite this growing complexity, a substantial gap (>10%) between such systems and human experts persists on benchmarks, suggesting that pipeline engineering alone has hit a ceiling. We show that human-level Text-to-SQL performance is achievable by fine-tuning an LLM using RLVR on clean data, without pipeline components. In this paper, we identified the dominant bottleneck for RLVR on Text-to-SQL: existing training data contains pervasive annotation errors that mislead optimization. To address this, we developed a multi-round, expert-driven verification pipeline and used it to curate BIRD-Platinum, a dataset of 2.5k verified instances sampled from BIRD Train, with errors corrected in 61% of instances. We show that fine-tuning Qwen3-235B on BIRD-Platinum yields consistent improvements (11-16%) over BIRD Train on Arcwise-Plat (an expert-verified version of BIRD) and Spider2, outperforming SOTA open-source systems by 0.6-16%. Furthermore, we diagnosed two failure modes of standard RLVR on Text-to-SQL. We find that (1) result-based rewards have non-trivial false positive rates, and (2) models systematically ignore the external knowledge in BIRD-style problems. To address them, we propose ReViSQL-BIRD, a specialized reward shaping method that combines result-based rewards with SQL equivalence verification and leverages process rewards for incentivizing external-knowledge use. We fine-tuned Kimi-K2.6 with ReViSQL-BIRD. On Arcwise-Plat, ReViSQL-BIRD-K2.6 is the first method to achieve human-level accuracy (92.96%), outperforming top five open-source systems by 10-22%.
Figures & tables
Figure 1. On Arcwise-Plat-SQL, an expert-verified BIRD Mini-Dev set constructed by prior work ( Jin et al., 2026 ; Arcwise, 2025 ) , ReViSQL-BIRD achieves human-level performance ( Team, 2024 ) using RLVR (Kimi-K2.6) with verified data and reward shaping. ReViSQL-BIRD obviates the need for the complex pipelines ( Xie et al., 2025 ; Sheng and Xu, 2025a ; Agrawal and Nguyen, 2025 ; Dönder et al., 2025 ; Qu et al., 2025 ) with 10–22% higher accuracy.
Method
Dynamic pipeline
Dynamic prompts
Schema linking
Iterative revision
Selection
JoyDataAgent ( at JDCHO, 2025 )
∙
∙
∙
∙
∘
SiriusAI ( Jiang et al., 2024 )
∙
∘
∙
∙
∘
Agentar-Scale ( Wang et al., 2025 )
∘
∙
∘
∙
∙
SHARE ( Qu et al., 2025 )
∘
∙
∙
∙
∘
OpenSearch ( Xie et al., 2025 )
∘
∙
∙
∙
∘
Distillery ( Maamari et al., )
∘
∙
∙
∙
∘
Table 1. Comparison of the pipeline complexity among top-30 BIRD Leaderboard methods that have disclosed technical details. Each filled dot marks a component the method requires at inference in addition to SQL query generation. ReViSQL-BIRD exceeds these methods on accuracy while requiring none of them.
Correction
Arcwise-Plat-Full
Arcwise-Plat-SQL
SQL query
132 (26.5%)
80 (16.1%)
Question
88 (17.7%)
0
External knowledge
97 (19.4%)
0
Table 2. Correction statistics of two expert-verified datasets based on BIRD mini-Dev.
Figure 2. Our hybrid LLM–human-expert pipeline for correcting text-to-SQL annotation errors in BIRD.
Per-query stats
# tables
# joins
# functions
# aggregations
# set operations
# subqueries
# CTEs
# window func.
BIRD Train
2.08
1.02
1.67
0.62
0.0024
0.088
0.0
0.0012
BIRD-Platinum
2.36
1.06
2.10
0.80
0.024
0.26
0.11
0.0012
Difference
+13.5%
+3.9%
+25.7%
+29.0%
+900%
+195.5%
— ∗
+2.0%
Table 3. Structural complexity comparison between the original BIRD Train and BIRD-Platinum. Values for the datasets denote the average count of each structural component per query; the difference is the relative change from BIRD Train to BIRD-Platinum. We find that gold SQL queries exhibit a significant increase in complexity across every structural metric.
Figure 3. Quantitative analysis of the BIRD-Platinum expert curation process. Relying solely on automated LLMs for data correction is insufficient due to poor recall (Fig. 3(a) ). Consequently, BIRD-Platinum uses an expert verification pipeline that requires up to four iterative rounds to fully resolve errors (Fig. 3(b) ). We identified and corrected errors across 52.1% of SQL queries, 26.2% of natural language questions, and 18.2% of external knowledge contexts (Fig. 3(c) ).
Figure 7
Figure 6. ReViSQL-BIRD -K2.6 achieves human-level accuracy on BIRD while dominating prior methods. (a, b) Accuracy vs. cost on Arcwise-Plat-SQL and Arcwise-Plat-Full, comparing ReViSQL-BIRD -K2.6 against the top 5 open-source methods on BIRD Leaderboard. (c, d) Accuracy vs. candidate count, comparing ReViSQL-BIRD -K2.6 against single-model baselines.
Method
Arcwise-Plat-SQL (%)
Arcwise-Plat-Full (%)
Spider 2-SQLite (%)
Per-query cost (USD)
SHARE (GPT-5.2)
71.29
75.70
21.48
5.6×10−3
CSC-SQL (XiYan-32B)
71.08
75.70
10.37
2.9×10−3
Contextual-SQL (XiYan-32B)
75.10
79.12
11.11
3.8×10−1
GenaSQL (GPT-5.2)
81.73
84.94
34.81
6.3×10−2
OpenSearch (GPT-5.2)
82.93
88.15
34.07∗
5.6×10−2
ReViSQL -235B (greedy)
87.34
88.75
37.04
7.7×10−3
Table 4. ReViSQL -235B (RLVR on BIRD-Platinum) outperforms the strongest prior open-source pipelines across two BIRD-derived benchmarks (Arcwise-Plat-SQL, Arcwise-Plat-Full) and the out-of-distribution Spider 2-SQLite benchmark, at lower per-query cost, demonstrating the generalizability of BIRD-Platinum.
Figure 7. Ablation of ReViSQL-BIRD -K2.6 on Arcwise-Plat-SQL and -Full under greedy decoding. Training on BIRD-Platinum rather than the original BIRD Train improves accuracy by 13.9–17.1%. Reward shaping then further improves accuracy by 2.8–3.8%, reducing error rates by 24.6–38.0%.
Figure 8. Training Qwen3-235B-A22B with RLVR on BIRD-Platinum ( ReViSQL ) yields consistent accuracy improvements (11.0–16.1%) over training on the original BIRD Train, across Arcwise-Plat and Spider2 benchmarks.
Appendix figures & tables3 assets
Supplementary material from the paper’s appendix.
Appendix
Figure 9. A representative instance of two expert-verified variants of BIRD Mini-Dev. (a) The original instance contains an incorrect phrasing in the question (“grades 1 through 12” as opposed to “K-12”) and a gold SQL query that omits a NOT NULL filter, causing it to include data about districts and schools. (b) Arcwise-Plat-Full corrects all three error sources: rephrasing the question to “K-12,” removing the redundant external-knowledge entry, and augmenting gold SQL. (c) Arcwise-Plat-SQL corrects only the gold SQL, preserving the original noisy question and external knowledge.
Attribution
Mechanism
# cases
Question ambiguity
Entity / column / value mapping
9
Output specification
20
Aggregation / filter scope
15
Subtotal
44 (69%)
Model defect
Schema / value grounding
12
Ignored external knowledge
3
Appendix
Table 5. Classification of the 64 residual ReViSQL-BIRD -K2.6 failures (the most frequent incorrect self-consistency query on each problem where the model disagrees with the gold, across both Arcwise-Plat benchmarks). Most failures trace to ambiguity in the question rather than to defects in the model’s SQL generation.
System prompt
Verification-aware reward ( β )
Process penalties ( λk )
Base model
Evidence
not trained
ReViSQL
Base
∘
∘
ReViSQL-BIRD
Evidence
∙
∙
Appendix
Table 6. Prompt and reward configuration of each method. The pre-RLVR base model receives the same evidence-structured prompt as ReViSQL-BIRD . ReViSQL , our general recipe, uses the base prompt and a purely result-based reward. ReViSQL-BIRD couples the evidence-structured prompt with the penalties that enforce it.
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.
State-of-the-art Text-to-SQL systems are typically multi-agent pipelines centered around two fundamental tasks: schema linking and SQL generation. However, existing work trains separate models for each task, failing to leverage the synergy between these interrelated tasks. In this work, we propose DualSQL, a new Text-to-SQL system consisting of two agents powered by a single model backbone. The agents share the same model weights and agentic scaffold, enabling joint optimization through a robust multi-agent reinforcement learning (RL) framework. We design three database access tools to facilitate effective multi-step reasoning grounded to interactions with the databases. To improve training and avoid model collapse, we introduce a set of rollout guardrail mechanisms that stabilizes multi-agent RL training, supporting DualSQL to keep improving during training. We also introduce a new SQL correctness metric, robust execution match (REX), to more accurately judge SQL correctness and assign reward signals. Being trained on only 3755 examples, DualSQL-4B achieves an impressive 68.0% execution accuracy on the BIRD development set, matching previous 7B models. DualSQL-8B further improves to 71.1%, outperforming previous state-of-the-art single-model solutions with 32B parameters. These results demonstrate the strength of joint multi-agent reinforcement learning for building high performance Text-to-SQL pipelines.
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