A Multi-agent Text2SQL Framework using Small Language Models and Execution Feedback

Fuente: arXiv
Salvato in:
Dettagli Bibliografici
Autori principali: Hoang, Thanh Dat, Huynh, Thanh Trung, Weidlich, Matthias, Nguyen, Thanh Tam, Chen, Tong, Yin, Hongzhi, Nguyen, Quoc Viet Hung
Natura: Preprint
Pubblicazione: 2025
Soggetti:
Accesso online:
Tags: Aggiungi Tag
Nessun Tag, puoi essere il primo ad aggiungerne!!
_version_ 1866915688513273856
author Hoang, Thanh Dat
Huynh, Thanh Trung
Weidlich, Matthias
Nguyen, Thanh Tam
Chen, Tong
Yin, Hongzhi
Nguyen, Quoc Viet Hung
author_facet Hoang, Thanh Dat
Huynh, Thanh Trung
Weidlich, Matthias
Nguyen, Thanh Tam
Chen, Tong
Yin, Hongzhi
Nguyen, Quoc Viet Hung
contents 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.
format Preprint
id arxiv_https___arxiv_org_abs_2512_18622
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle A Multi-agent Text2SQL Framework using Small Language Models and Execution Feedback
Hoang, Thanh Dat
Huynh, Thanh Trung
Weidlich, Matthias
Nguyen, Thanh Tam
Chen, Tong
Yin, Hongzhi
Nguyen, Quoc Viet Hung
Databases
Artificial Intelligence
Computation and Language
Human-Computer Interaction
Multiagent Systems
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.
title A Multi-agent Text2SQL Framework using Small Language Models and Execution Feedback
topic Databases
Artificial Intelligence
Computation and Language
Human-Computer Interaction
Multiagent Systems
url https://arxiv.org/abs/2512.18622