mlsanityData to 14 Oct 2026

SQL-of-Thought: Multi-agentic Text-to-SQL with Guided Error Correction

arXiv 2509.00581 ↗First posted 30 Aug 2025cs.DB cs.LGcited by 6

On the map: LLM agents and tool use → Web, search, and research agents

Abstract (arXiv)

Converting natural language queries into SQL queries is a crucial challenge in both industry and academia, aiming to increase access to databases and large-scale applications. This work examines how in-context learning and chain-of-thought can be utilized to develop a robust solution for text-to-SQL systems. We propose SQL-of-Thought: a multi-agent framework that decomposes the Text2SQL task into schema linking, subproblem identification, query plan generation, SQL generation, and a guided correction loop. Unlike prior systems that rely only on execution-based static correction, we introduce taxonomy-guided dynamic error modification informed by in-context learning. SQL-of-Thought achieves state-of-the-art results on the Spider dataset and its variants, combining guided error taxonomy with reasoning-based query planning.

Key facts. Cited by 6 papers in the map (data through 14 Oct 2026). Placed in Web, search, and research agents, one of 16 directions in LLM agents and tool use. Builds on 18 of its 21 references that are in the map. First posted on arXiv 30 Aug 2025.

Builds on

18 of 21 references.

Closest ancestors · 2

Same direction, newest first

  1. 2024Tool-Assisted Agent on SQL Inspection and Refinement in Real-World Scenarios30 Aug
  2. 2023MAC-SQL: A Multi-Agent Collaborative Framework for Text-to-SQL18 Dec

Other references · 16

  1. 2020Language Models are Few-Shot Learnerscited by 32,419
  2. 2023Reflexion: Language Agents with Verbal Reinforcement Learningcited by 4,276
  3. 2018Spider: A Large-Scale Human-Labeled Dataset for Complex and Cross-Domain Semantic Parsing and Text-to-SQL Taskcited by 1,139
  4. 2023DIN-SQL: Decomposed In-Context Learning of Text-to-SQL with Self-Correctioncited by 477
  5. 2023Text-to-SQL Empowered by Large Language Models: A Benchmark Evaluationcited by 385
  6. 2023RESDSQL: Decoupling Schema Linking and Skeleton Parsing for Text-to-SQLcited by 195
  7. 2024CHASE-SQL: Multi-Path Reasoning and Preference Optimized Candidate Selection in Text-to-SQLcited by 138
  8. 2020Structure-Grounded Pretraining for Text-to-SQLcited by 126
  9. 2021Towards Robustness of Text-to-SQL Models against Synonym Substitutioncited by 110
  10. 2024The Dawn of Natural Language to SQL: Are We Fully Ready?cited by 79
  11. 2023Exploring Chain-of-Thought Style Prompting for Text-to-SQLcited by 69
  12. 2024A Survey on Employing Large Language Models for Text-to-SQL Taskscited by 67
4 more
  1. 2023ACT-SQL: In-Context Learning for Text-to-SQL with Automatically-Generated Chain-of-Thoughtcited by 65
  2. 2024Text2SQL is Not Enough: Unifying AI and Databases with TAGcited by 34
  3. 2025Understanding, Detecting, and Repairing Real-World In-Context-Learning-Based Text-to-SQL Errorscited by 14
  4. 2025Think2SQL: Reinforce LLM Reasoning Capabilities for Text2SQLcited by 14

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2025: 1; 2026: 5.

6 papers.

Similar, not cited

Close in wording, no citation either way

  1. 2026ACTS-SQL: Agentic and Critic-Oriented Tree-Structured SQL Correctness with Large Language Models
  2. 2024SQLFixAgent: Towards Semantic-Accurate Text-to-SQL Parsing via Consistency-Enhanced Multi-Agent Collaboration
  3. 2025Chain-of-Query: Unleashing the Power of LLMs in SQL-Aided Table Understanding via Multi-Agent Collaboration
  4. 2026AgentNLQ: A General-Purpose Agent for Natural Language to SQL
  5. 2025ReFoRCE: A Text-to-SQL Agent with Self-Refinement, Consensus Enforcement, and Column Exploration
  6. 2025AGENTIQL: An Agent-Inspired Multi-Expert Framework for Text-to-SQL Generation
  7. 2026Integrating Reasoning and Generalization in Text-to-SQL via Self-Enhanced Fine-Tuning
  8. 2025RAISE: Reasoning Agent for Interactive SQL Exploration