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

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Han, Hojae, Jeong, Yeonseok, Hwang, Seung-won, Yao, Zhewei, He, Yuxiong
Format: Preprint
Published: 2026
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866911628074680320
author Han, Hojae
Jeong, Yeonseok
Hwang, Seung-won
Yao, Zhewei
He, Yuxiong
author_facet Han, Hojae
Jeong, Yeonseok
Hwang, Seung-won
Yao, Zhewei
He, Yuxiong
contents 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 R$^3$-SQL, a Text-to-SQL framework that addresses both issues through unified reward for ranking and resampling. R$^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, R$^3$-SQL introduces agentic resampling, which judges the generated candidate pool and selectively resamples when the correct SQL is likely absent. R$^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.
format Preprint
id arxiv_https___arxiv_org_abs_2604_25325
institution arXiv
publishDate 2026
record_format arxiv
spellingShingle R$^3$-SQL: Ranking Reward and Resampling for Text-to-SQL
Han, Hojae
Jeong, Yeonseok
Hwang, Seung-won
Yao, Zhewei
He, Yuxiong
Software Engineering
Artificial Intelligence
Computation and Language
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 R$^3$-SQL, a Text-to-SQL framework that addresses both issues through unified reward for ranking and resampling. R$^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, R$^3$-SQL introduces agentic resampling, which judges the generated candidate pool and selectively resamples when the correct SQL is likely absent. R$^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.
title R$^3$-SQL: Ranking Reward and Resampling for Text-to-SQL
topic Software Engineering
Artificial Intelligence
Computation and Language
url https://arxiv.org/abs/2604.25325