Text-to-SQL Error Correction with Language Models of Code
Not on the map. Why?
Abstract (arXiv)
Despite recent progress in text-to-SQL parsing, current semantic parsers are still not accurate enough for practical use. In this paper, we investigate how to build automatic text-to-SQL error correction models. Noticing that token-level edits are out of context and sometimes ambiguous, we propose building clause-level edit models instead. Besides, while most language models of code are not specifically pre-trained for SQL, they know common data structures and their operations in programming languages such as Python. Thus, we propose a novel representation for SQL queries and their edits that adheres more closely to the pre-training corpora of language models of code. Our error correction model improves the exact set match accuracy of different parsers by 2.4-6.5 and obtains up to 4.3 point absolute improvement over two strong baselines. Our code and data are available at https://github.com/OSU-NLP-Group/Auto-SQL-Correction.
Key facts. Cited by 21 papers in the map (data through 7 Oct 2026). Builds on 36 of its 56 references that are in the map. First posted on arXiv 22 May 2023.
Builds on
36 of 56 references.
References · 36
- 2019PyTorch: An Imperative Style, High-Performance Deep Learning Librarycited by 20,160
- 2019Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformercited by 14,491
- 2021Evaluating Large Language Models Trained on Codecited by 8,053
- 2020CodeBERT: A Pre-Trained Model for Programming and Natural Languagescited by 1,286
- 2018Spider: A Large-Scale Human-Labeled Dataset for Complex and Cross-Domain Semantic Parsing and Text-to-SQL Taskcited by 1,120
- 2018Adafactor: Adaptive Learning Rates with Sublinear Memory Costcited by 896
- 2021CodeT5: Identifier-aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and Generationcited by 890
- 2022CodeGen: An Open Large Language Model for Code with Multi-Turn Program Synthesiscited by 876
- 2019CodeSearchNet Challenge: Evaluating the State of Semantic Code Searchcited by 638
- 2020GraphCodeBERT: Pre-training Code Representations with Data Flowcited by 600
- 2022ProgPrompt: Generating Situated Robot Task Plans using Large Language Modelscited by 598
- 2022InCoder: A Generative Model for Code Infilling and Synthesiscited by 492
24 more
- 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
- 2021Unified Pre-training for Program Understanding and Generationcited by 361
- 2022UniXcoder: Unified Cross-Modal Pre-training for Code Representationcited by 355
- 2020On the Stability of Fine-tuning BERT: Misconceptions, Explanations, and Strong Baselinescited by 254
- 2022UnifiedSKG: Unifying and Multi-Tasking Structured Knowledge Grounding with Text-to-Text Language Modelscited by 231
- 2019Towards Complex Text-to-SQL in Cross-Domain Database with Intermediate Representationcited by 210
- 2022Language Models of Code are Few-Shot Commonsense Learnerscited by 160
- 2020Bridging Textual and Tabular Data for Cross-Domain Text-to-SQL Semantic Parsingcited by 133
- 2020Structure-Grounded Pretraining for Text-to-SQLcited by 126
- 2021Towards Robustness of Text-to-SQL Models against Synonym Substitutioncited by 110
- 2020SmBoP: Semi-autoregressive Bottom-up Semantic Parsingcited by 97
- 2021Natural SQL: Making SQL Easier to Infer from Natural Language Specificationscited by 66
- 2019On Learning Meaningful Code Changes via Neural Machine Translationcited by 50
- 2022CoditT5: Pretraining for Source Code and Natural Language Editingcited by 45
- 2020Speak to your Parser: Interactive Text-to-SQL with Natural Language Feedbackcited by 44
- 2019Model-based Interactive Semantic Parsing: A Unified Framework and A Text-to-SQL Case Studycited by 40
- 2021NL-EDIT: Correcting semantic parse errors through natural language interactioncited by 33
- 2020Photon: A Robust Cross-Domain Text-to-SQL Systemcited by 26
- 2020An Imitation Game for Learning Semantic Parsers from User Interactioncited by 23
- 2022GraphQ IR: Unifying the Semantic Parsing of Graph Query Languages with One Intermediate Representationcited by 13
- 2020"What Do You Mean by That?" A Parser-Independent Interactive Approach for Enhancing Text-to-SQLcited by 11
- 2021Towards Transparent Interactive Semantic Parsing via Step-by-Step Correctioncited by 9
- 2022Using Developer Discussions to Guide Fixing Bugs in Softwarecited by 3
Built on by
Citing papers per year: 2023: 3; 2024: 4; 2025: 10; 2026: 4.
21 papers.
Sort:
By area:
- 2023Exploring Chain-of-Thought Style Prompting for Text-to-SQLcited by 69
- 2024A Survey of Text-to-SQL in the Era of LLMs: Where are we, and where are we going?cited by 54
- 2024When is Tree Search Useful for LLM Planning? It Depends on the Discriminatorcited by 46
- 2025Understanding, Detecting, and Repairing Real-World In-Context-Learning-Based Text-to-SQL Errorscited by 14
- 2024CoE-SQL: In-Context Learning for Multi-Turn Text-to-SQL with Chain-of-Editionscited by 13
- 2023Error Detection for Text-to-SQL Semantic Parsingcited by 11
- 2025SQLens: An End-to-End Framework for Error Detection and Correction in Text-to-SQLcited by 10
- 2025AmbiSQL: Interactive Ambiguity Detection and Resolution for Text-to-SQLcited by 10
- 2025Can LLMs Narrate Tabular Data? An Evaluation Framework for Natural Language Representations of Text-to-SQL System Outputscited by 7
- 2024DAC: Decomposed Automation Correction for Text-to-SQLcited by 6
- 2025Automatic database description generation for Text-to-SQLcited by 5
- 2025Calibrating LLMs for Text-to-SQL Parsing by Leveraging Sub-clause Frequenciescited by 5
9 more
- 2025SAFE-SQL: Self-Augmented In-Context Learning with Fine-grained Example Selection for Text-to-SQLcited by 4
- 2026FlexSQL: Flexible Exploration and Execution Make Better Text-to-SQL Agentscited by 3
- 2025AGENTIQL: An Agent-Inspired Multi-Expert Framework for Text-to-SQL Generationcited by 2
- 2025Beyond Query-Level Comparison: Fine-Grained Reinforcement Learning for Text-to-SQL with Automated Interpretable Critiquescited by 2
- 2026EGREFINE: An Execution-Grounded Optimization Framework for Text-to-SQL Schema Refinementcited by 1
- 2023dIR -- Discrete Information Retrieval: Conversational Search over Unstructured (and Structured) Data with Large Language Modelscited by 0
- 2025Bridging Global Intent with Local Details: A Hierarchical Representation Approach for Semantic Validation in Text-to-SQLcited by 0
- 2026PleaSQLarify: Visual Pragmatic Repair for Natural Language Database Queryingcited by 0
- 2026GGC: Selective Query Correction for Reliable Text-to-SPARQL Generationcited by 0
- 2026GGC: Selective Query Correction for Reliable Text-to-SPARQL Generation30 Jul 2026
- 2026FlexSQL: Flexible Exploration and Execution Make Better Text-to-SQL Agents4 May 2026
- 2026EGREFINE: An Execution-Grounded Optimization Framework for Text-to-SQL Schema Refinement1 May 2026
- 2026PleaSQLarify: Visual Pragmatic Repair for Natural Language Database Querying2 Mar 2026
- 2025Bridging Global Intent with Local Details: A Hierarchical Representation Approach for Semantic Validation in Text-to-SQL28 Dec 2025
- 2025Beyond Query-Level Comparison: Fine-Grained Reinforcement Learning for Text-to-SQL with Automated Interpretable Critiques27 Nov 2025
- 2025Can LLMs Narrate Tabular Data? An Evaluation Framework for Natural Language Representations of Text-to-SQL System Outputs27 Oct 2025
- 2025AGENTIQL: An Agent-Inspired Multi-Expert Framework for Text-to-SQL Generation12 Oct 2025
- 2025AmbiSQL: Interactive Ambiguity Detection and Resolution for Text-to-SQL21 Aug 2025
- 2025SQLens: An End-to-End Framework for Error Detection and Correction in Text-to-SQL4 Jun 2025
- 2025Calibrating LLMs for Text-to-SQL Parsing by Leveraging Sub-clause Frequencies27 May 2025
- 2025Automatic database description generation for Text-to-SQL28 Feb 2025
9 more
- 2025SAFE-SQL: Self-Augmented In-Context Learning with Fine-grained Example Selection for Text-to-SQL17 Feb 2025
- 2025Understanding, Detecting, and Repairing Real-World In-Context-Learning-Based Text-to-SQL Errors16 Jan 2025
- 2024DAC: Decomposed Automation Correction for Text-to-SQL16 Aug 2024
- 2024A Survey of Text-to-SQL in the Era of LLMs: Where are we, and where are we going?9 Aug 2024
- 2024CoE-SQL: In-Context Learning for Multi-Turn Text-to-SQL with Chain-of-Editions4 May 2024
- 2024When is Tree Search Useful for LLM Planning? It Depends on the Discriminator16 Feb 2024
- 2023dIR -- Discrete Information Retrieval: Conversational Search over Unstructured (and Structured) Data with Large Language Models20 Dec 2023
- 2023Exploring Chain-of-Thought Style Prompting for Text-to-SQL23 May 2023
- 2023Error Detection for Text-to-SQL Semantic Parsing23 May 2023
- 2023Exploring Chain-of-Thought Style Prompting for Text-to-SQLcited by 69
- 2023Exploring Chain-of-Thought Style Prompting for Text-to-SQL23 May 2023
- 2024A Survey of Text-to-SQL in the Era of LLMs: Where are we, and where are we going?cited by 54
- 2024When is Tree Search Useful for LLM Planning? It Depends on the Discriminatorcited by 46
- 2025Understanding, Detecting, and Repairing Real-World In-Context-Learning-Based Text-to-SQL Errorscited by 14
- 2024CoE-SQL: In-Context Learning for Multi-Turn Text-to-SQL with Chain-of-Editionscited by 13
- 2023Error Detection for Text-to-SQL Semantic Parsingcited by 11
- 2025SQLens: An End-to-End Framework for Error Detection and Correction in Text-to-SQLcited by 10
- 2025AmbiSQL: Interactive Ambiguity Detection and Resolution for Text-to-SQLcited by 10
- 2025Can LLMs Narrate Tabular Data? An Evaluation Framework for Natural Language Representations of Text-to-SQL System Outputscited by 7
- 2024DAC: Decomposed Automation Correction for Text-to-SQLcited by 6
- 2025Automatic database description generation for Text-to-SQLcited by 5
- 2025Calibrating LLMs for Text-to-SQL Parsing by Leveraging Sub-clause Frequenciescited by 5
- 2025SAFE-SQL: Self-Augmented In-Context Learning with Fine-grained Example Selection for Text-to-SQLcited by 4
12 most cited of 19 All 19 (JSON)
- 2026GGC: Selective Query Correction for Reliable Text-to-SPARQL Generation30 Jul 2026
- 2026FlexSQL: Flexible Exploration and Execution Make Better Text-to-SQL Agents4 May 2026
- 2026EGREFINE: An Execution-Grounded Optimization Framework for Text-to-SQL Schema Refinement1 May 2026
- 2026PleaSQLarify: Visual Pragmatic Repair for Natural Language Database Querying2 Mar 2026
- 2025Bridging Global Intent with Local Details: A Hierarchical Representation Approach for Semantic Validation in Text-to-SQL28 Dec 2025
- 2025Beyond Query-Level Comparison: Fine-Grained Reinforcement Learning for Text-to-SQL with Automated Interpretable Critiques27 Nov 2025
- 2025Can LLMs Narrate Tabular Data? An Evaluation Framework for Natural Language Representations of Text-to-SQL System Outputs27 Oct 2025
- 2025AmbiSQL: Interactive Ambiguity Detection and Resolution for Text-to-SQL21 Aug 2025
- 2025SQLens: An End-to-End Framework for Error Detection and Correction in Text-to-SQL4 Jun 2025
- 2025Calibrating LLMs for Text-to-SQL Parsing by Leveraging Sub-clause Frequencies27 May 2025
- 2025Automatic database description generation for Text-to-SQL28 Feb 2025
- 2025SAFE-SQL: Self-Augmented In-Context Learning with Fine-grained Example Selection for Text-to-SQL17 Feb 2025
12 newest of 19 All 19 (JSON)