English

R$^3$-SQL: Ranking Reward and Resampling for Text-to-SQL

Software Engineering 2026-04-29 v1 Artificial Intelligence Computation and Language

Abstract

Modern Text-to-SQL systems generate multiple candidate SQL queries and rank them to judge a final prediction. However, existing methods face two limitations. First, they often score functionally equivalent SQL queries inconsistently despite identical execution results. Second, ranking cannot recover when the correct SQL is absent from the candidate pool. We propose R3^3-SQL, a Text-to-SQL framework that addresses both issues through unified reward for ranking and resampling. R3^3-SQL first groups candidates by execution result and ranks groups for consistency. To score each group, it combines a pairwise preference across groups with a pointwise utility from the best group rank and size, capturing relative preference, consistency, and candidate quality. To improve candidate recall, R3^3-SQL introduces agentic resampling, which judges the generated candidate pool and selectively resamples when the correct SQL is likely absent. R3^3-SQL achieves 75.03 execution accuracy on BIRD-dev, a new state of the art among methods using models with disclosed sizes, with consistent gains across five benchmarks.

Keywords

Cite

@article{arxiv.2604.25325,
  title  = {R$^3$-SQL: Ranking Reward and Resampling for Text-to-SQL},
  author = {Hojae Han and Yeonseok Jeong and Seung-won Hwang and Zhewei Yao and Yuxiong He},
  journal= {arXiv preprint arXiv:2604.25325},
  year   = {2026}
}

Comments

Accepted by Findings of ACL 2026

R2 v1 2026-07-01T12:38:41.315Z