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,…
- arXiv
- 2612.05176
- Authors
- Jaeyun Park, Yongbin Choi, Donghee Choi, Mujeen Sung
- Categories
- cs.CL