arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2512.18622cs.DBcs.AIcs.CLcs.HCcs.MA
收藏

基于小型语言模型和执行反馈的多智能体文本到SQL框架

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

Griffith University (Australia)(格里菲斯大学);VinUniversity (Vietnam)(文大学);Humboldt-Universitat zu Berlin (Germany)(柏林洪堡大学);The University of Queensland, Australia (2025)(昆士兰大学)

Thanh Dat Hoang, Thanh Trung Huynh, Matthias Weidlich, Thanh Tam Nguyen, Tong Chen, Hongzhi Yin, Quoc Viet Hung Nguyen

AI总结:

MATS是一种针对小型语言模型的文本到SQL框架,通过多智能体机制和强化学习训练方案,在有限参数下实现与大规模LLM相当的性能。

摘要:

文本到SQL(Text2SQL)任务是数据工程中的关键挑战。最近,大型语言模型(LLMs)由于其先进的理解和生成能力,在此任务中表现出色。然而,隐私和成本考虑阻止公司使用基于外部LLM服务的Text2SQL解决方案。相反,可以公开获取并可在本地托管的小型语言模型(SLMs)被采用。这些SLMs本身缺乏大语言模型的泛化能力,这会损害其在复杂任务如Text2SQL中的效果。为了解决这些限制,我们提出MATS,一种专门针对SLMs设计的Text2SQL框架。MATS使用多智能体机制,为辅助智能体分配专门的角色,减少个体工作量并促进交互。基于强化学习的训练方案利用执行过程中获得的反馈对这些智能体进行对齐,从而在有限的LLM大小下保持竞争性能。在基准数据集上的评估结果表明,MATS在单个GPU服务器上部署时,使用显著较少的参数,其准确性与大规模LLMs相当。我们的源代码和数据可在https://github.com/thanhdath/mats-sql上获得。

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑