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

MCS-SQL:利用多提示与多选选择实现文本到SQL的生成

MCS-SQL: Leveraging Multiple Prompts and Multiple-Choice Selection For Text-to-SQL Generation

Dunamu(다나무(Dunamu))

Dongjun Lee, Choongwon Park, Jaehyuk Kim, Heesoo Park

AI总结:

针对大语言模型在复杂文本到SQL任务上性能不足的问题,提出MCS-SQL方法,通过多提示优化模式、生成候选SQL并经LLM多选筛选,在BIRD和Spider基准上准确率超越现有ICL方法且在BIRD上达新SOTA。

摘要:

大语言模型(LLMs)的最新进展催生了基于上下文学习(ICL)的方法,在文本到SQL任务上的表现显著优于微调方法。但在包含复杂模式和查询的基准测试(如BIRD)中,其性能仍远低于人类专家。本研究考虑到LLM对提示的敏感性,提出了一种利用多提示探索更广泛候选答案搜索空间并有效聚合答案的新方法。具体而言,我们通过多提示进行模式链接,对数据库模式进行鲁棒性优化。随后,基于优化后的模式和多样化提示生成多种候选SQL查询。最后,根据置信度分数筛选候选查询,并通过呈现给LLM的多选选择得到最优查询。在BIRD和Spider基准上评估时,所提方法的执行准确率分别达到65.5%和89.6%,显著优于此前基于ICL的方法。此外,我们在BIRD基准的生成查询准确率和效率上均创下新的SOTA(最优)性能。

英文摘要:

Recent advancements in large language models (LLMs) have enabled in-context learning (ICL)-based methods that significantly outperform fine-tuning approaches for text-to-SQL tasks. However, their performance is still considerably lower than that of human experts on benchmarks that include complex schemas and queries, such as BIRD. This study considers the sensitivity of LLMs to the prompts and introduces a novel approach that leverages multiple prompts to explore a broader search space for possible answers and effectively aggregate them. Specifically, we robustly refine the database schema through schema linking using multiple prompts. Thereafter, we generate various candidate SQL queries based on the refined schema and diverse prompts. Finally, the candidate queries are filtered based on their confidence scores, and the optimal query is obtained through a multiple-choice selection that is presented to the LLM. When evaluated on the BIRD and Spider benchmarks, the proposed method achieved execution accuracies of 65.5\% and 89.6\%, respectively, significantly outperforming previous ICL-based methods. Moreover, we established a new SOTA performance on the BIRD in terms of both the accuracy and efficiency of the generated queries.

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

↑