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.