mlsanityData to 14 Oct 2026

Why, Where, How: Taxonomy-guided Error Grounding for Code Repair in NL2SQL

arXiv 2610.05060 ↗First posted 4 Oct 2026cs.AIcited by 0

Not on the map. Why?

Abstract (arXiv)

SQL queries that large language models write from natural language questions can execute successfully yet produce incorrect results, so execution alone does not reveal what to fix. An error taxonomy says why the query is wrong, but not where to look or how to change it. Existing methods can guide SQL correction through feedback, error reports, or generated plans alongside an unmasked query. We introduce TEG(Taxonomy-guided Error Grounding), which turns a supplied diagnosis into a structured correction input for natural language-to-SQL (NL2SQL) correction. Type-specific rules map each error type to construct classes to reconsider and an edit operation to request. TEG masks the selected constructs in the query when applicable and states that operation in an edit instruction. TEG generates candidate corrections from this input, uses execution feedback to guide candidate selection, and repeats the process one annotation at a time for queries with several errors. On NL2SQL-BUGs, TEG reaches 47.3 single-error execution accuracy and 37.0 overall with Qwen2.5-7B-Instruct. Across the model sizes and thinking modes evaluated in the main comparison, TEG outperforms all evaluated baselines on single-error queries, even when the baselines receive the same error-type annotations. With predicted types, TEG stays above direct LLM correction and ErrorLLM on single-error queries.

Key facts. No citing papers in the map yet (data through 14 Oct 2026). Builds on 49 of its 53 references that are in the map. First posted on arXiv 4 Oct 2026.

Builds on

49 of 53 references.

References · 49

  1. 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,459
  2. 2025Qwen3 Technical Reportcited by 8,820
  3. 2021Evaluating Large Language Models Trained on Codecited by 8,320
  4. 2024Qwen2.5 Technical Reportcited by 4,942
  5. 2022Large Language Models are Zero-Shot Reasonerscited by 4,374
  6. 2023Self-Refine: Iterative Refinement with Self-Feedbackcited by 3,442
  7. 2023Is Your Code Generated by ChatGPT Really Correct? Rigorous Evaluation of Large Language Models for Code Generationcited by 1,391
  8. 2020CodeBERT: A Pre-Trained Model for Programming and Natural Languagescited by 1,310
  9. 2023Large Language Models Cannot Self-Correct Reasoning Yetcited by 1,017
  10. 2023Teaching Large Language Models to Self-Debugcited by 988
  11. 2021Blended Diffusion for Text-driven Editing of Natural Imagescited by 927
  12. 2023Can LLM Already Serve as A Database Interface? A BIg Bench for Large-Scale Database Grounded Text-to-SQLscited by 688
37 more
  1. 2024A Survey on Large Language Models for Code Generationcited by 658
  2. 2018Generative Image Inpainting with Contextual Attentioncited by 580
  3. 2022InCoder: A Generative Model for Code Infilling and Synthesiscited by 498
  4. 2023DIN-SQL: Decomposed In-Context Learning of Text-to-SQL with Self-Correctioncited by 477
  5. 2018MAttNet: Modular Attention Network for Referring Expression Comprehensioncited by 431
  6. 2024Training Language Models to Self-Correct via Reinforcement Learningcited by 426
  7. 2023Logic-LM: Empowering Large Language Models with Symbolic Solvers for Faithful Logical Reasoningcited by 391
  8. 2022UniXcoder: Unified Cross-Modal Pre-training for Code Representationcited by 361
  9. 2024Spider 2.0: Evaluating Language Models on Real-World Enterprise Text-to-SQL Workflowscited by 232
  10. 2024CodeS: Towards Building Open-source Language Models for Text-to-SQLcited by 187
  11. 2023SantaCoder: don't reach for the stars!cited by 170
  12. 2024CHESS: Contextual Harnessing for Efficient SQL Synthesiscited by 169
  13. 2023C3: Zero-shot Text-to-SQL with ChatGPTcited by 164
  14. 2023MAC-SQL: A Multi-Agent Collaborative Framework for Text-to-SQLcited by 164
  15. 2024CHASE-SQL: Multi-Path Reasoning and Preference Optimized Candidate Selection in Text-to-SQLcited by 138
  16. 2024MCS-SQL: Leveraging Multiple Prompts and Multiple-Choice Selection For Text-to-SQL Generationcited by 105
  17. 2020Graph-based, Self-Supervised Program Repair from Diagnostic Feedbackcited by 94
  18. 2024A Survey of Text-to-SQL in the Era of LLMs: Where are we, and where are we going?cited by 56
  19. 2024MAGIC: Generating Self-Correction Guideline for In-Context Text-to-SQLcited by 35
  20. 2025Alpha-SQL: Zero-Shot Text-to-SQL using Monte Carlo Tree Searchcited by 34
  21. 2025NL2SQL-BUGs: A Benchmark for Detecting Semantic Errors in NL2SQL Translationcited by 33
  22. 2025Agentar-Scale-SQL: Advancing Text-to-SQL through Orchestrated Test-Time Scalingcited by 24
  23. 2024MSc-SQL: Multi-Sample Critiquing Small Language Models For Text-To-SQL Translationcited by 19
  24. 2025STaR-SQL: Self-Taught Reasoner for Text-to-SQLcited by 17
  25. 2025SHARE: An SLM-based Hierarchical Action CorREction Assistant for Text-to-SQLcited by 16
  26. 2025SWE-SQL: Illuminating LLM Pathways to Solve User SQL Issues in Real-World Applicationscited by 16
  27. 2023Error Detection for Text-to-SQL Semantic Parsingcited by 12
  28. 2025SQLens: An End-to-End Framework for Error Detection and Correction in Text-to-SQLcited by 12
  29. 2024SQLFixAgent: Towards Semantic-Accurate Text-to-SQL Parsing via Consistency-Enhanced Multi-Agent Collaborationcited by 11
  30. 2024A Deep Dive Into Large Language Model Code Generation Mistakes: What and Why?cited by 10
  31. 2025Hallucination Detection for LLM-based Text-to-SQL Generation via Two-Stage Metamorphic Testingcited by 9
  32. 2024Grounding Natural Language to SQL Translation with Data-Based Self-Explanationscited by 8
  33. 2025LearNAT: Learning NL2SQL with AST-guided Task Decomposition for Large Language Modelscited by 8
  34. 2025SQL-of-Thought: Multi-agentic Text-to-SQL with Guided Error Correctioncited by 6
  35. 2024LecPrompt: A Prompt-based Approach for Logical Error Correction with CodeBERTcited by 3
  36. 2026ErrorLLM: Modeling SQL Errors for Text-to-SQL Refinementcited by 2
  37. 2026Bridging the Gap between User Intent and LLM: A Requirement Alignment Approach for Code Generationcited by 1

Built on by

Not cited yet.

Similar, not cited

Close in wording, no citation either way

  1. 2025Prompt Tuning for Natural Language to SQL with Embedding Fine-Tuning and RAG
  2. 2026ACTS-SQL: Agentic and Critic-Oriented Tree-Structured SQL Correctness with Large Language Models
  3. 2025RetrySQL: text-to-SQL training with retry data for self-correcting query generation
  4. 2024Tool-Assisted Agent on SQL Inspection and Refinement in Real-World Scenarios
  5. 2025Distill-C: Enhanced NL2SQL via Distilled Customization with LLMs
  6. 2025GBV-SQL: Guided Generation and SQL2Text Back-Translation Validation for Multi-Agent Text2SQL
  7. 2023Interleaving Pre-Trained Language Models and Large Language Models for Zero-Shot NL2SQL Generation
  8. 2025Do LLMs Align with My Task? Evaluating Text-to-SQL via Dataset Alignment