SQL-of-Thought: Multi-agentic Text-to-SQL with Guided Error Correction
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.
68b7e592295f15ff609114db
Saumya Chaturvedi
admin_assigned
2025-09-03T08:52:15.879Z
6432b9a62bfb2b0ec756b374
/avatars/5db525f2cd40fd077e751b250bbb30a5.svg
Saumya Chaturvedi
user
shollercoaster
68b7e592295f15ff609114dc
Aman Chadha
claimed_verified
2025-09-03T08:25:58.194Z
63a4754927f1f64ed7238dac
https://cdn-avatars.huggingface.co/v1/production/uploads/63a4754927f1f64ed7238dac/aH-eJF-31g4vof9jv2gmI.jpeg
Aman Chadha
user
amanchadha
68b7e592295f15ff609114dd
Laurent Bindschaedler
admin_assigned
2025-09-03T08:52:21.685Z
6783105a17f0d939ebcdd86c
https://cdn-avatars.huggingface.co/v1/production/uploads/no-auth/UKBXp_AGPVQjH9e_C-C5c.png
Laurent Bindschaedler
user
bindsch
SQL-of-Thought: Multi-agentic Text-to-SQL with Guided Error Correction
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.
A multi-agent framework decomposes the Text2SQL task into several components, using in-context learning and taxonomy-guided error modification to achieve state-of-the-art results.
in-context learning chain-of-thought SQL-of-Thought schema linking subproblem identification query plan generation SQL generation guided correction loop taxonomy-guided dynamic error modification reasoning-based query planning Spider dataset