MTSQL-R1: Towards Long-Horizon Multi-Turn Text-to-SQL via Agentic Training
Taicheng Guo, Hai Wang, Chaochun Liu, Mohsen Golalikhani, Xin Chen, Xiangliang Zhang, Chandan K. Reddy
Abstract
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.
Ask Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
1 top-tier paper has cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- SQL-R1: Training Natural Language to SQL Reasoning Model By Reinforcement Learning cites RESDSQL: Decoupling Schema Linking and Skeleton Parsing for Text-to-SQL
- SQL-R1: Training Natural Language to SQL Reasoning Model By Reinforcement Learning cites Text-to-SQL Empowered by Large Language Models: A Benchmark Evaluation
- MARS-SQL: A Multi-Agent Reinforcement Learning Framework For Text-To-SQL cites Text-to-SQL Empowered by Large Language Models: A Benchmark Evaluation
- Text-to-SQL Empowered by Large Language Models: A Benchmark Evaluation cites RESDSQL: Decoupling Schema Linking and Skeleton Parsing for Text-to-SQL
- ACT-SQL: In-Context Learning for Text-to-SQL with Automatically-Generated Chain-of-Thought cites Grounded Adaptation for Zero-shot Executable Semantic Parsing
Cited by top-tier papers1
Builds on9
- Text-to-SQL Empowered by Large Language Models: A Benchmark EvaluationDawei Gao, Haibin Wang, Yaliang Li, Xiuyu Sun et al.VLDB 2024 · 609 citations
- RESDSQL: Decoupling Schema Linking and Skeleton Parsing for Text-to-SQLHaoyang Li, Jing Zhang, Cuiping Li, Hong ChenAAAI 2023 · 343 citations
- SQL-R1: Training Natural Language to SQL Reasoning Model By Reinforcement LearningPeixian Ma, Xialie Zhuang, Chengjin Xu, Xuhui Jiang et al.NeurIPS 2025 · 94 citations
- Grounded Adaptation for Zero-shot Executable Semantic ParsingVictor Zhong, Mike Lewis, Sida I. Wang, Luke ZettlemoyerEMNLP 2020 · 85 citations
- ACT-SQL: In-Context Learning for Text-to-SQL with Automatically-Generated Chain-of-ThoughtHanchong Zhang, Ruisheng Cao, Lu Chen, Hongshen Xu et al.EMNLP Findings 2023 · 54 citations
Related papers
- Tracking Interaction States for Multi-Turn Text-to-SQL Semantic ParsingRunze Wang, Zhen-Hua Ling, Jingbo Zhou, Yu HuAAAI 2021 · 29 citations
- Decoupled Dialogue Modeling and Semantic Parsing for Multi-Turn Text-to-SQLZhi Chen, Lu Chen, Hanqi Li, Ruisheng Cao et al.ACL Findings 2021 · 20 citations
- CQR-SQL: Conversational Question Reformulation Enhanced Context-Dependent Text-to-SQL ParsersDongling Xiao, Linzheng Chai, Qian-Wen Zhang, Zhao Yan et al.EMNLP Findings 2022 · 14 citations
- MIGA: A Unified Multi-Task Generation Framework for Conversational Text-to-SQLYingwen Fu, Wenjie Ou, Zhou Yu, Yue LinAAAI 2023 · 14 citations
- STAR: SQL Guided Pre-Training for Context-dependent Text-to-SQL ParsingZefeng Cai, Xiangyu Li, Binyuan Hui, Min Yang et al.EMNLP Findings 2022 · 27 citations
