---
title: "Chain-of-Thought Prompting — 思维链提示"
source: "https://systems-analysis.info/int/Chain-of-Thought_Prompting_%E2%80%94_%E6%80%9D%E7%BB%B4%E9%93%BE%E6%8F%90%E7%A4%BA"
wiki: "systems-analysis.info/int"
article: "Chain-of-Thought_Prompting_—_思维链提示"
language: "zh"
categories:
  - "Category:Chinese"
  - "Category:Large language models"
  - "Category:Machine learning"
  - "Category:Prompt engineering"
revision_id: 865
wiki_created_at: 2026-09-06T22:39:56Z
wiki_modified_at: 2026-09-06T22:39:56Z
downloaded_at: 2026-09-07T22:42:45Z
---

# Chain-of-Thought Prompting — 思维链提示

**Chain-of-Thought Prompting** (**CoT**, 思维链提示) 是一种提示工程 (prompt engineering) 的方法，旨在提升大型语言模型 (LLM) 解决需要多步推理的复杂任务的能力。CoT 提示并非直接生成答案，而是引导模型首先明确地生成一系列通往最终结论的中间推理步骤。

这种方法模仿了人类的思维过程，显著提高了模型在算术、逻辑和符号任务上的准确性。

## 关键思想

CoT 的基本原则是让模型在给出最终答案之前，用自然语言“出声思考”。生成这些中间步骤可以：

- 分解复杂任务：模型将复杂问题分解为更小、更易于管理的子任务，并依次专注于每一个子任务。
- 减少错误：分步过程降低了逻辑错误的概率，这些错误在尝试一步到位给出答案时经常发生。
- 提高透明度和可解释性：用户和开发人员可以看到模型的逻辑，这有助于调试、验证和建立对结果的信任。

## 历史背景

CoT 方法由 Google Research 的研究人员于2022年1月28日在论文《Chain of Thought Prompting Elicits Reasoning in Large Language Models》(Jason Wei, Denny Zhou et al.)<sup>[\[1\]](https://systems-analysis.info/int/Chain-of-Thought_Prompting_%E2%80%94_%E6%80%9D%E7%BB%B4%E9%93%BE%E6%8F%90%E7%A4%BA#cite_note-:0-1)</sup> 中首次提出。他们发现，向模型提供几个带有分步解决方案的任务示例 (few-shot CoT) 能极大地提升其在复杂任务上的性能。

这一发现表明，多步推理能力是大型模型的涌现属性。正如原始论文所指出的，CoT 仅在达到一定规模（约1000亿参数或更多）的模型上才能带来性能提升，而在较小的模型上几乎无效，后者在使用 CoT 时可能会生成不合逻辑的推理，表现更差。

## CoT 提示的类型

### Few-Shot CoT: Training on examples - 少样本 CoT：通过示例学习

这是最初始也是最可靠的 CoT 方法。

- 原理：向模型提供几个（通常为2到8个）示例，每个示例都包含：**问题 - 推理链 - 答案**。
- 优点：准确性高，因为模型学习了特定的推理风格和格式。
- 缺点：需要手动创建高质量且多样化的示例。

### Zero-Shot CoT: "Let's think step by step" - 零样本 CoT：“让我们一步一步地思考”

该方法由 Takeshi Kojima 等人于2022年5月24日在论文《Large Language Models are Zero-Shot Reasoners》<sup>[\[2\]](https://systems-analysis.info/int/Chain-of-Thought_Prompting_%E2%80%94_%E6%80%9D%E7%BB%B4%E9%93%BE%E6%8F%90%E7%A4%BA#cite_note-2)</sup> 中提出，是一种更为简单的变体。

- 原理：在原始请求中添加一个简单的触发短语，例如，“*让我们一步一步地思考*” (英语："*Let's think step by step*")。
- 优点：简单、灵活，无需示例。
- 缺点：对于非常特殊的任务，其准确性可能低于少样本 CoT。

### Automatic CoT (Auto-CoT) - 自动 CoT

该方法由 Zhang 等人 (2022) 在其论文<sup>[\[3\]](https://systems-analysis.info/int/Chain-of-Thought_Prompting_%E2%80%94_%E6%80%9D%E7%BB%B4%E9%93%BE%E6%8F%90%E7%A4%BA#cite_note-3)</sup> 中提出，自动化了为少样本 CoT 创建演示示例的过程。

- 原理：

1.  对新数据集中的问题进行聚类。
2.  从每个聚类中选择一个代表性问题。
3.  使用零样本 CoT 为这些问题生成推理链。
4.  将生成的演示示例用于构建提示。

- 目标：旨在减少人工工作量并扩展 CoT 的应用，同时达到与手动创建示例相当的性能。

### Multimodal CoT - 多模态 CoT

将 CoT 应用于包含多种模态（文本和图像）数据的任务。

- 原理：模型生成连接文本和视觉信息的推理过程。
- 应用：分析图表、解决视觉谜题。

## 机制与有效性

- 改善推理：CoT 引导模型通过结构化的解决过程，最大限度地减少逻辑错误，并使其能更有效地利用其知识库。
- 经验证据：CoT 的有效性在复杂的基准测试中尤为明显。例如，在算术基准 GSM8K 上，基本的少样本 CoT 方法将 PaLM-540B 模型的准确率从 17.9% 提高到了 58.1%。而应用基于 CoT 的更先进技术（如 Self-Consistency），准确率可达到 74–78%。
- 推理格式的作用：研究表明，即使是中间步骤错误的示例，只要保持了整体推理结构，也能改善结果。这表明 CoT 主要是在教模型如何进行分步思考的格式。

## 与其他技术的关联

CoT 是更先进方法的基础组成部分：

- **Self-Consistency**: 为同一个问题生成多个不同的 CoT 链，并通过投票选择最常见的答案。这显著提高了可靠性，在 GSM8K<sup>[\[4\]](https://systems-analysis.info/int/Chain-of-Thought_Prompting_%E2%80%94_%E6%80%9D%E7%BB%B4%E9%93%BE%E6%8F%90%E7%A4%BA#cite_note-4)</sup> (+17.9%)<sup>[\[5\]](https://systems-analysis.info/int/Chain-of-Thought_Prompting_%E2%80%94_%E6%80%9D%E7%BB%B4%E9%93%BE%E6%8F%90%E7%A4%BA#cite_note-5)</sup>、SVAMP<sup>[\[6\]](https://systems-analysis.info/int/Chain-of-Thought_Prompting_%E2%80%94_%E6%80%9D%E7%BB%B4%E9%93%BE%E6%8F%90%E7%A4%BA#cite_note-6)</sup> (+11.0%)<sup>[\[1\]](https://systems-analysis.info/int/Chain-of-Thought_Prompting_%E2%80%94_%E6%80%9D%E7%BB%B4%E9%93%BE%E6%8F%90%E7%A4%BA#cite_note-:0-1)</sup> 和 AQuA<sup>[\[7\]](https://systems-analysis.info/int/Chain-of-Thought_Prompting_%E2%80%94_%E6%80%9D%E7%BB%B4%E9%93%BE%E6%8F%90%E7%A4%BA#cite_note-7)</sup> (+12.2%)<sup>[\[1\]](https://systems-analysis.info/int/Chain-of-Thought_Prompting_%E2%80%94_%E6%80%9D%E7%BB%B4%E9%93%BE%E6%8F%90%E7%A4%BA#cite_note-:0-1)</sup> 等基准测试中带来了准确率的提升。
- **Tree of Thoughts (ToT):** 它对 CoT 进行了泛化，不是探索单一的推理路径，而是探索一个由多种可能路径组成的“思维树”。与 CoT 的线性链条不同，ToT 允许模型探索多个分支，评估中间“想法”，并在发现路径没有前景时进行回溯 (backtracking)。这使得模型能够解决更复杂的任务，在这些任务中，简单的线性推理是不够的（例如，将“24点游戏”<sup>[\[8\]](https://systems-analysis.info/int/Chain-of-Thought_Prompting_%E2%80%94_%E6%80%9D%E7%BB%B4%E9%93%BE%E6%8F%90%E7%A4%BA#cite_note-8)</sup> 任务的解决准确率从 4% 提高到 74%）<sup>[\[9\]](https://systems-analysis.info/int/Chain-of-Thought_Prompting_%E2%80%94_%E6%80%9D%E7%BB%B4%E9%93%BE%E6%8F%90%E7%A4%BA#cite_note-9)</sup>。

## 参见

- 大型语言模型
- 提示工程
- 涌现

## 参考文献

- Wei, J. et al. (2022). *Chain-of-Thought Prompting Elicits Reasoning in Large Language Models*. <a href="https://arxiv.org/abs/2201.11903" class="external text" rel="nofollow">arXiv:2201.11903</a>.
- Wang, X. et al. (2022). *Self-Consistency Improves Chain of Thought Reasoning in Language Models*. <a href="https://arxiv.org/abs/2203.11171" class="external text" rel="nofollow">arXiv:2203.11171</a>.
- Kojima, T. et al. (2022). *Large Language Models are Zero-Shot Reasoners*. <a href="https://arxiv.org/abs/2205.11916" class="external text" rel="nofollow">arXiv:2205.11916</a>.
- Zhou, D. et al. (2022). *Least-to-Most Prompting Enables Complex Reasoning in Large Language Models*. <a href="https://arxiv.org/abs/2205.10625" class="external text" rel="nofollow">arXiv:2205.10625</a>.
- Zhang, Z. et al. (2022). *Automatic Chain of Thought Prompting in Large Language Models*. <a href="https://arxiv.org/abs/2210.03493" class="external text" rel="nofollow">arXiv:2210.03493</a>.
- Lyu, Q. et al. (2023). *Faithful Chain-of-Thought Reasoning*. <a href="https://arxiv.org/abs/2301.13379" class="external text" rel="nofollow">arXiv:2301.13379</a>.
- Wang, X. et al. (2023). *Deductive Verification of Chain-of-Thought Reasoning*. <a href="https://arxiv.org/abs/2306.03872" class="external text" rel="nofollow">arXiv:2306.03872</a>.
- Yao, S. et al. (2023). *Tree of Thoughts: Deliberate Problem Solving with Large Language Models*. <a href="https://arxiv.org/abs/2305.10601" class="external text" rel="nofollow">arXiv:2305.10601</a>.
- Lightman, H. et al. (2023). *Let’s Verify Step by Step*. <a href="https://arxiv.org/abs/2305.20050" class="external text" rel="nofollow">arXiv:2305.20050</a>.
- Yang, B. et al. (2025). *Hallucination Detection in Large Language Models with Metamorphic Relations*. <a href="https://arxiv.org/abs/2502.15844" class="external text" rel="nofollow">arXiv:2502.15844</a>.

## 注释

1.  <span id="cite_note-:0-1">↑ <sup>[1.0](https://systems-analysis.info/int/Chain-of-Thought_Prompting_%E2%80%94_%E6%80%9D%E7%BB%B4%E9%93%BE%E6%8F%90%E7%A4%BA#cite_ref-:0_1-0)</sup> <sup>[1.1](https://systems-analysis.info/int/Chain-of-Thought_Prompting_%E2%80%94_%E6%80%9D%E7%BB%B4%E9%93%BE%E6%8F%90%E7%A4%BA#cite_ref-:0_1-1)</sup> <sup>[1.2](https://systems-analysis.info/int/Chain-of-Thought_Prompting_%E2%80%94_%E6%80%9D%E7%BB%B4%E9%93%BE%E6%8F%90%E7%A4%BA#cite_ref-:0_1-2)</sup> Wei, Jason, Xuezhi Wang, Dale Schuurmans, Maarten Bosma, Brian Ichter, Fei Xia, Ed Chi, Quoc Le, and Denny Zhou. “Chain-of-Thought Prompting Elicits Reasoning in Large Language Models.” arXiv, January 10, 2023. https://doi.org/10.48550/arXiv.2201.11903.<a href="https://arxiv.org/abs/2201.11903" class="external autonumber" rel="nofollow">[1]</a></span>
2.  <span id="cite_note-2">[↑](https://systems-analysis.info/int/Chain-of-Thought_Prompting_%E2%80%94_%E6%80%9D%E7%BB%B4%E9%93%BE%E6%8F%90%E7%A4%BA#cite_ref-2) Kojima, Takeshi, Shixiang Shane Gu, Machel Reid, Yutaka Matsuo, and Yusuke Iwasawa. “Large Language Models are Zero-Shot Reasoners.” arXiv, January 29, 2023. https://doi.org/10.48550/arXiv.2205.11916.<a href="https://arxiv.org/abs/2205.11916" class="external autonumber" rel="nofollow">[2]</a></span>
3.  <span id="cite_note-3">[↑](https://systems-analysis.info/int/Chain-of-Thought_Prompting_%E2%80%94_%E6%80%9D%E7%BB%B4%E9%93%BE%E6%8F%90%E7%A4%BA#cite_ref-3) Zhang, Zhuosheng, Aston Zhang, Mu Li, and Alex Smola. “Automatic Chain of Thought Prompting in Large Language Models.” arXiv, October 7, 2022. https://doi.org/10.48550/arXiv.2210.03493.<a href="https://arxiv.org/abs/2210.03493" class="external autonumber" rel="nofollow">[3]</a></span>
4.  <span id="cite_note-4">[↑](https://systems-analysis.info/int/Chain-of-Thought_Prompting_%E2%80%94_%E6%80%9D%E7%BB%B4%E9%93%BE%E6%8F%90%E7%A4%BA#cite_ref-4) “openai/gsm8k · Datasets at Hugging Face”, July 17, 2023. https://huggingface.co/datasets/openai/gsm8k.<a href="https://huggingface.co/datasets/openai/gsm8k" class="external autonumber" rel="nofollow">[4]</a></span>
5.  <span id="cite_note-5">[↑](https://systems-analysis.info/int/Chain-of-Thought_Prompting_%E2%80%94_%E6%80%9D%E7%BB%B4%E9%93%BE%E6%8F%90%E7%A4%BA#cite_ref-5) Wang, Xuezhi, Jason Wei, Dale Schuurmans, Quoc Le, Ed Chi, Sharan Narang, Aakanksha Chowdhery, and Denny Zhou. “Self-Consistency Improves Chain of Thought Reasoning in Language Models.” arXiv, March 7, 2023. https://doi.org/10.48550/arXiv.2203.11171.<a href="https://arxiv.org/abs/2203.11171" class="external autonumber" rel="nofollow">[5]</a></span>
6.  <span id="cite_note-6">[↑](https://systems-analysis.info/int/Chain-of-Thought_Prompting_%E2%80%94_%E6%80%9D%E7%BB%B4%E9%93%BE%E6%8F%90%E7%A4%BA#cite_ref-6) Patel, Arkil. “arkilpatel/SVAMP”. Python, May 30, 2025. https://github.com/arkilpatel/SVAMP.<a href="https://github.com/arkilpatel/SVAMP" class="external autonumber" rel="nofollow">[6]</a></span>
7.  <span id="cite_note-7">[↑](https://systems-analysis.info/int/Chain-of-Thought_Prompting_%E2%80%94_%E6%80%9D%E7%BB%B4%E9%93%BE%E6%8F%90%E7%A4%BA#cite_ref-7) “autonlab/aqua”. Jupyter Notebook. 2022. Reprint, Auton Lab, Carnegie Mellon University, June 12, 2025. https://github.com/autonlab/aqua.<a href="https://github.com/autonlab/aqua" class="external autonumber" rel="nofollow">[7]</a></span>
8.  <span id="cite_note-8">[↑](https://systems-analysis.info/int/Chain-of-Thought_Prompting_%E2%80%94_%E6%80%9D%E7%BB%B4%E9%93%BE%E6%8F%90%E7%A4%BA#cite_ref-8) “24 (Puzzle)”. In *Wikipedia <a href="https://en.wikipedia.org/wiki/24_(puzzle)" class="external autonumber" rel="nofollow">[8]</a>*</span>
9.  <span id="cite_note-9">[↑](https://systems-analysis.info/int/Chain-of-Thought_Prompting_%E2%80%94_%E6%80%9D%E7%BB%B4%E9%93%BE%E6%8F%90%E7%A4%BA#cite_ref-9) Yao, Shunyu, Dian Yu, Jeffrey Zhao, Izhak Shafran, Thomas L. Griffiths, Yuan Cao, and Karthik Narasimhan. “Tree of Thoughts: Deliberate Problem Solving with Large Language Models.” arXiv, December 3, 2023. https://doi.org/10.48550/arXiv.2305.10601.<a href="https://arxiv.org/abs/2305.10601" class="external autonumber" rel="nofollow">[9]</a></span>
