[论文解读] Automatic Chain of Thought Prompting in Large Language Models
Auto-CoT 自动构建多样化的链式思维演示,利用聚类和零-shot 推理,在十个推理基准上实现与人工设计演示相当或更优的性能。
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
研究动机与目标
- 通过自动化演示设计来减少在链式推理提示中的人工工作量。
- 展示自动生成演示的多样性如何提升链式推理的性能。
- 证明 Auto-CoT 在算术、常识与符号推理任务中的有效性。
提出的方法
- 使用 Sentence-BERT 表示与 k-means 将问题聚类为多样化的分组。
- 从每个簇中选取一个代表性问题,并通过 Zero-Shot-CoT 提示生成一个推理链以形成一个演示。
- 构建 k 个演示(每个簇一个),并将它们与测试问题并排作为上下文提示连接。
- 应用简单的启发式方法来筛选演示(例如对问题和推理理由的长度进行约束)
- 使用 GPT-3(text-davinci-002)和 Codex 对 Auto-CoT 进行评估,与 Zero-Shot-CoT、Zero-Shot-CoT、Few-Shot 和 Manual-CoT 基线进行比较。
- 比较覆盖算术、常识和符号推理的十个数据集上的性能。
实验结果
研究问题
- RQ1由多样性驱动的自动化 CoT 演示构建是否能够达到甚至超过人工设计的演示?
- RQ2基于多样性抽样是否能减轻 Auto-CoT 中零-shot 推理链的错误(通过相似性产生的误导)?
- RQ3Auto-CoT 在多样化推理任务以及不同的语言模型骨干(GPT-3 与 Codex)上表现如何?
主要发现
- 在使用 GPT-3 时,Auto-CoT 在十个推理数据集上始终达到或超过 Manual-CoT。
- 在算术数据集上,Auto-CoT 的准确率接近甚至优于 Manual-CoT(例如 MultiArith: 92.0 vs 91.7)。
- Auto-CoT 在 GSM8K、AddSub、AQuA、SingleEq、SVAMP、CSQA、Strategy、Letter 和 Coin 数据集上保持竞争力或优于 Manual-CoT。
- 使用 Codex 时,Auto-CoT 仍具竞争力,且通常优于 Manual-CoT(例如 MultiArith:Manual-CoT 96.8、Auto-CoT 93.2;AddSub:Manual-CoT 84.6、Auto-CoT 91.9)。
- 基于多样性采样的 Auto-CoT 展示了对错误演示的鲁棒性,当错误演示增加时,超越簇内采样。
- Auto-CoT 通过 Auto-CoT* 引导自适应流式场景,在初始批次后显示出与 Manual-CoT 相媲美的性能。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。