The full answer
Chain-of-thought (CoT) prompting gets a model to write out intermediate reasoning steps before its final answer. Working through a problem step by step improves accuracy on multi-step tasks such as maths word problems, logic and planning, because each step is generated with the earlier ones in view.
Origins Wei and colleagues showed that adding worked examples with reasoning steps (few-shot CoT) substantially improved large models on arithmetic, commonsense and symbolic reasoning benchmarks, while small models gained little. Kojima and colleagues found that simply adding "Let's think step by step" (zero-shot CoT) also helped.
Example
Question: A warehouse has 3 shelves with 48 boxes each. 37 boxes are
shipped and 25 arrive. How many boxes are there now?
Think it through step by step, then give the final number on its own line.
The model writes: 3 × 48 = 144; 144 − 37 = 107; 107 + 25 = 132; answer 132. Asked for the number alone, models without built-in reasoning are more likely to slip.
Why it works A model produces one token at a time with a fixed amount of computation per token. Writing intermediate results gives it more computation for the problem and lets later steps build on earlier ones, instead of jumping straight to an answer.
Variants
- Self-consistency: sample several reasoning paths and take the most common final answer.
- Least-to-most and decomposition: solve subproblems first, then combine.
- ReAct: interleave reasoning with tool calls, the basis of many agents.
- Tree of thoughts: explore and evaluate several reasoning branches.
Reasoning models changed the practice Many current models reason internally before answering, often with a configurable thinking budget, and return the reasoning separately or as a summary. Their makers advise against telling them to "think step by step", which is unnecessary and can hurt; give them the goal and constraints instead. CoT prompts remain useful for models without built-in reasoning, and for making the steps visible to readers.
Limitations
- More output tokens mean more cost and latency.
- Little benefit for simple tasks; sometimes slightly worse.
- The written reasoning isn't guaranteed to be how the model actually reached its answer, and it can reason fluently to a wrong conclusion, so check answers, not just whether the reasoning looks convincing.
- For apps that show only the final answer, ask for the reasoning in a separate section (for example inside tags) and strip it before display.
Significance CoT showed that how a model is asked to work, not only what it is asked, changes results, and it led directly to today's reasoning models.
Last updated 16 October 2026