1.什么是CoT思维链?
思维链(Chain of Thought)是一种提示工程技术,通过让AI在给出最终答案前,先展示中间推理步骤,来提高复杂问题的准确率和可解释性。
简单的事实性问题不需要思维链,比如中国的首都是北京。
2.使用方法
在提示词里加魔法词:Let's think step by step,问题 + "Let's think step by step" → 触发推理模式。
不同场景的"魔法词:
数学题: "Let's solve this step by step"
逻辑题: "Let's reason through this logically"
决策题: "Let's analyze this systematically"
代码题: "Let's debug this step by step"
通用: "Let's think step by step"
加魔法词跟没加的区别就是:
- 准确率提升
- 可追溯错误(能看到哪步算错了)
- 可信度提高(推理过程让答案更有说服力)
⚠️ 注意:
- 简单问题不用加(画蛇添足)
- 会增加响应时间和Token消耗
- 不是所有模型都支持(需要推理能力)