arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2502.14913cs.CLcs.AIcs.IR
收藏

OpenSearch-SQL: 借助动态少样本与一致性对齐增强Text-to-SQL性能

OpenSearch-SQL: Enhancing Text-to-SQL with Dynamic Few-shot and Consistency Alignment

Alibaba Cloud(阿里云)

Xiangjin Xie, Guangwei Xu, Lingyan Zhao, Ruijie Guo

AI总结:

针对多智能体LLM在Text-to-SQL任务中存在的框架不完善、指令遵循差与幻觉问题,提出含一致性对齐模块、SQL-Like中间语言及动态少样本策略的OpenSearch-SQL框架,在BIRD数据集三项指标上取得同期最优。

摘要:

尽管多智能体协作的大语言模型(LLMs)已在Text-to-SQL任务中取得重大突破,但其性能仍受多种因素制约,包括框架不完善、指令遵循失败以及模型幻觉问题。为解决这些问题,我们提出OpenSearch-SQL,它将Text-to-SQL任务划分为预处理、提取、生成、优化四个主要模块,以及一个基于一致性对齐机制的对齐模块。该架构通过对齐模块对各智能体的输入与输出进行对齐,减少指令遵循失败与幻觉问题。此外,我们设计了一种名为SQL-Like的中间语言,并基于SQL-Like优化了结构化思维链(CoT)。同时,我们以自学习Query-CoT-SQL的形式开发了一种动态少样本策略,这些方法显著提升了大语言模型在Text-to-SQL任务中的性能。\n在模型选择方面,我们直接使用基础大语言模型,未进行任何后训练,从而简化了任务链路,提升了框架的可移植性。实验结果表明,OpenSearch-SQL在BIRD开发集上的执行准确率(EX)达到69.3%,在测试集上达到72.28%,基于奖励的有效性效率得分(R-VES)为69.36%,三项指标在提交时均位列第一。这些结果证明了所提方法在有效性与效率两方面均具备综合优势。

英文摘要:

Although multi-agent collaborative Large Language Models (LLMs) have achieved significant breakthroughs in the Text-to-SQL task, their performance is still constrained by various factors. These factors include the incompleteness of the framework, failure to follow instructions, and model hallucination problems. To address these problems, we propose OpenSearch-SQL, which divides the Text-to-SQL task into four main modules: Preprocessing, Extraction, Generation, and Refinement, along with an Alignment module based on a consistency alignment mechanism. This architecture aligns the inputs and outputs of agents through the Alignment module, reducing failures in instruction following and hallucination. Additionally, we designed an intermediate language called SQL-Like and optimized the structured CoT based on SQL-Like. Meanwhile, we developed a dynamic few-shot strategy in the form of self-taught Query-CoT-SQL. These methods have significantly improved the performance of LLMs in the Text-to-SQL task. In terms of model selection, we directly applied the base LLMs without any post-training, thereby simplifying the task chain and enhancing the framework's portability. Experimental results show that OpenSearch-SQL achieves an execution accuracy(EX) of 69.3% on the BIRD development set, 72.28% on the test set, and a reward-based validity efficiency score (R-VES) of 69.36%, with all three metrics ranking first at the time of submission. These results demonstrate the comprehensive advantages of the proposed method in both effectiveness and efficiency.

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

↑