Computer Science > Computation and Language
Title:SQLConsensus: Confidence Estimation in Text-to-SQL from Structural and Execution Agreement
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.
| Comments: | 42 pages, 8 figures, 15 tables |
|---|---|
| Subjects: | Computation and Language (cs.CL) |
| Cite as: | arXiv:2612.05176 [cs.CL] |
| (or arXiv:2612.05176v1 [cs.CL] for this version) | |
| https://doi.org/10.48550/arXiv.2612.05176 arXiv-issued DOI via DataCite (pending registration) |
Submission history
Access Paper:
- HTML (experimental)
Additional Features
- Audio Summary
Current browse context:
References & Citations
- Google Scholar
- Semantic Scholar
BibTeX formatted citation
Bookmark
Bibliographic and Citation Tools
Code, Data and Media Associated with this Article
Demos
Recommenders and Search Tools
arXivLabs: experimental projects with community collaborators
arXivLabs is a framework that allows collaborators to develop and share new arXiv features directly on our website.
Both individuals and organizations that work with arXivLabs have embraced and accepted our values of openness, community, excellence, and user data privacy. arXiv is committed to these values and only works with partners that adhere to them.
Have an idea for a project that will add value for arXiv's community? Learn more about arXivLabs.