SQLConsensus: Confidence Estimation in Text-to-SQL from Structural and Execution Agreement

While large language models (LLMs) translate natural language questions into Structured Query Language (SQL) with strong accuracy, an incorrect query often executes without error and returns results that users cannot distinguish from correct ones. Reliable deployment thus requires flagging uncertain outputs for review. We address confidence estimation for Text-to-SQL, the task of assigning each generated query a score that reflects how likely it is to answer the question. Existing estimators derive the score from agreement among generated queries but measure it on a single side, either the recurrence of their clauses or their execution results. Clauses that recur in queries returning different results can still raise confidence in an incorrect prediction, and identical results on one database do not show that two queries reach them in the same way. To overcome these limitations, we propose SQLConsensus, which estimates the confidence from both structure and execution, comparing the clause forms of the generated queries only among those that return the result of the prediction. Across four LLMs on two general-domain benchmarks and one clinical-domain benchmark with two databases, SQLConsensus improves the area under the receiver operating characteristic curve (AUROC) over the strongest baseline by 7.0 points on average and makes the fewest errors among its 10% most confident queries in fourteen of the sixteen settings. Analyses show that removing either structure or execution lowers the mean AUROC.

Authors

Institutions

Publication Details

Journal
arXiv
Published
2026-12-03
Primary Topic
Natural Language Processing Techniques
Type
preprint
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
NOV
preprint

SQLConsensus: Confidence Estimation in Text-to-SQL from Structural and Execution Agreement

Mujeen Sung, 최동희, Yongbin Choi, Jaeyun Park
arXiv
Natural Language Processing Techniques
preprint

SQLConsensus: Confidence Estimation in Text-to-SQL from Structural and Execution Agreement

Mujeen Sung, 최동희, Yongbin Choi, Jaeyun Park
preprint en

Abstract

While large language models (LLMs) translate natural language questions into Structured Query Language (SQL) with strong accuracy, an incorrect query often executes without error and returns results that users cannot distinguish from correct ones. Reliable deployment thus requires flagging uncertain outputs for review. We address confidence estimation for Text-to-SQL, the task of assigning each generated query a score that reflects how likely it is to answer the question. Existing estimators derive the score from agreement among generated queries but measure it on a single side, either the recurrence of their clauses or their execution results. Clauses that recur in queries returning different results can still raise confidence in an incorrect prediction, and identical results on one database do not show that two queries reach them in the same way. To overcome these limitations, we propose SQLConsensus, which estimates the confidence from both structure and execution, comparing the clause forms of the generated queries only among those that return the result of the prediction. Across four LLMs on two general-domain benchmarks and one clinical-domain benchmark with two databases, SQLConsensus improves the area under the receiver operating characteristic curve (AUROC) over the strongest baseline by 7.0 points on average and makes the fewest errors among its 10% most confident queries in fourteen of the sixteen settings. Analyses show that removing either structure or execution lowers the mean AUROC.

arXiv
Kyung Hee University (KR)
Natural Language Processing Techniques
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Laika access coming soon