Some questions can’t be answered in one leap: multi-step arithmetic, logic puzzles, planning. Chain-of-thought (CoT) prompting asks the model to write out intermediate steps before the final answer.
The research
A 2022 paper by Jason Wei and colleagues at Google showed that giving models examples with worked-out reasoning dramatically improved their performance on math word problems. Shortly after, Takeshi Kojima and colleagues found that simply adding “Let’s think step by step” produced a similar effect without examples.
Why it helps
A language model produces one token at a time. Writing intermediate steps gives it “room” to compute: each step becomes context for the next, instead of forcing the whole solution into the first few words.
How to use it
Solve the problem. First reason through it step by step. Then give the final answer on a separate line starting with “Answer:”.
Separating reasoning from the final answer makes the output easy to parse and check.
Reasoning models change the picture
Newer reasoning models are trained to think at length before answering, often in a hidden or summarized reasoning phase. With them, explicit “think step by step” instructions matter less; providers’ own guidance often suggests giving a clear goal and constraints instead of prescribing every step.
When not to use it
- Simple factual questions: extra reasoning adds cost and delay.
- Tasks where you need only the label or a short answer at scale.
- Situations where the visible reasoning could be mistaken for verified justification — models can produce plausible-looking steps that don’t actually determine the answer.
Practical tip
For important answers, ask the model to check its own result with a different method (for example estimating, or working backwards). Disagreement between the two is a useful warning sign.
A worked example
Without chain of thought:
A shop sells pencils at 3 for €1. How much do 14 pencils cost?
A model might answer quickly — and sometimes incorrectly.
With chain of thought:
A shop sells pencils at 3 for €1. How much do 14 pencils cost if you can only buy them in packs of 3? Think step by step, then give the final answer on a separate line.
The model reasons: 14 pencils need 5 packs (15 pencils), so the cost is €5. Spelling out the steps makes errors less likely and lets you check the logic — including whether the model understood the question’s constraints.
Variants
- Zero-shot chain of thought: simply adding “Let’s think step by step”, shown in a 2022 paper by Kojima and colleagues to improve reasoning in large models.
- Few-shot chain of thought: providing worked examples with reasoning, as in the original 2022 paper by Jason Wei and colleagues at Google.
- Self-consistency: generating several reasoning paths and choosing the most common answer.
- Plan-then-execute: asking the model to outline a plan before carrying it out, useful for complex writing or coding tasks.
Checking the reasoning
A visible chain of thought is useful, but it is not proof of correctness — models can produce plausible-looking reasoning that contains errors, or reach the right answer with flawed steps. For important tasks, check key steps yourself, or ask the model to verify its answer with a different method.
Related reading
See our few-shot prompting guide and prompting patterns cheat sheet.
Bottom line
Ask for reasoning when tasks have several steps, and check the steps that matter.
What to watch next
- Reasoning models that think internally before answering.
- Research on whether written reasoning reflects how models actually compute answers.
- Cost trade-offs of longer reasoning.
- Tools that let users control reasoning effort.
Key takeaways
- Chain-of-thought prompting asks a model to reason step by step before answering.
- It improves performance on math, logic and multi-step problems in large models.
- Zero-shot (“think step by step”) and few-shot versions both work.
- Reasoning models now do this internally, reducing the need for explicit prompts.
- Visible reasoning helps checking but doesn’t guarantee correctness.
Frequently asked questions
Do I still need chain-of-thought prompts with reasoning models?
Often not. Reasoning models think before answering by design; clear instructions about the task matter more.
Does chain of thought work for all tasks?
It helps most on multi-step reasoning. For simple lookups or creative writing it adds little and costs tokens.
Who invented chain-of-thought prompting?
It was popularized by a 2022 Google research paper by Jason Wei and colleagues.