# 本章小结

本章深入介绍了思维链及其变体技术，这些技术通过引导模型展示推理过程，显著提升了在复杂任务上的表现。以下是本章的核心要点回顾：

## 关键概念

* **思维链**：引导模型展示中间推理步骤的技术
* **零样本 CoT**：通过触发语激发推理，无需示例
* **少样本 CoT**：通过推理示例展示推理模式
* **自一致性**：多路径采样 + 多数投票
* **思维树**：树形结构的探索性推理

## 核心要点

1. **思维链的原理与价值**
   * 分解复杂问题为简单子步骤
   * 利用中间结果进行后续推理
   * 激活模型训练中的推理模式
   * 以生成长度换取计算深度，将单次压缩推理分散为多步
   * 大模型上效果更显著
2. **零样本与少样本 CoT 对比**

   | 特征       | 零样本 CoT | 少样本 CoT |
   | -------- | ------- | ------- |
   | 使用方式     | 触发语     | 推理示例    |
   | Token 消耗 | 低       | 较高      |
   | 格式控制     | 较弱      | 较强      |
   | 通用性      | 高       | 需要设计示例  |
3. **自一致性技术**
   * 多次采样生成不同推理路径
   * 多数投票选择最终答案
   * 提供置信度指标
   * 可提升 5-15%准确率
4. **高级推理策略**
   * 思维树：探索多个分支路径
   * 递归自我改进：反复审视和优化
   * 分解-组合：拆解后分别处理
   * 多视角推理：从不同角度分析
5. **Reasoning 模型策略**
   * 范式转换：模型内置思考环节，外部提示变瘦
   * 设计要点：限制条件要清晰、目标明确、舍弃显式思维链引导
   * 预算管理：控制 Thinking Token 的耗时和成本
   * 架构应用：路由网关 (Router) 分发难易请求

## 推理策略选择指南

```
任务特点           推荐策略
─────────────────────────────
标准推理任务       零样本 CoT
特定格式要求       少样本 CoT
高准确性要求       自一致性
探索性问题        思维树
可迭代优化        递归自我改进
大问题可拆解       分解-组合
```

## 实践技巧

1. **触发语选择**：“让我们一步一步思考”简单有效；在对外输出时可要求“只列关键步骤/核对点”，避免冗长推理
2. **Temperature 设置**：自一致性用 0.7 左右，普通 CoT 可用 0.3-0.5
3. **步骤控制**：可要求“用 3-5 个步骤”避免过于冗长
4. **答案提取**：确保能从推理输出中准确提取答案

## 延伸阅读

### 6.1 思维链基础

* [Chain-of-Thought Prompting](https://arxiv.org/abs/2201.11903) - 思维链原始论文
* [Large Language Models are Zero-Shot Reasoners](https://arxiv.org/abs/2205.11916) - 零样本思维链研究
* [Towards Understanding Chain-of-Thought Prompting](https://arxiv.org/abs/2212.10001) - 思维链原理深入分析

### 6.2 零样本与少样本

* [Chain-of-Thought Prompting](https://arxiv.org/abs/2201.11903) - 思维链原始论文
* [Prompting Guide CoT](https://www.promptingguide.ai/techniques/cot) - 思维链技术详解

### 6.3 进阶技术

* [Self-Consistency Improves Chain of Thought Reasoning](https://arxiv.org/abs/2203.11171) - 自一致性原始论文
* [Tree of Thoughts: Deliberate Problem Solving with Large Language Models](https://arxiv.org/abs/2305.10601) - 思维树原始论文

## 下一章预告

[第七章](/prompt_engineering_guide/di-er-bu-fen-he-xin-ji-shu-pian/07_prompt_chaining.md)将介绍提示词链与任务分解技术——如何将复杂工作流分解为多个相互连接的提示词调用，实现更强大的自动化能力。

***

[下一章：提示词链与任务分解 →](/prompt_engineering_guide/di-er-bu-fen-he-xin-ji-shu-pian/07_prompt_chaining.md)

***

> 📝 **发现错误或有改进建议？** 欢迎提交 [Issue](https://github.com/yeasy/prompt_engineering_guide/issues) 或 [PR](https://github.com/yeasy/prompt_engineering_guide/pulls)。


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://yeasy.gitbook.io/prompt_engineering_guide/di-er-bu-fen-he-xin-ji-shu-pian/06_chain_of_thought/summary.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
