arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2509.05899cs.LGcs.DB
收藏

X-SQL:基于多大型语言模型的专家模式链接与文本到SQL理解

X-SQL: Expert Schema Linking and Understanding of Text-to-SQL with Multi-LLMs

Dazhi Peng

AI总结:

针对Text-to-SQL中模式信息被忽视的问题,提出X-SQL框架,包含X-Linking和X-Admin组件,结合多LLM,在Spider数据集上取得领先执行准确率。

摘要:

随着大型语言模型(LLMs)在代码生成任务中展现出涌现能力,文本到SQL(Text-to-SQL)已成为最受欢迎的下游应用之一。尽管近期多个基于LLM的Text-to-SQL框架取得了强劲结果,研究社区往往忽视了数据库模式信息对于生成高质量SQL查询的重要性。我们发现,此类模式信息在Text-to-SQL任务中起着显著甚至主导的作用。为应对这一挑战,我们提出了一种新颖的数据库模式专家,包含两个组件。首先,我们引入了X-Linking,一种基于LLM监督微调(SFT)的方法,与现有开源Text-to-SQL方法相比,实现了更优的模式链接结果。此外,我们创新性地提出了X-Admin组件,通过弥合抽象模式信息与用户自然语言问题之间的差距,专注于模式理解。除了更好地利用模式信息进行学习外,我们还针对系统内的不同组件实验了多LLM,以进一步提升性能。通过将这些技术整合到我们的端到端框架X-SQL中,我们在Spider-Dev数据集上实现了84.9%的执行准确率,在Spider-Test数据集上实现了82.5%的执行准确率。这一卓越性能使X-SQL成为基于开源模型的领先Text-to-SQL框架。

英文摘要:

With Large Language Models' (LLMs) emergent abilities on code generation tasks, Text-to-SQL has become one of the most popular downstream applications. Despite the strong results of multiple recent LLM-based Text-to-SQL frameworks, the research community often overlooks the importance of database schema information for generating high-quality SQL queries. We find that such schema information plays a significant or even dominant role in the Text-to-SQL task. To tackle this challenge, we propose a novel database schema expert with two components. We first introduce X-Linking, an LLM Supervised Finetuning (SFT)-based method that achieves superior Schema Linking results compared to existing open-source Text-to-SQL methods. In addition, we innovatively propose an X-Admin component that focuses on Schema Understanding by bridging the gap between abstract schema information and the user's natural language question. Aside from better learning with schema information, we experiment with Multi-LLMs for different components within the system to further boost its performance. By incorporating these techniques into our end-to-end framework, X-SQL, we have achieved Execution Accuracies of 84.9% on the Spider-Dev dataset and 82.5% on the Spider-Test dataset. This outstanding performance establishes X-SQL as the leading Text-to-SQL framework based on open-source models.

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

↑