arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2412.05850cs.CL
收藏

利用多功能大语言模型智能体实现分段数据库的协同SQL生成

Cooperative SQL Generation for Segmented Databases By Using Multi-functional LLM Agents

School of Computer Science, Northwestern Polytechnical University(西北工业大学计算机学院);Big Data Shortage and Management, MIIT(工业和信息化部大数据短缺与管理局);School of Computing, National University of Singapore(新加坡国立大学计算机学院);School of Computing and Information Systems, Singapore Management University(新加坡管理大学计算与信息系统学院)

Zhiguang Wu, Fengbin Zhu, Xuequn Shang, Yupei Zhang, Pan Zhou

AI总结:

针对Text-to-SQL任务,提出基于多功能LLM智能体的协同SQL生成框架CSMA,通过三阶段交互实现分段数据库的SQL生成,在保障数据隐私的同时达到媲美SOTA的性能。

摘要:

Text-to-SQL任务旨在根据用户文本问题自动生成SQL查询语句。为解决该问题,我们提出了一种基于多功能智能体的协同SQL生成框架(Cooperative SQL Generation framework based on Multi-functional Agents, CSMA),该框架通过各自持有部分数据库模式的大语言模型(LLM)智能体之间的信息交互实现。受人类团队协作启发,CSMA包含三个阶段:1)问题相关模式收集;2)问题对应SQL查询生成;3)SQL查询正确性检查。在第一阶段,各智能体分析自身持有的模式并相互通信,收集与问题相关的模式信息。在第二阶段,智能体利用收集到的信息尝试生成对应问题的SQL查询。在第三阶段,智能体根据自身已知信息检查SQL查询是否正确生成。这种基于交互的方法使得各智能体持有的数据库模式中与问题相关的部分都能被用于SQL生成与检查。在Spider和Bird基准上的实验表明,CSMA取得了与当前最优方法相当的高性能,同时还能保障各独立智能体内的私有数据安全。

英文摘要:

Text-to-SQL task aims to automatically yield SQL queries according to user text questions. To address this problem, we propose a Cooperative SQL Generation framework based on Multi-functional Agents (CSMA) through information interaction among large language model (LLM) based agents who own part of the database schema seperately. Inspired by the collaboration in human teamwork, CSMA consists of three stages: 1) Question-related schema collection, 2) Question-corresponding SQL query generation, and 3) SQL query correctness check. In the first stage, agents analyze their respective schema and communicate with each other to collect the schema information relevant to the question. In the second stage, agents try to generate the corresponding SQL query for the question using the collected information. In the third stage, agents check if the SQL query is created correctly according to their known information. This interaction-based method makes the question-relevant part of database schema from each agent to be used for SQL generation and check. Experiments on the Spider and Bird benckmark demonstrate that CSMA achieves a high performance level comparable to the state-of-the-arts, meanwhile holding the private data in these individual agents.

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

↑