Chain of Thought (CoT)
Chain of Thought (CoT) is a prompting technique that makes a large model "write out its reasoning process". Proposed by Google in 2022, it is one of the most important discoveries in the field of prompting.
Core finding
Researchers found that if a model is only asked to give the answer directly, the error rate on complex reasoning problems is high; but if it is required to write out the solution steps first and then give the answer, accuracy improves substantially.
The key lies in that magic prompt: "Let's think step by step".
Why it works
A large model generates token by token. The reasoning steps themselves also become part of the context, so later generation can refer to the intermediate results already computed. It amounts to giving the model "scratch paper".
Several variants
- Zero-shot CoT: simply add "think step by step", no examples needed
- Few-shot CoT: give several worked examples with reasoning, which works even better
- Self-Consistency: run multiple reasoning paths and take the most frequent answer
- Tree of Thoughts (ToT): let the model explore multiple branches the way one explores moves in chess, with backtracking
When it applies and when it does not
Applies: math problems, logical reasoning, multi-step calculation, complex decision analysis.
Does not apply: simple factual questions (it only adds verbosity), creative writing (it may limit divergence), latency-sensitive scenarios (output becomes longer and slower).
Caution
The reasoning process exposed by CoT is not necessarily the model's real computation process, only the text it generates. So CoT output cannot be treated as a "faithful record of what the model thought".