arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2409.10007cs.CLcs.AI
收藏

SelECT-SQL: 用于Text-to-SQL的自校正集成思维链

SelECT-SQL: Self-correcting ensemble Chain-of-Thought for Text-to-SQL

Information Sciences Institute(信息科学研究所);University of Southern California(南加州大学)

Ke Shen, Mayank Kejriwal

AI总结:

针对Text-to-SQL任务中现有大语言模型性能不足的问题,提出结合思维链提示、自校正和集成方法的SelECT-SQL上下文学习方案,在Spider基准上取得了超越GPT-4的最优性能。

摘要:

近年来,Text-to-SQL(将自然语言提出的问题自动转换为正式SQL查询的任务)已成为自然语言处理与数据管理研究交叉领域的重要问题。大语言模型(LLM)在开箱即用的情况下已展现出出色性能,但仍远未达到预期的专家级水平。当需要对数据库模式、问题和SQL子句进行细致理解以完成准确的Text-to-SQL转换时,出错概率尤其高。我们提出了SelECT-SQL,这是一种新颖的上下文学习解决方案,它通过算法结合思维链(CoT)提示、自校正和集成方法,在具有挑战性的Text-to-SQL基准上取得了新的最优结果。具体而言,当以GPT-3.5-Turbo作为基础大语言模型配置时,SelECT-SQL在Spider排行榜的开发集上达到了84.2%的执行准确率,超过了其他基于GPT-3.5-Turbo的基线方案的最佳结果(81.1%),也超过了排行榜上报告的GPT-4的峰值性能(83.5%)。

英文摘要:

In recent years,Text-to-SQL, the problem of automatically converting questions posed in natural language to formal SQL queries, has emerged as an important problem at the intersection of natural language processing and data management research. Large language models (LLMs) have delivered impressive performance when used in an off-the-shelf performance, but still fall significantly short of expected expert-level performance. Errors are especially probable when a nuanced understanding is needed of database schemas, questions, and SQL clauses to do proper Text-to-SQL conversion. We introduce SelECT-SQL, a novel in-context learning solution that uses an algorithmic combination of chain-of-thought (CoT) prompting, self-correction, and ensemble methods to yield a new state-of-the-art result on challenging Text-to-SQL benchmarks. Specifically, when configured using GPT-3.5-Turbo as the base LLM, SelECT-SQL achieves 84.2% execution accuracy on the Spider leaderboard's development set, exceeding both the best results of other baseline GPT-3.5-Turbo-based solutions (81.1%), and the peak performance (83.5%) of the GPT-4 result reported on the leaderboard.

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

↑