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.
Create a lesson
Metadata
- Comments
- 42 pages, 8 figures, 15 tables
Related papers
Learning to Speak Before Learning to Read: Conversational Speech Pretraining for Text-to-Speech
Shared title terminologycs.CLBagzhan Karl
CurveK: Throughput-Curve Estimation for Batched Speculative Decoding
Shared title terminologycs.CLGuanghui Wang, Ting Ma, Zhiyong Yang et al.
Adaptive Synchronous Text Stream Refinement via Monotonic Latency-Aware Training
Shared title terminologycs.CLKhanh Le, Kiet Anh Hoang, Bao Nguyen et al.
A Neuro-Symbolic Framework for Knowledge Graph Construction from Text
Shared title terminologycs.CLGandharva Naveen, Abdulsobur Oyewale, Ronit Banerjee et al.
Schema-Mem: Structured and Evolving Memory for Long-term Conversational Knowledge
Shared title terminologycs.CLJiajun Zhu, Kai Zhang, Meikai Bao et al.
Coh-Metrix for German: Development, Validation, and Cross-Linguistic Evaluation of a Multilevel Text Analysis Resource
Shared title terminologycs.CLDaniel Baumartz, Maxim Konca, Alexander Mehler et al.