Before Generation, Align it! A Novel and Effective Strategy for Mitigating Hallucinations in Text-to-SQL Generation
Not on the map. Why?
Abstract (arXiv)
Large Language Models (LLMs) driven by In-Context Learning (ICL) have significantly improved the performance of text-to-SQL. Previous methods generally employ a two-stage reasoning framework, namely 1) schema linking and 2) logical synthesis, making the framework not only effective but also interpretable. Despite these advancements, the inherent bad nature of the generalization of LLMs often results in hallucinations, which limits the full potential of LLMs. In this work, we first identify and categorize the common types of hallucinations at each stage in text-to-SQL. We then introduce a novel strategy, Task Alignment (TA), designed to mitigate hallucinations at each stage. TA encourages LLMs to take advantage of experiences from similar tasks rather than starting the tasks from scratch. This can help LLMs reduce the burden of generalization, thereby mitigating hallucinations effectively. We further propose TA-SQL, a text-to-SQL framework based on this strategy. The experimental results and comprehensive analysis demonstrate the effectiveness and robustness of our framework. Specifically, it enhances the performance of the GPT-4 baseline by 21.23% relatively on BIRD dev and it yields significant improvements across six models and four mainstream, complex text-to-SQL benchmarks.
Key facts. Cited by 49 papers in the map (data through 7 Oct 2026). Builds on 37 of its 54 references that are in the map. First posted on arXiv 24 May 2024.
Builds on
37 of 54 references.
References · 37
- 2023GPT-4 Technical Reportcited by 18,132
- 2022Training language models to follow instructions with human feedbackcited by 15,712
- 2019Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformercited by 14,491
- 2022PaLM: Scaling Language Modeling with Pathwayscited by 5,304
- 2013Distributed Representations of Words and Phrases and their Compositionalitycited by 3,462
- 2023Code Llama: Open Foundation Models for Codecited by 2,105
- 2023Mind2Web: Towards a Generalist Agent for the Webcited by 1,210
- 2024DeepSeek-Coder: When the Large Language Model Meets Programming -- The Rise of Code Intelligencecited by 1,154
- 2018Spider: A Large-Scale Human-Labeled Dataset for Complex and Cross-Domain Semantic Parsing and Text-to-SQL Taskcited by 1,120
- 2021Retrieval Augmentation Reduces Hallucination in Conversationcited by 691
- 2023Can LLM Already Serve as A Database Interface? A BIg Bench for Large-Scale Database Grounded Text-to-SQLscited by 667
- 2022Decomposed Prompting: A Modular Approach for Solving Complex Taskscited by 554
25 more
- 2023DIN-SQL: Decomposed In-Context Learning of Text-to-SQL with Self-Correctioncited by 465
- 2019RAT-SQL: Relation-Aware Schema Encoding and Linking for Text-to-SQL Parserscited by 420
- 2021PICARD: Parsing Incrementally for Constrained Auto-Regressive Decoding from Language Modelscited by 402
- 2023Text-to-SQL Empowered by Large Language Models: A Benchmark Evaluationcited by 378
- 2023RESDSQL: Decoupling Schema Linking and Skeleton Parsing for Text-to-SQLcited by 191
- 2023C3: Zero-shot Text-to-SQL with ChatGPTcited by 159
- 2020Compositional Generalization and Natural Language Variation: Can a Semantic Parsing Approach Handle Both?cited by 147
- 2021LGESQL: Line Graph Enhanced Text-to-SQL Model with Mixed Local and Non-Local Relationscited by 119
- 2021Neural Path Hunter: Reducing Hallucination in Dialogue Systems via Path Groundingcited by 106
- 2023Graphix-T5: Mixing Pre-Trained Transformers with Graph-Aware Layers for Text-to-SQL Parsingcited by 93
- 2021Exploring Underexplored Limitations of Cross-Domain Text-to-SQL Generalizationcited by 92
- 2024Small LLMs Are Weak Tool Learners: A Multi-LLM Agentcited by 92
- 2022RASAT: Integrating Relational Structures into Pretrained Seq2Seq Model for Text-to-SQLcited by 85
- 2018TypeSQL: Knowledge-based Type-Aware Neural Text-to-SQL Generationcited by 81
- 2021Increasing Faithfulness in Knowledge-Grounded Dialogue with Controllable Featurescited by 74
- 2021Natural SQL: Making SQL Easier to Infer from Natural Language Specificationscited by 66
- 2022When Language Model Meets Private Librarycited by 54
- 2024Middleware for LLMs: Tools Are Instrumental for Language Agents in Complex Environmentscited by 39
- 2022Proton: Probing Schema Linking Information from Pre-trained Language Models for Text-to-SQL Parsingcited by 30
- 2021Awakening Latent Grounding from Pretrained Language Models for Semantic Parsingcited by 28
- 2021Improving Text-to-SQL with Schema Dependency Learningcited by 25
- 2017An Encoder-Decoder Framework Translating Natural Language to Database Queriescited by 23
- 2023Explicit Planning Helps Language Models in Logical Reasoningcited by 12
- 2023An Investigation of LLMs' Inefficacy in Understanding Converse Relationscited by 9
- 2023Drilling Down into the Discourse Structure with LLMs for Long Document Question Answeringcited by 8
Built on by
Citing papers per year: 2024: 13; 2025: 23; 2026: 13.
49 papers.
Sort:
By area:
- 2024Next-Generation Database Interfaces: A Survey of LLM-based Text-to-SQLcited by 118
- 2024The Death of Schema Linking? Text-to-SQL in the Age of Well-Reasoned Language Modelscited by 67
- 2024A Survey of Text-to-SQL in the Era of LLMs: Where are we, and where are we going?cited by 54
- 2024RSL-SQL: Robust Schema Linking in Text-to-SQL Generationcited by 51
- 2025XiYan-SQL: A Novel Multi-Generator Framework For Text-to-SQLcited by 40
- 2024E-SQL: Direct Schema Linking via Question Enrichment in Text-to-SQLcited by 35
- 2024MAGIC: Generating Self-Correction Guideline for In-Context Text-to-SQLcited by 34
- 2025LinkAlign: Scalable Schema Linking for Real-World Large-Scale Multi-Database Text-to-SQLcited by 26
- 2025BIRD-INTERACT: Re-imagining Text-to-SQL Evaluation for Large Language Models via Lens of Dynamic Interactionscited by 17
- 2025SHARE: An SLM-based Hierarchical Action CorREction Assistant for Text-to-SQLcited by 15
- 2025SWE-SQL: Illuminating LLM Pathways to Solve User SQL Issues in Real-World Applicationscited by 15
- 2025Understanding, Detecting, and Repairing Real-World In-Context-Learning-Based Text-to-SQL Errorscited by 14
37 more
- 2026Pervasive Annotation Errors Break Text-to-SQL Benchmarks and Leaderboardscited by 12
- 2024FLEX: Expert-level False-Less EXecution Metric for Reliable Text-to-SQL Benchmarkcited by 11
- 2025ST-Raptor: LLM-Powered Semi-Structured Table Question Answeringcited by 11
- 2025BASE-SQL: A powerful open source Text-To-SQL baseline approachcited by 9
- 2025Knapsack Optimization-based Schema Linking for LLM-based Text-to-SQL Generationcited by 9
- 2025Hallucination by Code Generation LLMs: Taxonomy, Benchmarks, Mitigation, and Challengescited by 9
- 2025ReEx-SQL: Reasoning with Execution-Aware Reinforcement Learning for Text-to-SQLcited by 8
- 2024PTD-SQL: Partitioning and Targeted Drilling with LLMs in Text-to-SQLcited by 7
- 2026APEX-SQL: Talking to the data via Agentic Exploration for Text-to-SQLcited by 7
- 2024Synthetic SQL Column Descriptions and Their Impact on Text-to-SQL Performancecited by 6
- 2024DAC: Decomposed Automation Correction for Text-to-SQLcited by 6
- 2025DB-Explore: Automated Database Exploration and Instruction Synthesis for Text-to-SQLcited by 5
- 2025SING-SQL: A Synthetic Data Generation Framework for In-Domain Text-to-SQL Translationcited by 5
- 2026PV-SQL: Synergizing Database Probing and Rule-based Verification for Text-to-SQL Agentscited by 5
- 2025GenEdit: Compounding Operators and Continuous Improvement to Tackle Text-to-SQL in the Enterprisecited by 4
- 2025Exploring the Landscape of Text-to-SQL with Large Language Models: Progresses, Challenges and Opportunitiescited by 4
- 2025Rethinking Schema Linking: A Context-Aware Bidirectional Retrieval Approach for Text-to-SQLcited by 4
- 2025Pi-SQL: Enhancing Text-to-SQL with Fine-Grained Guidance from Pivot Programming Languagescited by 3
- 2026Semantic Layers for Reliable LLM-Powered Data Analytics: A Paired Benchmark of Accuracy and Hallucination Across Three Frontier Modelscited by 3
- 2024Automating Pharmacovigilance Evidence Generation: Using Large Language Models to Produce Context-Aware SQLcited by 2
- 2024Multi-Turn Interactions for Text-to-SQL with Large Language Modelscited by 2
- 2024Towards Automated Cross-domain Exploratory Data Analysis through Large Language Modelscited by 2
- 2025Feather-SQL: A Lightweight NL2SQL Framework with Dual-Model Collaboration Paradigm for Small Language Modelscited by 2
- 2025Exploring Database Normalization Effects on SQL Generationcited by 2
- 2025LitE-SQL: A Lightweight and Efficient Text-to-SQL Framework with Vector-based Schema Linking and Execution-Guided Self-Correctioncited by 1
- 2026ErrorLLM: Modeling SQL Errors for Text-to-SQL Refinementcited by 1
- 2026NL2SQLBench: A Modular Benchmarking Framework for LLM-Enabled NL2SQL Solutionscited by 1
- 2026Every Step Counts: Step-Level Credit Assignment for Tool-Integrated Text-to-SQLcited by 1
- 2026EviLink: Multi-Path Schema Linking with Uncertainty-Guided Evidence Acquisition for Large-Scale Text-to-SQLcited by 1
- 2025VeriMinder: Mitigating Analytical Vulnerabilities in NL2SQLcited by 0
- 2025X-SQL: Expert Schema Linking and Understanding of Text-to-SQL with Multi-LLMscited by 0
- 2025BAPPA: Benchmarking Agents, Plans, and Pipelines for Automated Text-to-SQL Generationcited by 0
- 2026Agentic DAG-Orchestrated Planner Framework for Multi-Modal, Multi-Hop Question Answering in Hybrid Data Lakescited by 0
- 2026ROSE: An Intent-Centered Evaluation Metric for NL2SQLcited by 0
- 2026SIRIUS-SQL: Anchoring Multi-Candidate Text-to-SQL in Execution Feedbackcited by 0
- 2026DexterSQL: Deep Schema Exploration and Rule-based Correction for Text-to-SQL Generationcited by 0
- 2026LIMIT: Less Is More for Instruction Tuning in Text-to-SQLcited by 0
- 2026LIMIT: Less Is More for Instruction Tuning in Text-to-SQL21 Sep 2026
- 2026DexterSQL: Deep Schema Exploration and Rule-based Correction for Text-to-SQL Generation12 Aug 2026
- 2026SIRIUS-SQL: Anchoring Multi-Candidate Text-to-SQL in Execution Feedback31 May 2026
- 2026EviLink: Multi-Path Schema Linking with Uncertainty-Guided Evidence Acquisition for Large-Scale Text-to-SQL28 May 2026
- 2026Every Step Counts: Step-Level Credit Assignment for Tool-Integrated Text-to-SQL6 May 2026
- 2026Semantic Layers for Reliable LLM-Powered Data Analytics: A Paired Benchmark of Accuracy and Hallucination Across Three Frontier Models28 Apr 2026
- 2026PV-SQL: Synergizing Database Probing and Rule-based Verification for Text-to-SQL Agents19 Apr 2026
- 2026ROSE: An Intent-Centered Evaluation Metric for NL2SQL14 Apr 2026
- 2026NL2SQLBench: A Modular Benchmarking Framework for LLM-Enabled NL2SQL Solutions13 Apr 2026
- 2026Agentic DAG-Orchestrated Planner Framework for Multi-Modal, Multi-Hop Question Answering in Hybrid Data Lakes15 Mar 2026
- 2026ErrorLLM: Modeling SQL Errors for Text-to-SQL Refinement4 Mar 2026
- 2026APEX-SQL: Talking to the data via Agentic Exploration for Text-to-SQL11 Feb 2026
37 more
- 2026Pervasive Annotation Errors Break Text-to-SQL Benchmarks and Leaderboards13 Jan 2026
- 2025BAPPA: Benchmarking Agents, Plans, and Pipelines for Automated Text-to-SQL Generation6 Nov 2025
- 2025Rethinking Schema Linking: A Context-Aware Bidirectional Retrieval Approach for Text-to-SQL16 Oct 2025
- 2025LitE-SQL: A Lightweight and Efficient Text-to-SQL Framework with Vector-based Schema Linking and Execution-Guided Self-Correction10 Oct 2025
- 2025BIRD-INTERACT: Re-imagining Text-to-SQL Evaluation for Large Language Models via Lens of Dynamic Interactions6 Oct 2025
- 2025Exploring Database Normalization Effects on SQL Generation2 Oct 2025
- 2025SING-SQL: A Synthetic Data Generation Framework for In-Domain Text-to-SQL Translation30 Sep 2025
- 2025X-SQL: Expert Schema Linking and Understanding of Text-to-SQL with Multi-LLMs7 Sep 2025
- 2025ST-Raptor: LLM-Powered Semi-Structured Table Question Answering25 Aug 2025
- 2025VeriMinder: Mitigating Analytical Vulnerabilities in NL2SQL23 Jul 2025
- 2025XiYan-SQL: A Novel Multi-Generator Framework For Text-to-SQL7 Jul 2025
- 2025SWE-SQL: Illuminating LLM Pathways to Solve User SQL Issues in Real-World Applications23 Jun 2025
- 2025Pi-SQL: Enhancing Text-to-SQL with Fine-Grained Guidance from Pivot Programming Languages1 Jun 2025
- 2025SHARE: An SLM-based Hierarchical Action CorREction Assistant for Text-to-SQL31 May 2025
- 2025Exploring the Landscape of Text-to-SQL with Large Language Models: Progresses, Challenges and Opportunities28 May 2025
- 2025ReEx-SQL: Reasoning with Execution-Aware Reinforcement Learning for Text-to-SQL19 May 2025
- 2025Hallucination by Code Generation LLMs: Taxonomy, Benchmarks, Mitigation, and Challenges29 Apr 2025
- 2025GenEdit: Compounding Operators and Continuous Improvement to Tackle Text-to-SQL in the Enterprise27 Mar 2025
- 2025LinkAlign: Scalable Schema Linking for Real-World Large-Scale Multi-Database Text-to-SQL24 Mar 2025
- 2025Feather-SQL: A Lightweight NL2SQL Framework with Dual-Model Collaboration Paradigm for Small Language Models22 Mar 2025
- 2025DB-Explore: Automated Database Exploration and Instruction Synthesis for Text-to-SQL6 Mar 2025
- 2025Knapsack Optimization-based Schema Linking for LLM-based Text-to-SQL Generation18 Feb 2025
- 2025BASE-SQL: A powerful open source Text-To-SQL baseline approach15 Feb 2025
- 2025Understanding, Detecting, and Repairing Real-World In-Context-Learning-Based Text-to-SQL Errors16 Jan 2025
- 2024Towards Automated Cross-domain Exploratory Data Analysis through Large Language Models10 Dec 2024
- 2024RSL-SQL: Robust Schema Linking in Text-to-SQL Generation31 Oct 2024
- 2024E-SQL: Direct Schema Linking via Question Enrichment in Text-to-SQL25 Sep 2024
- 2024FLEX: Expert-level False-Less EXecution Metric for Reliable Text-to-SQL Benchmark24 Sep 2024
- 2024PTD-SQL: Partitioning and Targeted Drilling with LLMs in Text-to-SQL21 Sep 2024
- 2024DAC: Decomposed Automation Correction for Text-to-SQL16 Aug 2024
- 2024The Death of Schema Linking? Text-to-SQL in the Age of Well-Reasoned Language Models14 Aug 2024
- 2024Multi-Turn Interactions for Text-to-SQL with Large Language Models9 Aug 2024
- 2024A Survey of Text-to-SQL in the Era of LLMs: Where are we, and where are we going?9 Aug 2024
- 2024Synthetic SQL Column Descriptions and Their Impact on Text-to-SQL Performance8 Aug 2024
- 2024MAGIC: Generating Self-Correction Guideline for In-Context Text-to-SQL18 Jun 2024
- 2024Automating Pharmacovigilance Evidence Generation: Using Large Language Models to Produce Context-Aware SQL15 Jun 2024
- 2024Next-Generation Database Interfaces: A Survey of LLM-based Text-to-SQL12 Jun 2024
- 2024The Death of Schema Linking? Text-to-SQL in the Age of Well-Reasoned Language Modelscited by 67
- 2025SHARE: An SLM-based Hierarchical Action CorREction Assistant for Text-to-SQLcited by 15
- 2025ReEx-SQL: Reasoning with Execution-Aware Reinforcement Learning for Text-to-SQLcited by 8
- 2024PTD-SQL: Partitioning and Targeted Drilling with LLMs in Text-to-SQLcited by 7
- 2024Multi-Turn Interactions for Text-to-SQL with Large Language Modelscited by 2
- 2025SHARE: An SLM-based Hierarchical Action CorREction Assistant for Text-to-SQL31 May 2025
- 2025ReEx-SQL: Reasoning with Execution-Aware Reinforcement Learning for Text-to-SQL19 May 2025
- 2024PTD-SQL: Partitioning and Targeted Drilling with LLMs in Text-to-SQL21 Sep 2024
- 2024The Death of Schema Linking? Text-to-SQL in the Age of Well-Reasoned Language Models14 Aug 2024
- 2024Multi-Turn Interactions for Text-to-SQL with Large Language Models9 Aug 2024
- 2026APEX-SQL: Talking to the data via Agentic Exploration for Text-to-SQLcited by 7
- 2025BAPPA: Benchmarking Agents, Plans, and Pipelines for Automated Text-to-SQL Generationcited by 0
- 2026Agentic DAG-Orchestrated Planner Framework for Multi-Modal, Multi-Hop Question Answering in Hybrid Data Lakescited by 0
- 2026Agentic DAG-Orchestrated Planner Framework for Multi-Modal, Multi-Hop Question Answering in Hybrid Data Lakes15 Mar 2026
- 2026APEX-SQL: Talking to the data via Agentic Exploration for Text-to-SQL11 Feb 2026
- 2025BAPPA: Benchmarking Agents, Plans, and Pipelines for Automated Text-to-SQL Generation6 Nov 2025
- 2024Next-Generation Database Interfaces: A Survey of LLM-based Text-to-SQLcited by 118
- 2024A Survey of Text-to-SQL in the Era of LLMs: Where are we, and where are we going?cited by 54
- 2024RSL-SQL: Robust Schema Linking in Text-to-SQL Generationcited by 51
- 2025XiYan-SQL: A Novel Multi-Generator Framework For Text-to-SQLcited by 40
- 2024E-SQL: Direct Schema Linking via Question Enrichment in Text-to-SQLcited by 35
- 2024MAGIC: Generating Self-Correction Guideline for In-Context Text-to-SQLcited by 34
- 2025LinkAlign: Scalable Schema Linking for Real-World Large-Scale Multi-Database Text-to-SQLcited by 26
- 2025BIRD-INTERACT: Re-imagining Text-to-SQL Evaluation for Large Language Models via Lens of Dynamic Interactionscited by 17
- 2025SWE-SQL: Illuminating LLM Pathways to Solve User SQL Issues in Real-World Applicationscited by 15
- 2025Understanding, Detecting, and Repairing Real-World In-Context-Learning-Based Text-to-SQL Errorscited by 14
- 2026Pervasive Annotation Errors Break Text-to-SQL Benchmarks and Leaderboardscited by 12
- 2024FLEX: Expert-level False-Less EXecution Metric for Reliable Text-to-SQL Benchmarkcited by 11
12 most cited of 39 All 39 (JSON)
- 2026LIMIT: Less Is More for Instruction Tuning in Text-to-SQL21 Sep 2026
- 2026DexterSQL: Deep Schema Exploration and Rule-based Correction for Text-to-SQL Generation12 Aug 2026
- 2026SIRIUS-SQL: Anchoring Multi-Candidate Text-to-SQL in Execution Feedback31 May 2026
- 2026EviLink: Multi-Path Schema Linking with Uncertainty-Guided Evidence Acquisition for Large-Scale Text-to-SQL28 May 2026
- 2026Every Step Counts: Step-Level Credit Assignment for Tool-Integrated Text-to-SQL6 May 2026
- 2026Semantic Layers for Reliable LLM-Powered Data Analytics: A Paired Benchmark of Accuracy and Hallucination Across Three Frontier Models28 Apr 2026
- 2026PV-SQL: Synergizing Database Probing and Rule-based Verification for Text-to-SQL Agents19 Apr 2026
- 2026ROSE: An Intent-Centered Evaluation Metric for NL2SQL14 Apr 2026
- 2026NL2SQLBench: A Modular Benchmarking Framework for LLM-Enabled NL2SQL Solutions13 Apr 2026
- 2026ErrorLLM: Modeling SQL Errors for Text-to-SQL Refinement4 Mar 2026
- 2026Pervasive Annotation Errors Break Text-to-SQL Benchmarks and Leaderboards13 Jan 2026
- 2025Rethinking Schema Linking: A Context-Aware Bidirectional Retrieval Approach for Text-to-SQL16 Oct 2025
12 newest of 39 All 39 (JSON)
Similar, not cited
Close in wording, no citation either way
- 2025Stemming Hallucination in Language Models Using a Licensing Oracle
- 2023Ever: Mitigating Hallucination in Large Language Models through Real-Time Verification and Rectification
- 2025HalluGuard: Evidence-Grounded Small Reasoning Models to Mitigate Hallucinations in Retrieval-Augmented Generation
- 2025QueryBandits for Hallucination Mitigation: Exploiting Semantic Features for No-Regret Rewriting
- 2024LargePiG: Your Large Language Model is Secretly a Pointer Generator
- 2025Beyond Facts: Evaluating Intent Hallucination in Large Language Models
- 2025Don't Let It Hallucinate: Premise Verification via Retrieval-Augmented Logical Reasoning
- 2026Mitigating Prompt-Induced Hallucinations in Large Language Models via Structured Reasoning