arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2305.04091cs.CL

Plan-and-Solve 提示方法:改进大语言模型的零样本思维链推理

Plan-and-Solve Prompting: Improving Zero-Shot Chain-of-Thought Reasoning by Large Language Models

Singapore Management University(新加坡管理大学);Southwest Jiaotong University(西南交通大学);Singapore University of Technology and Design(新加坡科技设计大学);East China Normal University(华东师范大学)

Lei Wang, Wanyu Xu, Yihuai Lan, Zhiqiang Hu, Yunshi Lan, Roy Ka-Wei Lee, Ee-Peng Lim

AI总结:

本文提出 Plan-and-Solve(PS)提示方法,通过先制定计划再执行子任务来改进零样本思维链推理,解决步骤缺失、计算错误和语义误解问题,并在多个推理数据集上显著优于 Zero-shot-CoT。

摘要:

大语言模型(LLMs)近来已在多种自然语言处理(NLP)任务中展现出卓越性能。为应对多步推理任务,少样本思维链(CoT)提示包含若干人工编写的逐步推理示例,使大语言模型能够显式生成推理步骤并提高其推理任务准确率。为消除人工编写成本,Zero-shot-CoT 将目标问题陈述与“让我们一步一步思考”拼接后作为输入提示提供给大语言模型。尽管 Zero-shot-CoT 取得了成功,它仍存在三个缺陷:计算错误、步骤缺失错误和语义误解错误。为解决步骤缺失错误,我们提出了 Plan-and-Solve(PS)提示方法。该方法由两部分组成:首先制定计划,将整个任务划分为较小的子任务,然后按计划执行子任务。为解决计算错误并提高所生成推理步骤的质量,我们通过加入更详细的指令来扩展 PS 提示,从而得到 PS+ 提示。我们在三类推理问题上的十个数据集上评估了所提出的提示策略。基于 GPT-3 的实验结果表明,我们提出的零样本提示在所有数据集上均以较大幅度一致优于 Zero-shot-CoT,与 Zero-shot-Program-of-Thought 提示相当或更优,并且在数学推理问题上具有与 8-shot CoT 提示相当的性能。代码可在 https://github.com/AGI-Edgerunners/Plan-and-Solve-Prompting 获取。

英文摘要:

Large language models (LLMs) have recently been shown to deliver impressive performance in various NLP tasks. To tackle multi-step reasoning tasks, few-shot chain-of-thought (CoT) prompting includes a few manually crafted step-by-step reasoning demonstrations which enable LLMs to explicitly generate reasoning steps and improve their reasoning task accuracy. To eliminate the manual effort, Zero-shot-CoT concatenates the target problem statement with "Let's think step by step" as an input prompt to LLMs. Despite the success of Zero-shot-CoT, it still suffers from three pitfalls: calculation errors, missing-step errors, and semantic misunderstanding errors. To address the missing-step errors, we propose Plan-and-Solve (PS) Prompting. It consists of two components: first, devising a plan to divide the entire task into smaller subtasks, and then carrying out the subtasks according to the plan. To address the calculation errors and improve the quality of generated reasoning steps, we extend PS prompting with more detailed instructions and derive PS+ prompting. We evaluate our proposed prompting strategy on ten datasets across three reasoning problems. The experimental results over GPT-3 show that our proposed zero-shot prompting consistently outperforms Zero-shot-CoT across all datasets by a large margin, is comparable to or exceeds Zero-shot-Program-of-Thought Prompting, and has comparable performance with 8-shot CoT prompting on the math reasoning problem. The code can be found at https://github.com/AGI-Edgerunners/Plan-and-Solve-Prompting.

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

↑