Chain-of-thought
Chain-of-thought (CoT) is a prompting method in which a language model writes out intermediate reasoning steps before its final answer, which tends to improve results on maths, logic and other multi-step problems.
Also called: CoT, chain-of-thought prompting, Zero-shot-CoT
By Divya Sharma · Checked Nov 15, 2026 · How we review
Instead of asking a model for an answer directly, a chain-of-thought prompt gets it to work through the problem in steps. Each step becomes text the model can build on, much like a person writing out a calculation.
Where it comes from
The 2022 paper by Wei and colleagues showed that giving a model a few examples that include worked reasoning, a form of few-shot prompting, improved large models on arithmetic, commonsense and symbolic reasoning tasks. A later paper by Kojima and colleagues found that simply adding "Let's think step by step" could produce a similar effect without examples, an approach they called Zero-shot-CoT (see zero-shot).
Example
Asked "A shop sells pens at 3 for 2 dollars. How much do 12 pens cost?", a model prompted for chain-of-thought might write: 12 pens is 4 groups of 3, each group costs 2 dollars, so the total is 8 dollars. Seeing the steps also makes mistakes easier to spot.
How it relates to reasoning models
Reasoning models are trained to produce long reasoning before answering, so you no longer need to ask for it in the prompt. This is one form of test-time compute: spending more tokens at answer time to get better results.
Limits
Reasoning steps add output tokens, which raises cost and latency. The written steps are not a guaranteed record of how the model reached its answer, and a confident chain can still end in a wrong result. For simple lookups or short classifications it often adds cost without much gain.
Related terms
- Reasoning model
- A reasoning model is a language model trained to work through a problem in a stream of intermediate thinking tokens before giving its final answer, which tends to help on maths, coding and multi-step tasks.
- Prompt engineering
- Prompt engineering is the practice of writing, structuring and testing the instructions and examples given to a language model so that it produces the output an application needs, without changing the model's weights.
- Few-shot prompting
- Few-shot prompting is giving a language model a handful of worked examples of a task inside the prompt, so it can copy the pattern for a new input without any retraining.
- Zero-shot
- Zero-shot means asking a model to do a task from an instruction alone, with no worked examples in the prompt and no task-specific training. The model relies only on what it already learned.
- Test-time compute
- Test-time compute is the amount of computation a model spends while answering a request, rather than during training. Letting a model think longer or try several answers can improve results on hard problems.