ROUTE: Robust Multitask Tuning and Collaboration for Text-to-SQL
Yang Qin, Chao Chen, Zhihang Fu, Ze Chen, Dezhong Peng, Peng Hu, Jieping Ye
Abstract
Despite the significant advancements in Text-to-SQL (Text2SQL) facilitated by large language models (LLMs), the latest state-of-the-art techniques are still trapped in the in-context learning of closed-source LLMs (e.g., GPT-4), which limits their applicability in open scenarios. To address this challenge, we propose a novel RObust mUltitask Tuning and collaboration mEthod (ROUTE) to improve the comprehensive capabilities of open-source LLMs for Text2SQL, thereby providing a more practical solution. Our approach begins with multi-task supervised fine-tuning (SFT) using various synthetic training data related to SQL generation. Unlike existing SFT-based Text2SQL methods, we introduced several additional SFT tasks, including schema linking, noise correction, and continuation writing. Engaging in a variety of SQL generation tasks enhances the model's understanding of SQL syntax and improves its ability to generate high-quality SQL queries. Additionally, inspired by the collaborative modes of LLM agents, we introduce a Multitask Collaboration Prompting (MCP) strategy. This strategy leverages collaboration across several SQL-related tasks to reduce hallucinations during SQL generation, thereby maximizing the potential of enhancing Text2SQL performance through explicit multitask capabilities. Extensive experiments and in-depth analyses have been performed on eight open-source LLMs and five widely-used benchmarks. The results demonstrate that our proposal outperforms the latest Text2SQL methods and yields promising performance. The code and data are available at here.
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.
8 top-tier papers have 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
- ReEx-SQL: Reasoning with Execution-Aware Reinforcement Learning for Text-to-SQL cites DIN-SQL: Decomposed In-Context Learning of Text-to-SQL with Self-Correction
- ReEx-SQL: Reasoning with Execution-Aware Reinforcement Learning for Text-to-SQL cites Direct Preference Optimization: Your Language Model is Secretly a Reward Model
- ReEx-SQL: Reasoning with Execution-Aware Reinforcement Learning for Text-to-SQL cites Text-to-SQL Empowered by Large Language Models: A Benchmark Evaluation
- SafeNLIDB: A Privacy-Preserving Safety Alignment Framework for LLM-based Natural Language Database Interfaces cites DIN-SQL: Decomposed In-Context Learning of Text-to-SQL with Self-Correction
- SafeNLIDB: A Privacy-Preserving Safety Alignment Framework for LLM-based Natural Language Database Interfaces cites Direct Preference Optimization: Your Language Model is Secretly a Reward Model
- SafeNLIDB: A Privacy-Preserving Safety Alignment Framework for LLM-based Natural Language Database Interfaces cites Text-to-SQL Empowered by Large Language Models: A Benchmark Evaluation
- OpenSQL: Data-Efficient Text-to-SQL for Open-Source LLMs via Synthesized Intermediate Supervision cites DIN-SQL: Decomposed In-Context Learning of Text-to-SQL with Self-Correction
- OpenSQL: Data-Efficient Text-to-SQL for Open-Source LLMs via Synthesized Intermediate Supervision cites Direct Preference Optimization: Your Language Model is Secretly a Reward Model
- OpenSQL: Data-Efficient Text-to-SQL for Open-Source LLMs via Synthesized Intermediate Supervision cites SQL-R1: Training Natural Language to SQL Reasoning Model By Reinforcement Learning
- OpenSQL: Data-Efficient Text-to-SQL for Open-Source LLMs via Synthesized Intermediate Supervision cites Text-to-SQL Empowered by Large Language Models: A Benchmark Evaluation
- OpenSQL: Data-Efficient Text-to-SQL for Open-Source LLMs via Synthesized Intermediate Supervision cites Efficient Memory Management for Large Language Model Serving with PagedAttention
- SQL-R1: Training Natural Language to SQL Reasoning Model By Reinforcement Learning cites DIN-SQL: Decomposed In-Context Learning of Text-to-SQL with Self-Correction
- SQL-R1: Training Natural Language to SQL Reasoning Model By Reinforcement Learning cites Text-to-SQL Empowered by Large Language Models: A Benchmark Evaluation
- Text-to-SQL Empowered by Large Language Models: A Benchmark Evaluation cites DIN-SQL: Decomposed In-Context Learning of Text-to-SQL with Self-Correction
- NL2SQLBench: A Modular Benchmarking Framework for LLM-Enabled NL2SQL Solutions cites DIN-SQL: Decomposed In-Context Learning of Text-to-SQL with Self-Correction
- NL2SQLBench: A Modular Benchmarking Framework for LLM-Enabled NL2SQL Solutions cites Text-to-SQL Empowered by Large Language Models: A Benchmark Evaluation
Cited by top-tier papers8
- 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
- ReEx-SQL: Reasoning with Execution-Aware Reinforcement Learning for Text-to-SQLYaxun Dai, Wenxuan Xie, Xialie Zhuang, Tianyu Yang et al.ACL 2026 · 8 citations
- OpenSQL: Data-Efficient Text-to-SQL for Open-Source LLMs via Synthesized Intermediate SupervisionRuilin Hu, Yuyu Luo, Guoliang Li, Shuangqiao Wu et al.VLDB 2026 · 4 citations
- SafeNLIDB: A Privacy-Preserving Safety Alignment Framework for LLM-based Natural Language Database InterfacesRuiheng Liu, Xiaobing Chen, Jinyu Zhang, Qiongwen Zhang et al.AAAI 2026 · 1 citation
- NL2SQLBench: A Modular Benchmarking Framework for LLM-Enabled NL2SQL SolutionsShizheng Hou, Wenqi Pei, Nuo Chen, Quang-Trung Ta et al.VLDB 2026 · 1 citation
Builds on20
- Direct Preference Optimization: Your Language Model is Secretly a Reward ModelRafael Rafailov, Archit Sharma, Eric Mitchell, Christopher D. Manning et al.NeurIPS 2023 · 10,924 citations
- Teaching Large Language Models to Self-DebugXinyun Chen, Maxwell Lin, Nathanael Schärli, Denny ZhouICLR 2024 · 1,085 citations
- Efficient Memory Management for Large Language Model Serving with PagedAttentionWoosuk Kwon, Zhuohan Li, Siyuan Zhuang, Ying Sheng et al.SOSP 2023 · 1,016 citations
- DIN-SQL: Decomposed In-Context Learning of Text-to-SQL with Self-CorrectionMohammadreza Pourreza, Davood RafieiNeurIPS 2023 · 909 citations
- Text-to-SQL Empowered by Large Language Models: A Benchmark EvaluationDawei Gao, Haibin Wang, Yaliang Li, Xiuyu Sun et al.VLDB 2024 · 609 citations
Related papers
- OmniSQL: Synthesizing High-quality Text-to-SQL Data at ScaleHaoyang Li, Shang Wu, Xiaokang Zhang, Xinmei Huang et al.VLDB 2025 · 90 citations
- Before Generation, Align it! A Novel and Effective Strategy for Mitigating Hallucinations in Text-to-SQL GenerationGe Qu, Jinyang Li, Bowen Li, Bowen Qin et al.ACL Findings 2024 · 32 citations
- Alpha-SQL: Zero-Shot Text-to-SQL using Monte Carlo Tree SearchBoyan Li, Jiayi Zhang, Ju Fan, Yanwei Xu et al.ICML 2025
- SPFT-SQL: Enhancing Large Language Model for Text-to-SQL Parsing by Self-Play Fine-TuningYuhao Zhang, Shaoming Duan, Jinhang Su, Chuanyi Liu et al.EMNLP Findings 2025 · 1 citation
- Battle of the Large Language Models: Dolly vs LLaMA vs Vicuna vs Guanaco vs Bard vs ChatGPT - A Text-to-SQL Parsing ComparisonShuo Sun, Yuchen Zhang, Jiahuan Yan, Yuze Gao et al.EMNLP Findings 2023 · 9 citations
