arXivDaily arXiv每日学术速递 周一至周五更新
北美退伍军人节(Veterans Day),12 日无更新
arXiv 2408.07702cs.CLcs.AIcs.IR
收藏

模式链接的终结?在推理能力强的语言模型时代的Text-to-SQL

The Death of Schema Linking? Text-to-SQL in the Age of Well-Reasoned Language Models

Distyl AI;Polytechnique Montreal(蒙特利尔理工学院)

Karime Maamari, Fadhil Abubaker, Daniel Jaroslawicz, Amine Mhedhbi

AI总结:

本研究重新审视Text-to-SQL中的模式链接,发现新LLM能处理大量不相关模式,故在模式适配上下文时放弃模式链接,并采用增强、选择和纠正技术,在BIRD基准上以71.83%准确率排名第一。

摘要:

模式链接是Text-to-SQL流水线中的关键步骤。其目标是针对用户的查询,检索目标数据库中相关的表和列,同时忽略不相关的部分。然而,不完美的模式链接常常会排除生成准确查询所需的关键列。在这项工作中,我们重新审视了在使用最新一代大型语言模型(LLMs)时的模式链接。我们通过实验发现,较新的模型即使在存在大量不相关模式元素的情况下,也能在生成过程中熟练地利用相关的模式元素。因此,我们的Text-to-SQL流水线在模式适合模型上下文窗口的情况下完全放弃模式链接,以尽量减少因过滤所需模式元素而引发的问题。此外,我们没有过滤上下文信息,而是强调了诸如增强、选择和纠正等技术,并采用这些技术来提高我们Text-to-SQL流水线的准确性。我们的方法在BIRD基准测试中排名第一,达到了71.83%的准确率。

英文摘要:

Schema linking is a crucial step in Text-to-SQL pipelines. Its goal is to retrieve the relevant tables and columns of a target database for a user's query while disregarding irrelevant ones. However, imperfect schema linking can often exclude required columns needed for accurate query generation. In this work, we revisit schema linking when using the latest generation of large language models (LLMs). We find empirically that newer models are adept at utilizing relevant schema elements during generation even in the presence of large numbers of irrelevant ones. As such, our Text-to-SQL pipeline entirely forgoes schema linking in cases where the schema fits within the model's context window in order to minimize issues due to filtering required schema elements. Furthermore, instead of filtering contextual information, we highlight techniques such as augmentation, selection, and correction, and adopt them to improve the accuracy of our Text-to-SQL pipeline. Our approach ranks first on the BIRD benchmark achieving an accuracy of 71.83%.

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

↑