SQL-of-Thought: ガイド付きエラー修正を備えたマルチエージェント型テキストto-SQL
SQL-of-Thought: Multi-agentic Text-to-SQL with Guided Error Correction
August 30, 2025
著者: Saumya Chaturvedi, Aman Chadha, Laurent Bindschaedler
cs.AI
要旨
自然言語クエリをSQLクエリに変換することは、データベースや大規模アプリケーションへのアクセスを向上させるために、産業界と学界の両方で重要な課題です。本研究では、in-context learningとchain-of-thoughtを活用して、テキストからSQLへのシステムの堅牢なソリューションを開発する方法を検討します。私たちはSQL-of-Thoughtを提案します。これは、Text2SQLタスクをスキーマリンキング、サブ問題識別、クエリプラン生成、SQL生成、およびガイド付き修正ループに分解するマルチエージェントフレームワークです。従来のシステムが実行ベースの静的な修正にのみ依存していたのに対し、私たちはin-context learningに基づく分類法ガイド付きの動的エラー修正を導入します。SQL-of-Thoughtは、ガイド付きエラー分類法と推論ベースのクエリプランニングを組み合わせることで、Spiderデータセットとそのバリエーションにおいて最先端の結果を達成します。
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.