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

CHASE-SQL:Text-to-SQL中的多路径推理与偏好优化候选选择

CHASE-SQL: Multi-Path Reasoning and Preference Optimized Candidate Selection in Text-to-SQL

Google Cloud(谷歌云);Stanford University(斯坦福大学)

Mohammadreza Pourreza, Hailong Li, Ruoxi Sun, Yeounoh Chung, Shayan Talaei, Gaurav Tarlok Kakkar, Yu Gan, Amin Saberi, Fatma Ozcan, Sercan O. Arik

AI总结:

CHASE-SQL通过多智能体测试时计算、分而治之分解、执行计划思维链和实例感知合成示例生成多样SQL候选,并用微调选择智能体进行成对比较排序,在BIRD基准上取得73.0%和73.01%的最先进执行准确率。

摘要:

为应对大语言模型(LLM)在Text-to-SQL任务中的性能挑战,我们提出了CHASE-SQL,这是一个新框架,采用创新策略,在多智能体建模中利用测试时计算来改进候选生成与选择。CHASE-SQL利用LLM的内在知识,通过不同的LLM生成器生成多样且高质量的SQL候选,具体包括:(1)分而治之方法,在单次LLM调用中将复杂查询分解为可管理的子查询;(2)基于查询执行计划的思维链推理,反映数据库引擎在执行过程中所采取的步骤;(3)一种独特的实例感知合成示例生成技术,为测试问题提供量身定制的少样本演示。为识别最佳候选,采用一个选择智能体,通过微调后的二元候选选择LLM进行成对比较来对候选排序。该选择方法已被证明比替代方案更稳健。所提出的生成器-选择器框架不仅提升了SQL查询的质量和多样性,而且优于先前方法。总体而言,我们提出的CHASE-SQL在著名的BIRD Text-to-SQL数据集基准的测试集和开发集上分别达到了73.0%和73.01%的最先进执行准确率,使CHASE-SQL成为排行榜上的最佳提交(在论文提交时)。

英文摘要:

In tackling the challenges of large language model (LLM) performance for Text-to-SQL tasks, we introduce CHASE-SQL, a new framework that employs innovative strategies, using test-time compute in multi-agent modeling to improve candidate generation and selection. CHASE-SQL leverages LLMs' intrinsic knowledge to generate diverse and high-quality SQL candidates using different LLM generators with: (1) a divide-and-conquer method that decomposes complex queries into manageable sub-queries in a single LLM call; (2) chain-of-thought reasoning based on query execution plans, reflecting the steps a database engine takes during execution; and (3) a unique instance-aware synthetic example generation technique, which offers specific few-shot demonstrations tailored to test questions.To identify the best candidate, a selection agent is employed to rank the candidates through pairwise comparisons with a fine-tuned binary-candidates selection LLM. This selection approach has been demonstrated to be more robust over alternatives. The proposed generators-selector framework not only enhances the quality and diversity of SQL queries but also outperforms previous methods. Overall, our proposed CHASE-SQL achieves the state-of-the-art execution accuracy of 73.0% and 73.01% on the test set and development set of the notable BIRD Text-to-SQL dataset benchmark, rendering CHASE-SQL the top submission of the leaderboard (at the time of paper submission).

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

↑