mlsanityData to 7 Oct 2026

SQLens: An End-to-End Framework for Error Detection and Correction in Text-to-SQL

arXiv 2506.04494 ↗First posted 4 Jun 2025cs.CLcited by 10

Not on the map. Why?

Abstract (arXiv)

Text-to-SQL systems translate natural language (NL) questions into SQL queries, enabling non-technical users to interact with structured data. While large language models (LLMs) have shown promising results on the text-to-SQL task, they often produce semantically incorrect yet syntactically valid queries, with limited insight into their reliability. We propose SQLens, an end-to-end framework for fine-grained detection and correction of semantic errors in LLM-generated SQL. SQLens integrates error signals from both the underlying database and the LLM to identify potential semantic errors within SQL clauses. It further leverages these signals to guide query correction. Empirical results on two public benchmarks show that SQLens outperforms the best LLM-based self-evaluation method by 25.78% in F1 for error detection, and improves execution accuracy of out-of-the-box text-to-SQL systems by up to 20%.

Key facts. Cited by 10 papers in the map (data through 7 Oct 2026). Builds on 38 of its 52 references that are in the map. First posted on arXiv 4 Jun 2025.

Builds on

38 of 52 references.

References · 38

  1. 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,302
  2. 2023Lost in the Middle: How Language Models Use Long Contextscited by 3,383
  3. 2023A Survey on Large Language Model based Autonomous Agentscited by 2,203
  4. 2023Self-RAG: Learning to Retrieve, Generate, and Critique through Self-Reflectioncited by 1,800
  5. 2022Language Models (Mostly) Know What They Knowcited by 1,783
  6. 2018Spider: A Large-Scale Human-Labeled Dataset for Complex and Cross-Domain Semantic Parsing and Text-to-SQL Taskcited by 1,120
  7. 2023Teaching Large Language Models to Self-Debugcited by 963
  8. 2023Just Ask for Calibration: Strategies for Eliciting Calibrated Confidence Scores from Language Models Fine-Tuned with Human Feedbackcited by 788
  9. 2021Retrieval Augmentation Reduces Hallucination in Conversationcited by 691
  10. 2023Can LLM Already Serve as A Database Interface? A BIg Bench for Large-Scale Database Grounded Text-to-SQLscited by 667
  11. 2022Decomposed Prompting: A Modular Approach for Solving Complex Taskscited by 554
  12. 2023DIN-SQL: Decomposed In-Context Learning of Text-to-SQL with Self-Correctioncited by 465
26 more
  1. 2023Text-to-SQL Empowered by Large Language Models: A Benchmark Evaluationcited by 378
  2. 2020AutoGluon-Tabular: Robust and Accurate AutoML for Structured Datacited by 368
  3. 2023Is ChatGPT Good at Search? Investigating Large Language Models as Re-Ranking Agentscited by 356
  4. 2023A Survey of Confidence Estimation and Calibration in Large Language Modelscited by 253
  5. 2024CodeS: Towards Building Open-source Language Models for Text-to-SQLcited by 183
  6. 2024CHESS: Contextual Harnessing for Efficient SQL Synthesiscited by 164
  7. 2023MAC-SQL: A Multi-Agent Collaborative Framework for Text-to-SQLcited by 158
  8. 2024CHASE-SQL: Multi-Path Reasoning and Preference Optimized Candidate Selection in Text-to-SQLcited by 132
  9. 2024Pride and Prejudice: LLM Amplifies Self-Bias in Self-Refinementcited by 111
  10. 2024MCS-SQL: Leveraging Multiple Prompts and Multiple-Choice Selection For Text-to-SQL Generationcited by 103
  11. 2020Fast and Three-rious: Speeding Up Weak Supervision with Triplet Methodscited by 98
  12. 2023Zero-Shot Listwise Document Reranking with a Large Language Modelcited by 81
  13. 2023RankVicuna: Zero-Shot Listwise Document Reranking with Open-Source Large Language Modelscited by 69
  14. 2024The Death of Schema Linking? Text-to-SQL in the Age of Well-Reasoned Language Modelscited by 67
  15. 2025SQL-R1: Training Natural Language to SQL Reasoning Model By Reinforcement Learningcited by 67
  16. 2025Reasoning-SQL: Reinforcement Learning with SQL Tailored Partial Rewards for Reasoning-Enhanced Text-to-SQLcited by 59
  17. 2024Calibration and Correctness of Language Models for Codecited by 49
  18. 2024MAGIC: Generating Self-Correction Guideline for In-Context Text-to-SQLcited by 34
  19. 2020Photon: A Robust Cross-Domain Text-to-SQL Systemcited by 26
  20. 2020An Imitation Game for Learning Semantic Parsers from User Interactioncited by 23
  21. 2023Text-to-SQL Error Correction with Language Models of Codecited by 21
  22. 2024Divide-or-Conquer? Which Part Should You Distill Your LLM?cited by 17
  23. 2023Error Detection for Text-to-SQL Semantic Parsingcited by 11
  24. 2023Data Ambiguity Strikes Back: How Documentation Improves GPT's Text-to-SQLcited by 11
  25. 2024SQLFixAgent: Towards Semantic-Accurate Text-to-SQL Parsing via Consistency-Enhanced Multi-Agent Collaborationcited by 10
  26. 2024Enhancing Trust in LLMs: Algorithms for Comparing and Interpreting LLMscited by 9

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2025: 4; 2026: 6.

10 papers.