Benchmarking and Improving Text-to-SQL Generation under Ambiguity
Not on the map. Why?
Abstract (arXiv)
Research in Text-to-SQL conversion has been largely benchmarked against datasets where each text query corresponds to one correct SQL. However, natural language queries over real-life databases frequently involve significant ambiguity about the intended SQL due to overlapping schema names and multiple confusing relationship paths. To bridge this gap, we develop a novel benchmark called AmbiQT with over 3000 examples where each text is interpretable as two plausible SQLs due to lexical and/or structural ambiguity. When faced with ambiguity, an ideal top-k decoder should generate all valid interpretations for possible disambiguation by the user. We evaluate several Text-to-SQL systems and decoding algorithms, including those employing state-of-the-art LLMs, and find them to be far from this ideal. The primary reason is that the prevalent beam search algorithm and its variants, treat SQL queries as a string and produce unhelpful token-level diversity in the top-k. We propose LogicalBeam, a new decoding algorithm that navigates the SQL logic space using a blend of plan-based template generation and constrained infilling. Counterfactually generated plans diversify templates while in-filling with a beam-search that branches solely on schema names provides value diversity. LogicalBeam is up to 2.5 times more effective than state-of-the-art models at generating all candidate SQLs in the top-k ranked outputs. It also enhances the top-5 Exact and Execution Match Accuracies on SPIDER and Kaggle DBQA.
Key facts. Cited by 34 papers in the map (data through 14 Oct 2026). Builds on 30 of its 55 references that are in the map. First posted on arXiv 20 Oct 2023.
Builds on
30 of 55 references.
References · 30
- 2021Evaluating Large Language Models Trained on Codecited by 8,320
- 2019The Curious Case of Neural Text Degenerationcited by 2,916
- 2018Spider: A Large-Scale Human-Labeled Dataset for Complex and Cross-Domain Semantic Parsing and Text-to-SQL Taskcited by 1,139
- 2015A Diversity-Promoting Objective Function for Neural Conversation Modelscited by 1,077
- 2018Adafactor: Adaptive Learning Rates with Sublinear Memory Costcited by 905
- 2023DIN-SQL: Decomposed In-Context Learning of Text-to-SQL with Self-Correctioncited by 477
- 2019RAT-SQL: Relation-Aware Schema Encoding and Linking for Text-to-SQL Parserscited by 424
- 2021PICARD: Parsing Incrementally for Constrained Auto-Regressive Decoding from Language Modelscited by 411
- 2023RESDSQL: Decoupling Schema Linking and Skeleton Parsing for Text-to-SQLcited by 195
- 2022Truncation Sampling as Language Model Desmoothingcited by 123
- 2023A comprehensive evaluation of ChatGPT's zero-shot Text-to-SQL capabilitycited by 119
- 2021KaggleDBQA: Realistic Evaluation of Text-to-SQL Parserscited by 106
18 more
- 2020SmBoP: Semi-autoregressive Bottom-up Semantic Parsingcited by 97
- 2021Natural SQL: Making SQL Easier to Infer from Natural Language Specificationscited by 68
- 2018Learning Neural Templates for Text Generationcited by 61
- 2023Dr.Spider: A Diagnostic Evaluation Benchmark towards Text-to-SQL Robustnesscited by 53
- 2020Speak to your Parser: Interactive Text-to-SQL with Natural Language Feedbackcited by 44
- 2021Text-to-SQL in the Wild: A Naturally-Occurring Dataset Based on Stack Exchange Datacited by 43
- 2016Mutual Information and Diverse Decoding Improve Neural Machine Translationcited by 35
- 2021NL-EDIT: Correcting semantic parse errors through natural language interactioncited by 33
- 2022A Well-Composed Text is Half Done! Composition Sampling for Diverse Conditional Generationcited by 28
- 2022Tackling Ambiguity with Images: Improved Multimodal Machine Translation and Contrastive Evaluationcited by 26
- 2022N-Best Hypotheses Reranking for Text-To-SQL Systemscited by 19
- 2020DuoRAT: Towards Simpler Text-to-SQL Modelscited by 17
- 2023Interactive-Chain-Prompting: Ambiguity Resolution for Crosslingual Conditional Generation with Interactioncited by 16
- 2023Data Commonscited by 9
- 2022T5QL: Taming language models for SQL generationcited by 8
- 2022Diverse Parallel Data Synthesis for Cross-Database Adaptation of Text-to-SQL Parserscited by 7
- 2022Know What I don't Know: Handling Ambiguous and Unanswerable Questions for Text-to-SQLcited by 6
- 2022TempLM: Distilling Language Models into Template-Based Generatorscited by 4
Built on by
Citing papers per year: 2024: 9; 2025: 12; 2026: 13.
34 papers.
Sort:
By area:
- 2024A Survey of Text-to-SQL in the Era of LLMs: Where are we, and where are we going?cited by 56
- 2024AMBROSIA: A Benchmark for Parsing Ambiguous Questions into Database Queriescited by 35
- 2024PRACTIQ: A Practical Conversational Text-to-SQL dataset with Ambiguous and Unanswerable Queriescited by 19
- 2025BIRD-INTERACT: Re-imagining Text-to-SQL Evaluation for Large Language Models via Lens of Dynamic Interactionscited by 19
- 2025Understanding, Detecting, and Repairing Real-World In-Context-Learning-Based Text-to-SQL Errorscited by 14
- 2025Disambiguate First, Parse Later: Generating Interpretations for Ambiguity Resolution in Semantic Parsingcited by 13
- 2024DocCGen: Document-based Controlled Code Generationcited by 11
- 2025AmbiSQL: Interactive Ambiguity Detection and Resolution for Text-to-SQLcited by 11
- 2024AmbigNLG: Addressing Task Ambiguity in Instruction for NLGcited by 10
- 2024Text-to-SQL Calibration: No Need to Ask -- Just Rescale Model Probabilitiescited by 7
- 2026Ambig-DS: A Benchmark for Task-Framing Ambiguity in Data-Science Agentscited by 5
- 2025ODIN: A NL2SQL Recommender to Handle Schema Ambiguitycited by 4
22 more
- 2025Exploring the Landscape of Text-to-SQL with Large Language Models: Progresses, Challenges and Opportunitiescited by 4
- 2024Mastering the Craft of Data Synthesis for CodeLLMscited by 3
- 2024Evaluating and Enhancing LLMs for Multi-turn Text-to-SQL with Multiple Question Typescited by 3
- 2025SQaLe: A Large Text-to-SQL Corpus Grounded in Real Schemascited by 3
- 2025Toward Real-World Table Agents: Capabilities, Workflows, and Design Principles for LLM-based Table Intelligencecited by 2
- 2025Evaluating NL2SQL via SQL2NLcited by 2
- 2025Rethinking Text-to-SQL: Dynamic Multi-turn SQL Interaction for Real-world Database Explorationcited by 2
- 2026CLARITY: A Framework and Benchmark for Conversational Language Ambiguity and Unanswerability in Interactive NL2SQL Systemscited by 2
- 2024KeyInst: Keyword Instruction for Improving SQL Formulation in Text-to-SQLcited by 1
- 2025Identifying & Interactively Refining Ambiguous User Goals for Data Visualization Code Generationcited by 1
- 2026ODUTQA-MDC: A Task for Open-Domain Underspecified Tabular QA with Multi-turn Dialogue-based Clarificationcited by 1
- 2026EGREFINE: An Execution-Grounded Optimization Framework for Text-to-SQL Schema Refinementcited by 1
- 2026EviLink: Multi-Path Schema Linking with Uncertainty-Guided Evidence Acquisition for Large-Scale Text-to-SQLcited by 1
- 2026Business Truth, not SQL Accuracy: A Rule-Gated 7B Analytics Agent Outperforms a Direct-Prompted 32B Baselinecited by 1
- 2025AmbiGraph-Eval: Can LLMs Effectively Handle Ambiguous Graph Queries?cited by 0
- 2026PleaSQLarify: Visual Pragmatic Repair for Natural Language Database Queryingcited by 0
- 2026Reliable Answers for Recurring Questions: Boosting Text-to-SQL Accuracy with Template Constrained Decodingcited by 0
- 2026Evaluating Chinese Ambiguity Understanding in Large Language Modelscited by 0
- 2026Beyond Static Rules: Automated Discovery of Latent Vulnerabilities in Text-to-SQLcited by 0
- 2026Beyond Correctness: Resolving Underspecification in Agentic Text-to-SQLcited by 0
- 2026Aligning Faithfulness for Theory-Scale Autoformalizationcited by 0
- 2026What Is a Clarification? Estimating Model-Dependent Input Ambiguitycited by 0
- 2026What Is a Clarification? Estimating Model-Dependent Input Ambiguity14 Oct 2026
- 2026Aligning Faithfulness for Theory-Scale Autoformalization13 Oct 2026
- 2026Beyond Correctness: Resolving Underspecification in Agentic Text-to-SQL2 Oct 2026
- 2026Business Truth, not SQL Accuracy: A Rule-Gated 7B Analytics Agent Outperforms a Direct-Prompted 32B Baseline10 Aug 2026
- 2026Beyond Static Rules: Automated Discovery of Latent Vulnerabilities in Text-to-SQL4 Jul 2026
- 2026EviLink: Multi-Path Schema Linking with Uncertainty-Guided Evidence Acquisition for Large-Scale Text-to-SQL28 May 2026
- 2026Evaluating Chinese Ambiguity Understanding in Large Language Models15 May 2026
- 2026Ambig-DS: A Benchmark for Task-Framing Ambiguity in Data-Science Agents10 May 2026
- 2026EGREFINE: An Execution-Grounded Optimization Framework for Text-to-SQL Schema Refinement1 May 2026
- 2026Reliable Answers for Recurring Questions: Boosting Text-to-SQL Accuracy with Template Constrained Decoding30 Apr 2026
- 2026CLARITY: A Framework and Benchmark for Conversational Language Ambiguity and Unanswerability in Interactive NL2SQL Systems24 Apr 2026
- 2026ODUTQA-MDC: A Task for Open-Domain Underspecified Tabular QA with Multi-turn Dialogue-based Clarification11 Apr 2026
22 more
- 2026PleaSQLarify: Visual Pragmatic Repair for Natural Language Database Querying2 Mar 2026
- 2025SQaLe: A Large Text-to-SQL Corpus Grounded in Real Schemas16 Dec 2025
- 2025Rethinking Text-to-SQL: Dynamic Multi-turn SQL Interaction for Real-world Database Exploration30 Oct 2025
- 2025Identifying & Interactively Refining Ambiguous User Goals for Data Visualization Code Generation10 Oct 2025
- 2025BIRD-INTERACT: Re-imagining Text-to-SQL Evaluation for Large Language Models via Lens of Dynamic Interactions6 Oct 2025
- 2025Evaluating NL2SQL via SQL2NL4 Sep 2025
- 2025AmbiSQL: Interactive Ambiguity Detection and Resolution for Text-to-SQL21 Aug 2025
- 2025AmbiGraph-Eval: Can LLMs Effectively Handle Ambiguous Graph Queries?13 Aug 2025
- 2025Toward Real-World Table Agents: Capabilities, Workflows, and Design Principles for LLM-based Table Intelligence14 Jul 2025
- 2025Exploring the Landscape of Text-to-SQL with Large Language Models: Progresses, Challenges and Opportunities28 May 2025
- 2025ODIN: A NL2SQL Recommender to Handle Schema Ambiguity25 May 2025
- 2025Disambiguate First, Parse Later: Generating Interpretations for Ambiguity Resolution in Semantic Parsing25 Feb 2025
- 2025Understanding, Detecting, and Repairing Real-World In-Context-Learning-Based Text-to-SQL Errors16 Jan 2025
- 2024Evaluating and Enhancing LLMs for Multi-turn Text-to-SQL with Multiple Question Types21 Dec 2024
- 2024Text-to-SQL Calibration: No Need to Ask -- Just Rescale Model Probabilities23 Nov 2024
- 2024KeyInst: Keyword Instruction for Improving SQL Formulation in Text-to-SQL18 Oct 2024
- 2024Mastering the Craft of Data Synthesis for CodeLLMs16 Oct 2024
- 2024PRACTIQ: A Practical Conversational Text-to-SQL dataset with Ambiguous and Unanswerable Queries14 Oct 2024
- 2024A Survey of Text-to-SQL in the Era of LLMs: Where are we, and where are we going?9 Aug 2024
- 2024AMBROSIA: A Benchmark for Parsing Ambiguous Questions into Database Queries27 Jun 2024
- 2024DocCGen: Document-based Controlled Code Generation17 Jun 2024
- 2024AmbigNLG: Addressing Task Ambiguity in Instruction for NLG27 Feb 2024
- 2026Ambig-DS: A Benchmark for Task-Framing Ambiguity in Data-Science Agentscited by 5
- 2025Toward Real-World Table Agents: Capabilities, Workflows, and Design Principles for LLM-based Table Intelligencecited by 2
- 2026Business Truth, not SQL Accuracy: A Rule-Gated 7B Analytics Agent Outperforms a Direct-Prompted 32B Baselinecited by 1
- 2026Beyond Correctness: Resolving Underspecification in Agentic Text-to-SQLcited by 0
- 2026Beyond Correctness: Resolving Underspecification in Agentic Text-to-SQL2 Oct 2026
- 2026Business Truth, not SQL Accuracy: A Rule-Gated 7B Analytics Agent Outperforms a Direct-Prompted 32B Baseline10 Aug 2026
- 2026Ambig-DS: A Benchmark for Task-Framing Ambiguity in Data-Science Agents10 May 2026
- 2025Toward Real-World Table Agents: Capabilities, Workflows, and Design Principles for LLM-based Table Intelligence14 Jul 2025
- 2024Mastering the Craft of Data Synthesis for CodeLLMscited by 3
- 2024Mastering the Craft of Data Synthesis for CodeLLMs16 Oct 2024
- 2024A Survey of Text-to-SQL in the Era of LLMs: Where are we, and where are we going?cited by 56
- 2024AMBROSIA: A Benchmark for Parsing Ambiguous Questions into Database Queriescited by 35
- 2024PRACTIQ: A Practical Conversational Text-to-SQL dataset with Ambiguous and Unanswerable Queriescited by 19
- 2025BIRD-INTERACT: Re-imagining Text-to-SQL Evaluation for Large Language Models via Lens of Dynamic Interactionscited by 19
- 2025Understanding, Detecting, and Repairing Real-World In-Context-Learning-Based Text-to-SQL Errorscited by 14
- 2025Disambiguate First, Parse Later: Generating Interpretations for Ambiguity Resolution in Semantic Parsingcited by 13
- 2024DocCGen: Document-based Controlled Code Generationcited by 11
- 2025AmbiSQL: Interactive Ambiguity Detection and Resolution for Text-to-SQLcited by 11
- 2024AmbigNLG: Addressing Task Ambiguity in Instruction for NLGcited by 10
- 2024Text-to-SQL Calibration: No Need to Ask -- Just Rescale Model Probabilitiescited by 7
- 2025ODIN: A NL2SQL Recommender to Handle Schema Ambiguitycited by 4
- 2025Exploring the Landscape of Text-to-SQL with Large Language Models: Progresses, Challenges and Opportunitiescited by 4
12 most cited of 28 All 28 (JSON)
- 2026What Is a Clarification? Estimating Model-Dependent Input Ambiguity14 Oct 2026
- 2026Aligning Faithfulness for Theory-Scale Autoformalization13 Oct 2026
- 2026Beyond Static Rules: Automated Discovery of Latent Vulnerabilities in Text-to-SQL4 Jul 2026
- 2026EviLink: Multi-Path Schema Linking with Uncertainty-Guided Evidence Acquisition for Large-Scale Text-to-SQL28 May 2026
- 2026Evaluating Chinese Ambiguity Understanding in Large Language Models15 May 2026
- 2026EGREFINE: An Execution-Grounded Optimization Framework for Text-to-SQL Schema Refinement1 May 2026
- 2026Reliable Answers for Recurring Questions: Boosting Text-to-SQL Accuracy with Template Constrained Decoding30 Apr 2026
- 2026CLARITY: A Framework and Benchmark for Conversational Language Ambiguity and Unanswerability in Interactive NL2SQL Systems24 Apr 2026
- 2026ODUTQA-MDC: A Task for Open-Domain Underspecified Tabular QA with Multi-turn Dialogue-based Clarification11 Apr 2026
- 2026PleaSQLarify: Visual Pragmatic Repair for Natural Language Database Querying2 Mar 2026
- 2025SQaLe: A Large Text-to-SQL Corpus Grounded in Real Schemas16 Dec 2025
- 2025Identifying & Interactively Refining Ambiguous User Goals for Data Visualization Code Generation10 Oct 2025
12 newest of 28 All 28 (JSON)