mlsanityData to 7 Oct 2026

TrustSQL: Benchmarking Text-to-SQL Reliability with Penalty-Based Scoring

arXiv 2403.15879 ↗First posted 23 Mar 2024cs.AIcited by 15

Not on the map. Why?

Abstract (arXiv)

Text-to-SQL enables users to interact with databases using natural language, simplifying the retrieval and synthesis of information. Despite the remarkable success of large language models (LLMs) in translating natural language questions into SQL queries, widespread deployment remains limited due to two primary challenges. First, the effective use of text-to-SQL models depends on users' understanding of the model's capabilities-the scope of questions the model can correctly answer. Second, the absence of abstention mechanisms can lead to incorrect SQL generation going unnoticed, thereby undermining trust in the model's output. To enable wider deployment, it is crucial to address these challenges in model design and enhance model evaluation to build trust in the model's output. To this end, we introduce TrustSQL, a novel comprehensive benchmark designed to evaluate text-to-SQL reliability-defined as a model's ability to correctly handle any type of input question by generating correct SQL queries for feasible questions and abstaining from generating infeasible ones (e.g., due to schema incompatibility or functionalities beyond SQL). We evaluate existing methods using a novel penalty-based scoring metric with two modeling approaches: (1) pipeline-based methods combining SQL generators with infeasible question detectors and SQL error detectors for abstention; and (2) unified methods using a single model for the entire task. Our experimental results reveal that achieving high scores under severe penalties requires significant effort and provide a new perspective on developing text-to-SQL models for safer deployment. TrustSQL is available at https://github.com/glee4810/TrustSQL.

Key facts. Cited by 15 papers in the map (data through 7 Oct 2026). Builds on 24 of its 30 references that are in the map. First posted on arXiv 23 Mar 2024.

Builds on

24 of 30 references.

References · 24

  1. 2022Self-Consistency Improves Chain of Thought Reasoning in Language Modelscited by 5,601
  2. 2018A Simple Unified Framework for Detecting Out-of-Distribution Samples and Adversarial Attackscited by 1,472
  3. 2018Spider: A Large-Scale Human-Labeled Dataset for Complex and Cross-Domain Semantic Parsing and Text-to-SQL Taskcited by 1,120
  4. 2023Teaching Large Language Models to Self-Debugcited by 963
  5. 2023Can LLM Already Serve as A Database Interface? A BIg Bench for Large-Scale Database Grounded Text-to-SQLscited by 667
  6. 2021Tabular Data: Deep Learning is Not All You Needcited by 530
  7. 2023DIN-SQL: Decomposed In-Context Learning of Text-to-SQL with Self-Correctioncited by 465
  8. 2021Unsolved Problems in ML Safetycited by 291
  9. 2021A Simple Fix to Mahalanobis Distance for Improving Near-OOD Detectioncited by 206
  10. 2022Out-of-Distribution Detection and Selective Generation for Conditional Language Modelscited by 193
  11. 2021On Hallucination and Predictive Uncertainty in Conditional Language Generationcited by 176
  12. 2018Improving Text-to-SQL Evaluation Methodologycited by 133
12 more
  1. 2021KaggleDBQA: Realistic Evaluation of Text-to-SQL Parserscited by 105
  2. 2022Reliable Visual Question Answering: Abstain Rather Than Answer Incorrectlycited by 86
  3. 2019Out-of-domain Detection for Natural Language Understanding in Dialog Systemscited by 62
  4. 2023How to Prompt LLMs for Text-to-SQL: A Study in Zero-shot, Single-domain, and Cross-domain Settingscited by 57
  5. 2021Text-to-SQL in the Wild: A Naturally-Occurring Dataset Based on Stack Exchange Datacited by 43
  6. 2023EHRSQL: A Practical Text-to-SQL Benchmark for Electronic Health Recordscited by 42
  7. 2022Calibrated Interpretation: Confidence Estimation in Semantic Parsingcited by 33
  8. 2021ConditionalQA: A Complex Reading Comprehension Dataset with Conditional Answerscited by 29
  9. 2022Towards Robustness of Text-to-SQL Models Against Natural and Realistic Adversarial Table Perturbationcited by 28
  10. 2020Did You Ask a Good Question? A Cross-Domain Question Intention Classification Benchmark for Text-to-SQLcited by 16
  11. 2021OodGAN: Generative Adversarial Network for Out-of-Domain Data Generationcited by 15
  12. 2022Uncertainty-Aware Text-to-Program for Question Answering on Structured Electronic Health Recordscited by 4

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2024: 3; 2025: 5; 2026: 7.

15 papers.

Sort:

By area:

  1. 2025Confidence Estimation for Error Detection in Text-to-SQL Systemscited by 10
  2. 2025Tabular Data Understanding with LLMs: A Survey of Recent Advances and Challengescited by 10
  3. 2024Overview of the EHRSQL 2024 Shared Task on Reliable Text-to-SQL Modeling on Electronic Health Recordscited by 9
  4. 2024ProbGate at EHRSQL 2024: Enhancing SQL Query Generation Accuracy through Probabilistic Threshold Filtering and Error Handlingcited by 6
  5. 2024QDA-SQL: Questions Enhanced Dialogue Augmentation for Multi-Turn Text-to-SQLcited by 5
  6. 2025SAFENLIDB: A Privacy-Preserving Safety Alignment Framework for LLM-based Natural Language Database Interfacescited by 4
  7. 2025M3: Conversational LLMs Simplify Secure Clinical Data Access, Understanding, and Analysiscited by 3
  8. 2026Business Truth, not SQL Accuracy: A Rule-Gated 7B Analytics Agent Outperforms a Direct-Prompted 32B Baselinecited by 1
  9. 2026Never the Number: Structural Abstention for AI Systems Whose Answers Are Consumed as Factcited by 1
  10. 2025SCARE: A Benchmark for SQL Correction and Question Answerability Classification for Reliable EHR Question Answeringcited by 0
  11. 2026ReliableTableQA:How Much Supervision Does Reliability Annotation Need?cited by 0
  12. 2026Bounded Semantic Planning and Deterministic Compilation for Reliable Enterprise Text-to-SQLcited by 0
3 more
  1. 2026TrustDABench: Benchmarking Reliability and Robustness of LLMs for Structured Data Analysiscited by 0
  2. 2026The Stochastic Shift: A New Evaluation Paradigm for Text-to-SQL with AI Operatorscited by 0
  3. 2026Certified Against Which Oracle? Execution Labels Set the Reported Risk of Conformal Abstention for Text-to-SQLcited by 0