ChatPaper.aiChatPaper

MTSQL-R1: 에이전트 기반 학습을 통한 장기적 다중 턴 텍스트-to-SQL 접근

MTSQL-R1: Towards Long-Horizon Multi-Turn Text-to-SQL via Agentic Training

October 12, 2025
저자: Taicheng Guo, Hai Wang, ChaoChun Liu, Mohsen Golalikhani, Xin Chen, Xiangliang Zhang, Chandan K. Reddy
cs.AI

초록

다중 턴 Text-to-SQL은 사용자의 대화 발화를 실행 가능한 SQL로 변환하면서 대화의 일관성과 대상 스키마에 대한 정합성을 유지하는 것을 목표로 합니다. 그러나 대부분의 기존 시스템은 이 작업을 단순한 텍스트 번역 작업으로 간주하고, 실행 없이 턴당 하나의 쿼리를 생성하는 단기적 패러다임을 따르며, 명시적인 검증과 개선 과정이 없어 실행 불가능하거나 일관성 없는 결과를 초래합니다. 우리는 장기적 다중 턴 Text-to-SQL을 위한 에이전트 기반 훈련 프레임워크인 MTSQL-R1을 제안합니다. 이 작업을 마르코프 결정 과정(MDP)으로 설정하여, 에이전트가 (i) 실행 피드백을 위한 데이터베이스와 (ii) 일관성 검증을 위한 지속적 대화 메모리와 상호작용하며, 모든 검증을 통과할 때까지 제안 -> 실행 -> 검증 -> 개선의 반복적인 사이클을 수행합니다. COSQL과 SPARC에 대한 실험 결과, MTSQL-R1은 강력한 베이스라인을 지속적으로 능가하며, 대화형 의미 구문 분석을 위한 환경 기반 검증과 메모리 기반 개선의 중요성을 강조합니다. 내부 검토 후 코드, 훈련된 모델, 로그, 추적 경로 등을 포함한 전체 레시피를 커뮤니티 연구에 기여하기 위해 공개할 예정입니다.
English
Multi-turn Text-to-SQL aims to translate a user's conversational utterances into executable SQL while preserving dialogue coherence and grounding to the target schema. However, most existing systems only regard this task as a simple text translation task and follow a short-horizon paradigm, generating a query per turn without execution, explicit verification, and refinement, which leads to non-executable or incoherent outputs. We present MTSQL-R1, an agentic training framework for long-horizon multi-turn Text-to-SQL. We cast the task as a Markov Decision Process (MDP) in which an agent interacts with (i) a database for execution feedback and (ii) a persistent dialogue memory for coherence verification, performing an iterative propose to execute -> verify -> refine cycle until all checks pass. Experiments on COSQL and SPARC demonstrate that MTSQL-R1 consistently outperforms strong baselines, highlighting the importance of environment-driven verification and memory-guided refinement for conversational semantic parsing. Full recipes (including code, trained models, logs, reasoning trajectories, etc.) will be released after the internal review to contribute to community research.
PDF22October 16, 2025