ChatPaper.aiChatPaper

SQL-of-Thought: Multi-agentische Text-to-SQL met Begeleide Foutcorrectie

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

August 30, 2025
Auteurs: Saumya Chaturvedi, Aman Chadha, Laurent Bindschaedler
cs.AI

Samenvatting

Het omzetten van natuurlijke taalvragen naar SQL-query's is een cruciaal vraagstuk in zowel de industrie als de academische wereld, met als doel de toegang tot databases en grootschalige applicaties te vergroten. Dit onderzoek bestudeert hoe in-context leren en chain-of-thought kunnen worden ingezet om een robuuste oplossing te ontwikkelen voor text-to-SQL-systemen. Wij stellen SQL-of-Thought voor: een multi-agent framework dat de Text2SQL-taak opsplitst in schema linking, subprobleemidentificatie, queryplangeneratie, SQL-generatie en een begeleide correctielus. In tegenstelling tot eerdere systemen die alleen vertrouwen op uitvoeringsgebaseerde statische correctie, introduceren wij taxonomie-geleide dynamische foutmodificatie, geïnformeerd door in-context leren. SQL-of-Thought behaalt state-of-the-art resultaten op de Spider-dataset en zijn varianten, waarbij het geleide foutentaxonomie combineert met redeneringsgebaseerde queryplanning.
English
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.
PDF91September 3, 2025