← AI Terminology
Chain-of-Thought - CoT
Chain-of-Thought (CoT) is a prompting technique where a model is instructed or demonstrated to produce intermediate reasoning steps before arriving at a final answer, significantly improving performance on complex multi-step problems.
Introduced by Wei et al. (Google, 2022), it showed that reasoning quality scales with model size when elicited explicitly.
Introduced by Wei et al. (Google, 2022), it showed that reasoning quality scales with model size when elicited explicitly.
Why It Matters in AI
Standard prompting asks for the answer directly — CoT asks the model to "show its work." This dramatically improves accuracy on arithmetic, logical reasoning, commonsense inference, and coding problems. CoT revealed that large models possess latent reasoning capability that simple prompting leaves untapped. It is now standard practice for any complex task and is the foundation for reasoning models (o1, DeepSeek-R1) that produce long internal reasoning traces.
Key Points
| Aspect | Description |
|---|---|
| Limitation | Longer context → higher cost; wrong intermediate steps can confidently lead to wrong answers |
| Few-shot CoT | Include examples with step-by-step reasoning in the prompt — model imitates the pattern |
| Zero-shot CoT | "Let's think step by step" — single phrase elicits reasoning without examples |
| Reasoning models | o1, DeepSeek-R1, Claude 3.7 Sonnet: trained to produce extended internal CoT before answering |
| Self-consistency | Sample multiple CoT paths, majority-vote the final answer — improves accuracy further |
| Tree-of-Thoughts | Extends CoT to a tree of reasoning branches with backtracking — more systematic exploration |
Simple Analogy
Ask a student "What is 23 × 17?" and they might guess wrong. Ask them to "work through it step by step — first multiply 20 × 17, then 3 × 17, then add" and they reliably get the right answer. CoT is forcing the model to show its work rather than guess directly.
Common Usage Examples
- "Let's think step by step." appended to any prompt — zero-shot CoT trigger
- Few-shot CoT: include 3 solved examples with reasoning steps before the actual question
- Self-consistency: generate 10 CoT paths with temperature=0.7; return the majority final answer
- OpenAI o1/o3: extended internal reasoning chain (often thousands of tokens) before answering
chain_of_thought_reasoning=Truein some HuggingFace pipeline configurations
Summary
In short: Chain-of-Thought prompting makes models show their reasoning steps — a simple technique that dramatically improves accuracy on complex problems and forms the basis for modern reasoning models.