探索面向文本到SQL的思维链式提示方法
Exploring Chain-of-Thought Style Prompting for Text-to-SQL
AI总结:
本文系统研究思维链式提示对文本到SQL解析的作用,发现迭代提示和过细推理步骤可能带来错误传播,并提出一种新的CoT式提示方法,在Spider开发集和Spider Realistic集上分别取得5.2和6.5个百分点的绝对提升。
摘要:
近年来,基于大语言模型(LLMs)的上下文学习因其在各种任务上出色的少样本性能而受到越来越多的关注。然而,其在文本到SQL解析上的性能仍有很大的提升空间。在本文中,我们假设大语言模型在文本到SQL解析上需要改进的一个关键方面是其多步推理能力。因此,我们系统地研究了如何通过思维链(CoT)式提示来增强大语言模型的推理能力,包括原始思维链提示(Wei et al., 2022b)和从最少到最多提示(Zhou et al., 2023)。我们的实验表明,Zhou et al.(2023)中的迭代提示对于文本到SQL解析可能是不必要的,并且使用详细的推理步骤往往会产生更多的错误传播问题。基于这些发现,我们提出了一种新的面向文本到SQL解析的CoT式提示方法。与不使用推理步骤的标准提示方法相比,它在Spider开发集和Spider Realistic集上分别带来了5.2和6.5个百分点的绝对提升;与从最少到最多提示方法相比,分别带来了2.4和1.5个百分点的绝对提升。
英文摘要:
In-context learning with large language models (LLMs) has recently caught increasing attention due to its superior few-shot performance on various tasks. However, its performance on text-to-SQL parsing still has much room for improvement. In this paper, we hypothesize that a crucial aspect of LLMs to improve for text-to-SQL parsing is their multi-step reasoning ability. Thus, we systematically study how to enhance LLMs' reasoning ability through chain of thought (CoT) style prompting, including the original chain-of-thought prompting (Wei et al., 2022b) and least-to-most prompting (Zhou et al., 2023). Our experiments demonstrate that iterative prompting as in Zhou et al. (2023) may be unnecessary for text-to-SQL parsing, and using detailed reasoning steps tends to have more error propagation issues. Based on these findings, we propose a new CoT-style prompting method for text-to-SQL parsing. It brings 5.2 and 6.5 point absolute gains on the Spider development set and the Spider Realistic set, respectively, compared to the standard prompting method without reasoning steps; 2.4 and 1.5 point absolute gains, compared to the least-to-most prompting method.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。