Calibrating LLMs for Text-to-SQL Parsing by Leveraging Sub-clause Frequencies
Not on the map. Why?
Abstract (arXiv)
While large language models (LLMs) achieve strong performance on text-to-SQL parsing, they sometimes exhibit unexpected failures in which they are confidently incorrect. Building trustworthy text-to-SQL systems thus requires eliciting reliable uncertainty measures from the LLM. In this paper, we study the problem of providing a calibrated confidence score that conveys the likelihood of an output query being correct. Our work is the first to establish a benchmark for post-hoc calibration of LLM-based text-to-SQL parsing. In particular, we show that Platt scaling, a canonical method for calibration, provides substantial improvements over directly using raw model output probabilities as confidence scores. Furthermore, we propose a method for text-to-SQL calibration that leverages the structured nature of SQL queries to provide more granular signals of correctness, named "sub-clause frequency" (SCF) scores. Using multivariate Platt scaling (MPS), our extension of the canonical Platt scaling technique, we combine individual SCF scores into an overall accurate and calibrated score. Empirical evaluation on two popular text-to-SQL datasets shows that our approach of combining MPS and SCF yields further improvements in calibration and the related task of error detection over traditional Platt scaling.
Key facts. Cited by 5 papers in the map (data through 14 Oct 2026). Builds on 37 of its 54 references that are in the map. First posted on arXiv 27 May 2025.
Builds on
37 of 54 references.
References · 37
- 2024The Llama 3 Herd of Modelscited by 14,715
- 2022Self-Consistency Improves Chain of Thought Reasoning in Language Modelscited by 5,708
- 2017On Calibration of Modern Neural Networkscited by 4,960
- 2019The Curious Case of Neural Text Degenerationcited by 2,916
- 2022Language Models (Mostly) Know What They Knowcited by 1,856
- 2018Spider: A Large-Scale Human-Labeled Dataset for Complex and Cross-Domain Semantic Parsing and Text-to-SQL Taskcited by 1,139
- 2023Can LLMs Express Their Uncertainty? An Empirical Evaluation of Confidence Elicitation in LLMscited by 974
- 2023Just Ask for Calibration: Strategies for Eliciting Calibrated Confidence Scores from Language Models Fine-Tuned with Human Feedbackcited by 812
- 2022Teaching Models to Express Their Uncertainty in Wordscited by 751
- 2023Can LLM Already Serve as A Database Interface? A BIg Bench for Large-Scale Database Grounded Text-to-SQLscited by 688
- 2017Seq2SQL: Generating Structured Queries from Natural Language using Reinforcement Learningcited by 687
- 2023DIN-SQL: Decomposed In-Context Learning of Text-to-SQL with Self-Correctioncited by 477
25 more
- 2019Measuring Calibration in Deep Learningcited by 446
- 2020How Can We Know When Language Models Know? On the Calibration of Language Models for Question Answeringcited by 445
- 2021PICARD: Parsing Incrementally for Constrained Auto-Regressive Decoding from Language Modelscited by 411
- 2023Text-to-SQL Empowered by Large Language Models: A Benchmark Evaluationcited by 385
- 2019Beyond temperature scaling: Obtaining well-calibrated multiclass probabilities with Dirichlet calibrationcited by 364
- 2017Beam Search Strategies for Neural Machine Translationcited by 232
- 2023A Categorical Archive of ChatGPT Failurescited by 168
- 2024Language Models with Conformal Factuality Guaranteescited by 131
- 2024Relying on the Unreliable: The Impact of Language Models' Reluctance to Express Uncertaintycited by 106
- 2017Learning a Neural Semantic Parser from User Feedbackcited by 99
- 2020Multivariate Confidence Calibration for Object Detectioncited by 98
- 2020Distribution-free binary classification: prediction sets, confidence intervals and calibrationcited by 79
- 2023Exploring Chain-of-Thought Style Prompting for Text-to-SQLcited by 69
- 2019Calibration of Encoder Decoder Models for Neural Machine Translationcited by 68
- 2020On the Inference Calibration of Neural Machine Translationcited by 61
- 2021Top-label calibration and multiclass-to-binary reductionscited by 46
- 2024Multicalibration for Confidence Scoring in LLMscited by 46
- 2019Model-based Interactive Semantic Parsing: A Unified Framework and A Text-to-SQL Case Studycited by 40
- 2018Confidence Modeling for Neural Semantic Parsingcited by 33
- 2022Calibrated Interpretation: Confidence Estimation in Semantic Parsingcited by 33
- 2023Improving Generalization in Language Model-Based Text-to-SQL Semantic Parsing: Two Simple Semantic Boundary-Based Techniquescited by 24
- 2023Text-to-SQL Error Correction with Language Models of Codecited by 21
- 2024Multi-group Uncertainty Quantification for Long-form Text Generationcited by 13
- 2023Error Detection for Text-to-SQL Semantic Parsingcited by 12
- 2023A Multilingual Translator to SQL with Database Schema Pruning to Improve Self-Attentioncited by 3
Built on by
Citing papers per year: 2025: 2; 2026: 3.
5 papers.
- 2025STARQA: A Question Answering Dataset for Complex Analytical Reasoning over Structured Databasescited by 2
- 2025Node-Level Uncertainty Estimation in LLM-Generated SQLcited by 2
- 2026Metadata Reconstruction from Values Alone: Recovering Column Semantics in Undocumented Warehousescited by 1
- 2026ReliableTableQA:How Much Supervision Does Reliability Annotation Need?cited by 0
- 2026Certified Against Which Oracle? Execution Labels Set the Reported Risk of Conformal Abstention for Text-to-SQLcited by 0
- 2026Certified Against Which Oracle? Execution Labels Set the Reported Risk of Conformal Abstention for Text-to-SQL22 Sep 2026
- 2026Metadata Reconstruction from Values Alone: Recovering Column Semantics in Undocumented Warehouses8 Aug 2026
- 2026ReliableTableQA:How Much Supervision Does Reliability Annotation Need?10 Jul 2026
- 2025Node-Level Uncertainty Estimation in LLM-Generated SQL17 Nov 2025
- 2025STARQA: A Question Answering Dataset for Complex Analytical Reasoning over Structured Databases23 Sep 2025