SQL-of-Thought: Multi-agentic Text-to-SQL with Guided Error Correction
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
- 2024Tool-Assisted Agent on SQL Inspection and Refinement in Real-World Scenarios30 Aug
- 2023MAC-SQL: A Multi-Agent Collaborative Framework for Text-to-SQL18 Dec
Other references · 16
- 2020Language Models are Few-Shot Learnerscited by 32,419
- 2023Reflexion: Language Agents with Verbal Reinforcement Learningcited by 4,276
- 2018Spider: A Large-Scale Human-Labeled Dataset for Complex and Cross-Domain Semantic Parsing and Text-to-SQL Taskcited by 1,139
- 2023DIN-SQL: Decomposed In-Context Learning of Text-to-SQL with Self-Correctioncited by 477
- 2023Text-to-SQL Empowered by Large Language Models: A Benchmark Evaluationcited by 385
- 2023RESDSQL: Decoupling Schema Linking and Skeleton Parsing for Text-to-SQLcited by 195
- 2024CHASE-SQL: Multi-Path Reasoning and Preference Optimized Candidate Selection in Text-to-SQLcited by 138
- 2020Structure-Grounded Pretraining for Text-to-SQLcited by 126
- 2021Towards Robustness of Text-to-SQL Models against Synonym Substitutioncited by 110
- 2024The Dawn of Natural Language to SQL: Are We Fully Ready?cited by 79
- 2023Exploring Chain-of-Thought Style Prompting for Text-to-SQLcited by 69
- 2024A Survey on Employing Large Language Models for Text-to-SQL Taskscited by 67
4 more
- 2023ACT-SQL: In-Context Learning for Text-to-SQL with Automatically-Generated Chain-of-Thoughtcited by 65
- 2024Text2SQL is Not Enough: Unifying AI and Databases with TAGcited by 34
- 2025Understanding, Detecting, and Repairing Real-World In-Context-Learning-Based Text-to-SQL Errorscited by 14
- 2025Think2SQL: Reinforce LLM Reasoning Capabilities for Text2SQLcited by 14
Built on by
Citing papers per year: 2025: 1; 2026: 5.
6 papers.
- 2025MARS-SQL: A multi-agent reinforcement learning framework for Text-to-SQLcited by 15
- 2026PV-SQL: Synergizing Database Probing and Rule-based Verification for Text-to-SQL Agentscited by 5
- 2026Benchmarking Text-to-Python against Text-to-SQL: The Impact of Explicit Logic and Ambiguitycited by 1
- 2026EGREFINE: An Execution-Grounded Optimization Framework for Text-to-SQL Schema Refinementcited by 1
- 2026Rebooting Microreboot: Architectural Support for Safe, Parallel Recovery in Microservice Systemscited by 0
- 2026Why, Where, How: Taxonomy-guided Error Grounding for Code Repair in NL2SQLcited by 0
- 2026Why, Where, How: Taxonomy-guided Error Grounding for Code Repair in NL2SQL4 Oct 2026
- 2026EGREFINE: An Execution-Grounded Optimization Framework for Text-to-SQL Schema Refinement1 May 2026
- 2026PV-SQL: Synergizing Database Probing and Rule-based Verification for Text-to-SQL Agents19 Apr 2026
- 2026Rebooting Microreboot: Architectural Support for Safe, Parallel Recovery in Microservice Systems11 Apr 2026
- 2026Benchmarking Text-to-Python against Text-to-SQL: The Impact of Explicit Logic and Ambiguity22 Jan 2026
- 2025MARS-SQL: A multi-agent reinforcement learning framework for Text-to-SQL2 Nov 2025
Similar, not cited
Close in wording, no citation either way
- 2026ACTS-SQL: Agentic and Critic-Oriented Tree-Structured SQL Correctness with Large Language Models
- 2024SQLFixAgent: Towards Semantic-Accurate Text-to-SQL Parsing via Consistency-Enhanced Multi-Agent Collaboration
- 2025Chain-of-Query: Unleashing the Power of LLMs in SQL-Aided Table Understanding via Multi-Agent Collaboration
- 2026AgentNLQ: A General-Purpose Agent for Natural Language to SQL
- 2025ReFoRCE: A Text-to-SQL Agent with Self-Refinement, Consensus Enforcement, and Column Exploration
- 2025AGENTIQL: An Agent-Inspired Multi-Expert Framework for Text-to-SQL Generation
- 2026Integrating Reasoning and Generalization in Text-to-SQL via Self-Enhanced Fine-Tuning
- 2025RAISE: Reasoning Agent for Interactive SQL Exploration