SQL-of-Thought: 가이드된 오류 수정을 통한 다중 에이전트 텍스트-투-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 질의로 변환하는 것은 데이터베이스 및 대규모 애플리케이션에 대한 접근성을 높이기 위해 산업계와 학계 모두에서 중요한 과제로 여겨진다. 본 연구는 텍스트-투-SQL 시스템을 위한 강력한 솔루션을 개발하기 위해 인컨텍스트 학습과 사고의 연쇄를 활용하는 방법을 탐구한다. 우리는 SQL-of-Thought를 제안한다: 이는 Text2SQL 작업을 스키마 연결, 하위 문제 식별, 질의 계획 생성, SQL 생성, 그리고 가이드된 수정 루프로 분해하는 다중 에이전트 프레임워크이다. 실행 기반 정적 수정에만 의존하는 기존 시스템과 달리, 우리는 인컨텍스트 학습을 통해 정보를 얻은 분류 체계 기반 동적 오류 수정을 도입한다. 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.