Chain-of-Thought: Giving Models Time to Think
Introduction
Iterating on Prompts Systematically ended the basics with measuring every change. Advanced prompting opens with chain of thought (CoT): asking a model to write out its reasoning before its answer. Wei and colleagues (2022) describe a chain of thought as "a series of intermediate reasoning steps".
A model writes one token at a time, each one read from everything before it. Asked for the answer at once, the first tokens it writes are the answer. Asked to reason first, it writes the steps, and the answer comes after them, with the steps in its context. On word problems the gain can be large: one line, Let's think step by step., took an InstructGPT model (text-davinci-002) from 17.7% to 78.7% on the MultiArith benchmark.
You'll learn:
- Why a model can fail by answering before reasoning
- Zero-shot CoT (one line) and few-shot CoT (worked examples)
- How CoT prompting differs from reasoning models, and what each maker advises
- When CoT helps, and when it does nothing or harm
- The catch: cost, and reasoning that is not always faithful
The Problem: Answering Before Reasoning
Kojima and colleagues (2022) show the problem on one question. Asked for the number at once:
Q: A juggler can juggle 16 balls. Half of the balls are golf balls,
and half of the golf balls are blue. How many blue golf balls are there?
A: The answer (arabic numerals) isGPT-3 wrote 8, the number of golf balls, not of the blue ones; the paper's Figure 1 marks it wrong. Nothing came before the answer: the first tokens of the reply were the number.
The same question, with one line added before the answer:
Q: A juggler can juggle 16 balls. Half of the balls are golf balls,
and half of the golf balls are blue. How many blue golf balls are there?
A: Let's think step by step.GPT-3 wrote:
There are 16 balls in total. Half of the balls are golf balls.
That means that there are 8 golf balls. Half of the golf balls are blue.
That means that there are 4 blue golf balls.Each sentence it writes is text the next one can read, so by the time it names the number, both halvings are on the page. The paper marks this answer right.
Chain-of-Thought: Think Step by Step
CoT prompting asks the model to lay out its reasoning before the final answer. Wei and colleagues give the reason it can help: a chain of thought "allows models to decompose multi-step problems into intermediate steps, which means that additional computation can be allocated to problems that require more reasoning steps". More steps written means more tokens, and so more computation, spent on a hard problem before the answer.

The bottom of the figure is the same paper's warning, measured on the GSM8K benchmark of math word problems: the large models gained, and the small ones scored lower with chain of thought than without it. In the paper's words, "chain-of-thought prompting does not positively impact performance for small models".
Zero-Shot CoT: One Line
The simplest version needs no examples: add one line where the answer would start. Kojima and colleagues called it zero-shot CoT. On text-davinci-002 it took MultiArith from 17.7% to 78.7% and GSM8K from 10.4% to 40.7%. To get a clean number out, the paper then sent a second prompt: the question, the reasoning the model wrote, and "Therefore, the answer (arabic numerals) is".
The words matter. The paper tried 16 phrasings on MultiArith: Let's think step by step. scored 78.7%, "Let's think about this logically." 74.5% and "The answer is after the proof." 45.7%, while misleading or irrelevant lines stayed near the plain 17.7% ("It's a beautiful day." scored 13.1%). So test the phrasing on your own task, as Iterating on Prompts Systematically does with every change.
It still works on today's models when their thinking is off. Anthropic's guide: "When thinking is off, you can still encourage step-by-step reasoning by asking Claude to think through the problem before it answers."
Few-Shot CoT: Show the Reasoning
Few-shot CoT is Wei and colleagues' original method: examples whose answers include the worked reasoning, not only the result. Their math prompt held 8 such examples. Kojima and colleagues' Figure 1 puts the worked example from Wei's own Figure 1 before the juggler:
Q: Roger has 5 tennis balls. He buys 2 more cans of tennis balls.
Each can has 3 tennis balls. How many tennis balls does he have now?
A: Roger started with 5 balls. 2 cans of 3 tennis balls each is 6 tennis
balls. 5 + 6 = 11. The answer is 11.
Q: A juggler can juggle 16 balls. Half of the balls are golf balls,
and half of the golf balls are blue. How many blue golf balls are there?
A:GPT-3 wrote a worked answer of its own, ending The answer is 4. The examples show the model how to reason as well as how to answer (Few-Shot Done Right (Choosing Examples) covers picking them). On text-davinci-002, with the same eight examples, few-shot CoT reached 93.0% on MultiArith, against 78.7% for zero-shot CoT and 33.8% for the eight examples without their reasoning.
So start with zero-shot, which costs one line, and add worked examples when it falls short or when the reasoning must follow your method. With thinking on, Anthropic says examples still steer it: "Worked examples in your prompt shape how Claude approaches similar problems in its own thinking blocks."
CoT Prompting vs Reasoning Models
There are two routes to step-by-step reasoning:
- CoT prompting: you ask a model to reason, in the prompt, and its reasoning is part of the reply.
- Reasoning models: the model was trained to reason before it answers (Reasoning Models: How o1 / R1 "Think"), in a thinking part of its output.
Whether to add a step-by-step line to a reasoning model is each maker's call, and they differ:
- OpenAI for its reasoning models: "Avoid chain-of-thought prompts: Since these models perform reasoning internally, prompting them to "think step by step" or "explain your reasoning" is unnecessary." It adds that such a line "may not enhance performance (and can sometimes hinder it)".
- Anthropic: on Claude Fable 5.2, Mythos 5.2, Fable 5.1, Mythos 5.1, Fable 5, Mythos 5 and Opus 5.5, "thinking is always on and adaptive thinking is the only mode". Its advice: "Prefer general instructions over prescriptive steps.", since "A prompt such as "think thoroughly" often produces better reasoning than a hand-written step-by-step plan." How much it thinks follows the
effortsetting; the fixedbudget_tokensbudget is deprecated, and Claude 4.7 and later models refuse it with a 400 error. - DeepSeek, for DeepSeek-R1: "For mathematical problems, it is advisable to include a directive in your prompt such as"
Please reason step by step, the same line asking for the final answer in a box.
So use CoT prompting on a model whose thinking is off, and on a reasoning model follow its maker's guide and set its effort.
When CoT Helps, and When It Doesn't
CoT is a tool for some tasks, not a free upgrade. Sprague and colleagues (2024) analysed over 100 papers and ran 20 datasets on 14 models: "CoT gives strong performance benefits primarily on tasks involving math or logic, with much smaller gains on other types of tasks." On MMLU, answering directly gave "almost identical accuracy as CoT unless the question or model's response contains an equals sign".
It can also do harm. On text-davinci-002, Let's think step by step. lowered CommonsenseQA from 68.8% to 64.6%, and Wei and colleagues' tables show GPT-3 175B on CSQA falling from 79.5% to 73.5% with worked reasoning. Switch the prompt yourself on their two tables, five arithmetic and five commonsense benchmarks, for every size of three model families:

The pattern holds across the tables: the largest models gain more on the arithmetic benchmarks than on the commonsense ones, and the two biggest gains are on GSM8K (PaLM 540B from 17.9% to 56.9%), while models under 10B often lose (GPT-3 1.3B from 2.4% to 0.5% on GSM8K). Use CoT where the task chains steps, and measure it before paying for it on anything else.
The Catch: Cost & Unfaithful Reasoning
Two limits to know:
- It costs tokens and time. Every step is written before the answer, as output tokens, and on every model in Anthropic's table an output token costs five times an input token (Latency vs Cost vs Quality — The Iron Triangle). A reasoning model's thinking is billed the same way: Anthropic's API reports "how many of the billed output tokens were internal reasoning". For high-volume or real-time paths, keep CoT for the hard requests.
- The reasoning is not always the real reason. Turpin and colleagues (2023) found that "CoT explanations can systematically misrepresent the true reason for a model's prediction": when a prompt's examples always put the right option at (A), models followed the pattern and "systematically fail to mention" it, and accuracy dropped "by as much as 36%" on 13 tasks with GPT-3.5 and Claude 1.0. In 2025, Chen and colleagues tested reasoning models with hints placed in the prompt: their chains of thought revealed using a hint "in at least 1% of examples where they use the hint, but the reveal rate is often below 20%". So read a chain of thought as a help, not as an audit of how the answer was reached.
One chain can still go wrong. Wei and colleagues note that "follow-up work shows chain-of-thought prompting can be improved by taking the majority final answer over many sampled generations", which Self-Consistency & Majority Voting takes up.
Practical Tips
- Model with thinking off, fumbling a multi-step task: ask it to think first, in one line or a sentence, and test the phrasing.
- Keep the answer easy to pull out. Ask for the final answer in its own tags, as Roles, Delimiters & XML Tags showed. Anthropic: "Ask it to put the final answer in
<answer>tags so you can extract it." and "Some models might decline a prompt that asks them to write their reasoning, for example in<thinking>tags. On those models, rely on thinking instead." - Keep it for tasks that chain steps, math and logic above all. Elsewhere the gain is small and the tokens are not.
- On a reasoning model, follow the maker's guide and set the effort instead of writing a step plan.
- For the hardest problems, sample several chains and take the majority answer.
Try It Yourself: Watch the Steps
Here is a prompt for a model whose thinking you can turn off (or a small open model you run yourself, as in Running Open Models Locally with Ollama):
Think through the problem step by step before you answer.
Then give only the final answer inside <answer></answer> tags.
<problem>
A juggler can juggle 16 balls. Half of the balls are golf balls,
and half of the golf balls are blue. How many blue golf balls are there?
</problem>Run the juggler three ways: asked straight, with this prompt, and with this prompt on a model whose thinking is always on. For each, write down the answer, whether it is right, and how many output tokens the reply used (the API reports it). Then do the same with a question that needs no steps, such as the capital of a country, and compare what the steps bought in each case.
Mental-Model Corrections
- "CoT makes the model smarter." It lets the model spend tokens on steps before it answers; it adds no knowledge.
- "Add 'think step by step' to every prompt." No: the gains are mostly on math and logic, and the steps cost output tokens everywhere.
- "It helps every model." Not small ones: in Wei and colleagues' tables every model under 10B scored lower with worked reasoning on GSM8K.
- "Never use it with reasoning models." The makers differ: OpenAI says avoid it, DeepSeek suggests a step-by-step line for R1 on math, Anthropic prefers a general instruction. Read the guide.
- "The chain of thought is the model's real reasoning." Not reliably: models leave out what moved them.
- "Zero-shot CoT is as good as worked examples." Not in the paper that introduced it: with eight worked examples text-davinci-002 did better on MultiArith.
Key Takeaways
- CoT prompting asks a model to reason step by step before answering, so the answer comes after the work.
- Zero-shot CoT is one line (
Let's think step by step.); few-shot CoT shows worked examples. The words matter: test them. - Reasoning models think on their own; whether to add a step-by-step line is each maker's advice, and they differ.
- It pays mainly on math and logic, and on large models; small models can lose.
- Caveats: it costs output tokens and time, and the visible chain is not always the real reason.
Next: one chain can still be wrong, so sample several and take the majority: Self-Consistency & Majority Voting.