分而治之并提示:面向 Text-to-SQL 的思维链提示
Divide and Prompt: Chain of Thought Prompting for Text-to-SQL
AI总结:
针对 Text-to-SQL 中 LLM 推理能力利用不足的问题,提出 Divide-and-Prompt 范式,通过任务分解与 CoT 提示提升 SQL 生成的执行准确率。
摘要:
思维链(CoT)提示与大型语言模型(LLM)相结合,已在复杂推理任务上取得令人鼓舞的结果。Text-to-SQL 是一项关键的语义解析任务,旨在将自然语言问题转换为 SQL 语句,涉及复杂的推理过程。然而,关于使用 CoT 提示来激发 LLM 在 Text-to-SQL 任务上推理能力的工作还很少。在本研究中,我们提出了一种用于 Text-to-SQL 任务提示的新范式,称为 Divide-and-Prompt;该范式首先将任务划分为若干子任务,随后通过 CoT 处理每个子任务。我们提出了 3 种基于提示的方法,以增强 LLM 的 Text-to-SQL 能力。实验表明,这些提示能够引导 LLM 生成具有更高执行准确率的 Text-to-SQL。
英文摘要:
Chain-of-thought (CoT) prompting combined with large language models (LLMs) have achieved encouraging results on complex reasoning tasks. Text-to-SQL is a critical semantic parsing task that converts natural language questions into SQL statements, involving a complex reasoning process. However, there is little work about using CoT prompting to activate LLM's reasoning capabilities on Text-to-SQL tasks. In this work, we propose a new paradigm for prompting Text-to-SQL tasks, called Divide-and-Prompt, which first divides the task into subtasks, and then approach each subtask through CoT. We present 3 prompting-based methods to enhance the Text-to-SQL ability of LLMs. Experiments show that these prompts guide LLMs to generate Text-to-SQL with higher execution accuracy.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。