论文标题

自动思想链在大型语言模型中提示

Automatic Chain of Thought Prompting in Large Language Models

论文作者

Zhang, Zhuosheng, Zhang, Aston, Li, Mu, Smola, Alex

论文摘要

大型语言模型(LLM)可以通过生成中间推理步骤来执行复杂的推理。提供这些提示演示的步骤称为“经营链”(COT)提示。 COT提示有两个主要的范式。一个人利用一个简单的提示,例如“让我们逐步思考”,以促进逐步思考,然后再回答问题。另一个使用一些手动演示,一个由一个问题和一个导致答案的推理链组成。第二个范式的出色表现取决于特定于任务的示范的手工制作。我们表明,可以通过利用LLM的“让我们逐步思考”提示来消除此类手动努力,从而为示范,即,即不仅要逐步思考,而且要一个一个一个逐步思考。但是,这些产生的连锁店通常会带来错误。为了减轻此类错误的影响,我们发现多样性对于自动构建示范很重要。我们提出了一种自动COT提示方法:自动cot。它采样了多样性的提问,并生成推理链来构建示范。在具有GPT-3的十个公共基准推理任务上,自动cot始终匹配或超过需要手动设计的COT范式的性能。代码可从https://github.com/amazon-research/auto-cot获得

Large language models (LLMs) can perform complex reasoning by generating intermediate reasoning steps. Providing these steps for prompting demonstrations is called chain-of-thought (CoT) prompting. CoT prompting has two major paradigms. One leverages a simple prompt like "Let's think step by step" to facilitate step-by-step thinking before answering a question. The other uses a few manual demonstrations one by one, each composed of a question and a reasoning chain that leads to an answer. The superior performance of the second paradigm hinges on the hand-crafting of task-specific demonstrations one by one. We show that such manual efforts may be eliminated by leveraging LLMs with the "Let's think step by step" prompt to generate reasoning chains for demonstrations one by one, i.e., let's think not just step by step, but also one by one. However, these generated chains often come with mistakes. To mitigate the effect of such mistakes, we find that diversity matters for automatically constructing demonstrations. We propose an automatic CoT prompting method: Auto-CoT. It samples questions with diversity and generates reasoning chains to construct demonstrations. On ten public benchmark reasoning tasks with GPT-3, Auto-CoT consistently matches or exceeds the performance of the CoT paradigm that requires manual designs of demonstrations. Code is available at https://github.com/amazon-research/auto-cot

扫码加入交流群

加入微信交流群

微信交流群二维码

扫码加入学术交流群,获取更多资源