A Multi-agent Text2SQL Framework using Small Language Models and Execution Feedback
On the map: LLM agents and tool use → Web, search, and research agents
Abstract (arXiv)
Text2SQL, the task of generating SQL queries from natural language text, is a critical challenge in data engineering. Recently, Large Language Models (LLMs) have demonstrated superior performance for this task due to their advanced comprehension and generation capabilities. However, privacy and cost considerations prevent companies from using Text2SQL solutions based on external LLMs offered as a service. Rather, small LLMs (SLMs) that are openly available and can hosted in-house are adopted. These SLMs, in turn, lack the generalization capabilities of larger LLMs, which impairs their effectiveness for complex tasks such as Text2SQL. To address these limitations, we propose MATS, a novel Text2SQL framework designed specifically for SLMs. MATS uses a multi-agent mechanism that assigns specialized roles to auxiliary agents, reducing individual workloads and fostering interaction. A training scheme based on reinforcement learning aligns these agents using feedback obtained during execution, thereby maintaining competitive performance despite a limited LLM size. Evaluation results using on benchmark datasets show that MATS, deployed on a single- GPU server, yields accuracy that are on-par with large-scale LLMs when using significantly fewer parameters. Our source code and data are available at https://github.com/thanhdath/mats-sql.
Key facts. No citing papers in the map yet (data through 7 Oct 2026). Placed in Web, search, and research agents, one of 16 directions in LLM agents and tool use. Builds on 36 of its 50 references that are in the map. First posted on arXiv 21 Dec 2025.
Builds on
36 of 50 references.
References · 36
- 2022Training language models to follow instructions with human feedbackcited by 15,712
- 2019Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformercited by 14,491
- 2017Proximal Policy Optimization Algorithmscited by 14,441
- 2023LLaMA: Open and Efficient Foundation Language Modelscited by 13,958
- 2023Direct Preference Optimization: Your Language Model is Secretly a Reward Modelcited by 7,916
- 2022FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awarenesscited by 3,611
- 2023Generative Agents: Interactive Simulacra of Human Behaviorcited by 3,500
- 2023Self-Refine: Iterative Refinement with Self-Feedbackcited by 3,317
- 2023Code Llama: Open Foundation Models for Codecited by 2,105
- 2018Spider: A Large-Scale Human-Labeled Dataset for Complex and Cross-Domain Semantic Parsing and Text-to-SQL Taskcited by 1,120
- 2023ChatDev: Communicative Agents for Software Developmentcited by 893
- 2023StarCoder: may the source be with you!cited by 790
24 more
- 2017Seq2SQL: Generating Structured Queries from Natural Language using Reinforcement Learningcited by 679
- 2023Can LLM Already Serve as A Database Interface? A BIg Bench for Large-Scale Database Grounded Text-to-SQLscited by 667
- 2024ORPO: Monolithic Preference Optimization without Reference Modelcited by 556
- 2023DIN-SQL: Decomposed In-Context Learning of Text-to-SQL with Self-Correctioncited by 465
- 2023Text-to-SQL Empowered by Large Language Models: A Benchmark Evaluationcited by 378
- 2023How Abilities in Large Language Models are Affected by Supervised Fine-tuning Data Compositioncited by 222
- 2023RESDSQL: Decoupling Schema Linking and Skeleton Parsing for Text-to-SQLcited by 191
- 2024CodeS: Towards Building Open-source Language Models for Text-to-SQLcited by 183
- 2024MapCoder: Multi-Agent Code Generation for Competitive Problem Solvingcited by 177
- 2024CHESS: Contextual Harnessing for Efficient SQL Synthesiscited by 164
- 2023C3: Zero-shot Text-to-SQL with ChatGPTcited by 159
- 2017SQLNet: Generating Structured Queries From Natural Language Without Reinforcement Learningcited by 135
- 2020Structure-Grounded Pretraining for Text-to-SQLcited by 126
- 2023A comprehensive evaluation of ChatGPT's zero-shot Text-to-SQL capabilitycited by 118
- 2023AgentCF: Collaborative Learning with Autonomous Language Agents for Recommender Systemscited by 116
- 2021Towards Robustness of Text-to-SQL Models against Synonym Substitutioncited by 110
- 2024Small Language Models: Survey, Measurements, and Insightscited by 109
- 2018TypeSQL: Knowledge-based Type-Aware Neural Text-to-SQL Generationcited by 81
- 2018SyntaxSQLNet: Syntax Tree Networks for Complex and Cross-DomainText-to-SQL Taskcited by 74
- 2023Dr.Spider: A Diagnostic Evaluation Benchmark towards Text-to-SQL Robustnesscited by 50
- 2023SQL-PaLM: Improved Large Language Model Adaptation for Text-to-SQL (extended)cited by 42
- 2023Interleaving Pre-Trained Language Models and Large Language Models for Zero-Shot NL2SQL Generationcited by 24
- 2023Injecting the BM25 Score as Text Improves BERT-Based Re-rankerscited by 17
- 2023UNITE: A Unified Benchmark for Text-to-SQL Evaluationcited by 14
Built on by
Not cited yet.
Similar, not cited
Close in wording, no citation either way
- 2026An Agentic System for Schema Aware NL2SQL Generation
- 2025BAPPA: Benchmarking Agents, Plans, and Pipelines for Automated Text-to-SQL Generation
- 2026DualSQL: Text-to-SQL with Multi-Agent Reinforcement Learning
- 2025MARS-SQL: A multi-agent reinforcement learning framework for Text-to-SQL
- 2025Agentic NL2SQL to Reduce Computational Costs
- 2023MAC-SQL: A Multi-Agent Collaborative Framework for Text-to-SQL
- 2025Arctic-Text2SQL-R1: Simple Rewards, Strong Reasoning in Text-to-SQL
- 2025Rethinking Agentic Workflows: Evaluating Inference-Based Test-Time Scaling Strategies in Text2SQL Tasks