mlsanityData to 14 Oct 2026

ErrorLLM: Modeling SQL Errors for Text-to-SQL Refinement

arXiv 2603.03742 ↗First posted 4 Mar 2026cs.CL cs.DBcited by 2

Not on the map. Why?

Abstract (arXiv)

Despite the remarkable performance of large language models (LLMs) in text-to-SQL (SQL generation), correctly producing SQL queries remains challenging during initial generation. The SQL refinement task is subsequently introduced to correct syntactic and semantic errors in generated SQL queries. However, existing paradigms face two major limitations: (i) self-debugging becomes increasingly ineffective as modern LLMs rarely produce explicit execution errors that can trigger debugging signals; (ii) self-correction exhibits low detection precision due to the lack of explicit error modeling grounded in the question and schema, and suffers from severe hallucination that frequently corrupts correct SQLs. In this paper, we propose ErrorLLM, a framework that explicitly models text-to-SQL Errors within a dedicated LLM for text-to-SQL refinement. Specifically, we represent the user question and database schema as structural features, employ static detection to identify execution failures and surface mismatches, and extend ErrorLLM's semantic space with dedicated error tokens that capture categorized implicit semantic error types. Through a well-designed training strategy, we explicitly model these errors with structural representations, enabling the LLM to detect complex implicit errors by predicting dedicated error tokens. Guided by the detected errors, we perform error-guided refinement on the SQL structure by prompting LLMs. Extensive experiments demonstrate that ErrorLLM achieves the most significant improvements over backbone initial generation. Further analysis reveals that detection quality directly determines refinement effectiveness, and ErrorLLM addresses both sides by high detection F1 score while maintain refinement effectiveness.

Key facts. Cited by 2 papers in the map (data through 14 Oct 2026). Builds on 42 of its 59 references that are in the map. First posted on arXiv 4 Mar 2026.

Builds on

42 of 59 references.

References · 42

  1. 2025Gemini 2.5: Pushing the Frontier with Advanced Reasoning, Multimodality, Long Context, and Next Generation Agentic Capabilitiescited by 3,796
  2. 2021Finetuned Language Models Are Zero-Shot Learnerscited by 3,780
  3. 2015Neural Machine Translation of Rare Words with Subword Unitscited by 2,918
  4. 2024LlamaFactory: Unified Efficient Fine-Tuning of 100+ Language Modelscited by 1,464
  5. 2018Spider: A Large-Scale Human-Labeled Dataset for Complex and Cross-Domain Semantic Parsing and Text-to-SQL Taskcited by 1,139
  6. 2023Teaching Large Language Models to Self-Debugcited by 988
  7. 2023Can LLM Already Serve as A Database Interface? A BIg Bench for Large-Scale Database Grounded Text-to-SQLscited by 688
  8. 2023DIN-SQL: Decomposed In-Context Learning of Text-to-SQL with Self-Correctioncited by 477
  9. 2019RAT-SQL: Relation-Aware Schema Encoding and Linking for Text-to-SQL Parserscited by 424
  10. 2023Text-to-SQL Empowered by Large Language Models: A Benchmark Evaluationcited by 385
  11. 2024CodeS: Towards Building Open-source Language Models for Text-to-SQLcited by 187
  12. 2024CHESS: Contextual Harnessing for Efficient SQL Synthesiscited by 169
30 more
  1. 2023C3: Zero-shot Text-to-SQL with ChatGPTcited by 164
  2. 2023MAC-SQL: A Multi-Agent Collaborative Framework for Text-to-SQLcited by 164
  3. 2024CHASE-SQL: Multi-Path Reasoning and Preference Optimized Candidate Selection in Text-to-SQLcited by 138
  4. 2020Structure-Grounded Pretraining for Text-to-SQLcited by 126
  5. 2024Next-Generation Database Interfaces: A Survey of LLM-based Text-to-SQLcited by 120
  6. 2023A comprehensive evaluation of ChatGPT's zero-shot Text-to-SQL capabilitycited by 119
  7. 2021Towards Robustness of Text-to-SQL Models against Synonym Substitutioncited by 110
  8. 2024MCS-SQL: Leveraging Multiple Prompts and Multiple-Choice Selection For Text-to-SQL Generationcited by 105
  9. 2021Exploring Underexplored Limitations of Cross-Domain Text-to-SQL Generalizationcited by 92
  10. 2025OmniSQL: Synthesizing High-quality Text-to-SQL Data at Scalecited by 91
  11. 2024The Dawn of Natural Language to SQL: Are We Fully Ready?cited by 79
  12. 2023Exploring Chain-of-Thought Style Prompting for Text-to-SQLcited by 69
  13. 2025SQL-R1: Training Natural Language to SQL Reasoning Model By Reinforcement Learningcited by 68
  14. 2023ACT-SQL: In-Context Learning for Text-to-SQL with Automatically-Generated Chain-of-Thoughtcited by 65
  15. 2025OpenSearch-SQL: Enhancing Text-to-SQL with Dynamic Few-shot and Consistency Alignmentcited by 53
  16. 2024RSL-SQL: Robust Schema Linking in Text-to-SQL Generationcited by 52
  17. 2024Before Generation, Align it! A Novel and Effective Strategy for Mitigating Hallucinations in Text-to-SQL Generationcited by 50
  18. 2024Knowledge-to-SQL: Enhancing SQL Generation with Data Expert LLMcited by 35
  19. 2024MAGIC: Generating Self-Correction Guideline for In-Context Text-to-SQLcited by 35
  20. 2024E-SQL: Direct Schema Linking via Question Enrichment in Text-to-SQLcited by 35
  21. 2025NL2SQL-BUGs: A Benchmark for Detecting Semantic Errors in NL2SQL Translationcited by 33
  22. 2025JARVIS-VLA: Post-Training Large-Scale Vision Language Models to Play Visual Games with Keyboards and Mousecited by 28
  23. 2025DeepEye-SQL: A Software-Engineering-Inspired Text-to-SQL Frameworkcited by 28
  24. 2024PET-SQL: A Prompt-Enhanced Two-Round Refinement of Text-to-SQL with Cross-consistencycited by 27
  25. 2025SHARE: An SLM-based Hierarchical Action CorREction Assistant for Text-to-SQLcited by 16
  26. 2023Error Detection for Text-to-SQL Semantic Parsingcited by 12
  27. 2024Insights into Natural Language Database Query Errors: From Attention Misalignment to User Handling Strategiescited by 12
  28. 2024SQLFixAgent: Towards Semantic-Accurate Text-to-SQL Parsing via Consistency-Enhanced Multi-Agent Collaborationcited by 11
  29. 2025Hallucination Detection for LLM-based Text-to-SQL Generation via Two-Stage Metamorphic Testingcited by 9
  30. 2025Macro Graph of Experts for Billion-Scale Multi-Task Recommendationcited by 2

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2026: 2.

2 papers.