R3-SQL: Ranking Reward and Resampling for Text-to-SQL

Hojae Han, Yeonseok Jeong, Seung-won Hwang, Zhewei Yao, Yuxiong He


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 -SQL, a Text-to-SQL framework that addresses both issues through unified reward for ranking and resampling. R3 -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 -SQL introduces agentic resampling, which judges the generated candidate pool and selectively resamples when the correct SQL is likely absent. R3 -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.
Anthology ID:
2026.findings-acl.2146
Volume:
Findings of the Association for Computational Linguistics: ACL 2026
Month:
July
Year:
2026
Address:
San Diego, California, United States
Editors:
Maria Liakata, Viviane P. Moreira, Jiajun Zhang, David Jurgens
Venue:
Findings
SIG:
Publisher:
Association for Computational Linguistics
Note:
Pages:
43257–43275
Language:
URL:
https://preview.aclanthology.org/ingest-acl/2026.findings-acl.2146/
DOI:
Bibkey:
Cite (ACL):
Hojae Han, Yeonseok Jeong, Seung-won Hwang, Zhewei Yao, and Yuxiong He. 2026. R3-SQL: Ranking Reward and Resampling for Text-to-SQL. In Findings of the Association for Computational Linguistics: ACL 2026, pages 43257–43275, San Diego, California, United States. Association for Computational Linguistics.
Cite (Informal):
R3-SQL: Ranking Reward and Resampling for Text-to-SQL (Han et al., Findings 2026)
Copy Citation:
PDF:
https://preview.aclanthology.org/ingest-acl/2026.findings-acl.2146.pdf
Checklist:
 2026.findings-acl.2146.checklist.pdf