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

面向大语言模型文本转SQL任务的多轮交互方法

Multi-Turn Interactions for Text-to-SQL with Large Language Models

Peking University(北京大学);Zuoyebang Education Technology Co., Ltd.(佐元邦教育科技有限公司)

Guanming Xiong, Junwei Bao, Hongfei Jiang, Yang Song, Wen Zhao

AI总结:

针对现有大语言模型文本转SQL方法处理宽表效率低、交互设计通用性不足等问题,提出Interactive-T2S多轮交互框架,在Spider、BIRD等数据集上取得了最优性能。

摘要:

本研究利用大语言模型(LLMs)的强大推理能力探索text-to-SQL解析任务。尽管近期相关研究取得了一定进展,但现有基于LLM的方法仍存在效率低下的问题,难以有效处理涉及宽表的场景。此外,当前基于交互的方法要么缺乏分步、可解释的SQL生成流程,要么无法提供通用适用的交互设计。为解决上述挑战,我们提出了Interactive-T2S框架,该框架通过与数据库直接交互生成SQL查询,包含四个通用工具,可支持LLM主动、高效地检索信息。同时,我们制作了详细示例以展示框架内的分步推理过程。我们的方法在Spider、BIRD数据集及其变体上均取得了先进性能,尤其在无先知知识设置下的BIRD排行榜上取得了当前最优结果,证明了该方法的有效性。

英文摘要:

This study explores text-to-SQL parsing by leveraging the powerful reasoning capabilities of large language models (LLMs). Despite recent advancements, existing LLM-based methods are still inefficient and struggle to handle cases with wide tables effectively. Furthermore, current interaction-based approaches either lack a step-by-step, interpretable SQL generation process or fail to provide a universally applicable interaction design. To address these challenges, we introduce Interactive-T2S, a framework that generates SQL queries through direct interactions with databases. This framework includes four general tools that facilitate proactive and efficient information retrieval by the LLM. Additionally, we have developed detailed exemplars to demonstrate the step-wise reasoning processes within our framework. Our approach achieves advanced performance on the Spider and BIRD datasets as well as their variants. Notably, we obtain state-of-the-art results on the BIRD leaderboard under the setting without oracle knowledge, demonstrating the effectiveness of our method.

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

↑