SQL-of-Thought: Multi-agentic Text-to-SQL with Guided Error Correction
Chaturvedi, Saumya, Chadha, Aman, Bindschaedler, Laurent
–arXiv.org Artificial Intelligence
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.
arXiv.org Artificial Intelligence
Sep-30-2025
- Country:
- Asia
- Middle East
- Jordan (0.04)
- Saudi Arabia > Asir Province
- Abha (0.04)
- UAE > Abu Dhabi Emirate
- Abu Dhabi (0.14)
- Myanmar > Tanintharyi Region
- Dawei (0.04)
- Middle East
- Europe
- Germany > Saarland
- Saarbrücken (0.04)
- Monaco (0.04)
- Germany > Saarland
- North America > United States
- California > Santa Clara County
- Santa Clara (0.04)
- New Mexico > Bernalillo County
- Albuquerque (0.04)
- California > Santa Clara County
- Asia
- Genre:
- Research Report (0.84)
- Technology: