A worked example
Ask a plain instruction-tuned model a two-step word problem — a warehouse ships 14 crates on Monday and twice as many on Tuesday, each crate holds 9 units, how many units went out in total — and it will often reply with a single number and no working. Sometimes the number is right, sometimes it is confidently wrong, and from the outside the two cases look identical. Ask for the working and the shape of the response changes: the model restates the quantities, computes Tuesday as 28 crates, adds the two days to get 42, multiplies by 9, and ends with 378.
The useful part is not the prose. It is that each intermediate value is written into the context and becomes an input for the next step. The model no longer has to hold the number 28 in some implicit state while it also multiplies; the number sits on the page, and the next token prediction can condition on it directly.
That is the whole trick, and it explains both the benefit and the fragility. A chain-of-thought trace is generated text, so it can be right for the wrong reasons, skip a step without saying so, or narrate a plausible calculation that never happened inside the network.
Why a fixed-depth model needs scratch space
A transformer performs a fixed amount of computation per generated token: one pass through its layers, however many there are. Depth buys some serial reasoning, because each layer can transform the representation, but a 30-layer model cannot run a 30-step algorithm internally and emit the result as one token. Problems that need many dependent operations exceed what a single forward pass can do.
Writing intermediate results changes that arithmetic. Every reasoning token is fed back in, so the model gets another full pass through the network conditioned on the work so far. A 500-token trace is roughly 500 extra forward passes, each able to build on the last. This is why chain-of-thought is often described as buying test-time compute rather than drawing on hidden capability.
The framing also predicts where the technique pays off. If a task needs one lookup or one pattern match, extra passes add little and may add noise. If it needs ten dependent steps with values that must be carried, extra passes are exactly what is missing. Studies that separate task types find the largest gains in arithmetic, symbolic manipulation and planning, and much smaller gains in recall-heavy or single-hop classification work.
Prompted versus trained
Early chain-of-thought was a prompting trick. Few-shot exemplars that showed the reasoning steps, or the single sentence asking the model to think step by step, were enough to change behaviour on arithmetic benchmarks. The gains appeared only past a certain model size, which is why the original results looked like an emergent property of scale.
Modern reasoning models are trained for it instead. Supervised fine-tuning on traces teaches the format; reinforcement learning against verifiable rewards teaches the model to explore, backtrack and correct itself. A maths answer can be checked against a reference, a program can be run against tests, and a puzzle can be validated, so the training signal does not depend on a human judging the prose. Traces from these models are much longer than prompted ones, and the behaviour is learned rather than requested.
The distinction matters in production. A prompted model asked to think step by step will usually produce a short, tidy derivation shaped like the examples you gave it. A trained reasoning model may spend thousands of tokens trying an approach, abandoning it and starting again. You get more capability, less control over length, and a trace that is genuinely worth inspecting but expensive to keep.
What a good trace contains
A good trace is not necessarily a long one. Six properties are worth looking for, and a trace that shows most of them is usually doing real work rather than narrating a conclusion.
- Decomposition: the problem is broken into sub-goals that can each be checked, rather than restated in different words.
- Grounded values: numbers and entities come from the prompt or a tool result, not from a plausible-sounding guess.
- Explicit state: intermediate results are written down instead of carried implicitly, so a later step can reuse them.
- Self-checking: the model verifies a constraint, substitutes the answer back, or re-reads the question before committing.
- Recovery: when a step fails, the trace says so and changes approach instead of continuing on a broken premise.
- Commitment: a final answer that follows from the last step, with no new claim smuggled in at the end.
Reading a trace critically
Real traces rarely contain all six. The useful review question is which ones are missing: a trace that never checks anything is a story, and a trace that never grounds its numbers is arithmetic on invented inputs, however tidy it looks. Reading for gaps is faster than reading for errors, because a missing check explains a whole class of wrong answers while a single wrong digit explains only one.
The faithfulness problem
It is tempting to treat the trace as a debug log: read it, find the faulty step, fix the prompt. Sometimes that works. But the trace is generated text from the same model that produced the answer, and it is optimised to look like a good explanation, not to report the internal computation. The two can diverge.
The clearest demonstrations come from bias experiments. Add a subtle cue to a multiple-choice prompt, such as a note that the user leans toward one option, and the model's answer shifts toward that option. The written reasoning often does not mention the cue at all; it constructs a subject-matter argument for the newly preferred answer. The explanation changed to fit the answer, not the other way round.
Truncation and perturbation tests point the same way. Cut the trace short at an early step, or inject an error into it, and watch whether the final answer moves. On harder tasks it often does, which suggests the trace is load-bearing. On easier tasks the answer frequently survives intact, which suggests the model already knew it and the trace is decoration. Both behaviours can coexist in one model.
The practical consequence is to use the trace to find failure modes, not to certify correctness. A clean-looking derivation is weak evidence. A checked final answer — substituted back into the original constraint, run against a test, cross-referenced against a source — is strong evidence.
Where it helps, and where it hurts
Chain-of-thought is not a general quality switch. The pattern of gains is fairly consistent across model families and benchmarks, and it is worth knowing before you turn it on everywhere.
- Helps: multi-step arithmetic and unit conversion, where intermediate values have to be carried between steps.
- Helps: constraint satisfaction and scheduling, where the model must track which options remain available.
- Helps: code debugging and refactoring, where the trace can hold a hypothesis about the failure and the evidence for it.
- Helps: planning with tools, where reasoning decides what to call next and how to read the result.
- Hurts: simple factual recall, where the answer is one hop away and extra tokens only add latency.
- Hurts: short classification and extraction, where a long trace gives the model room to talk itself out of the correct label.
- Hurts: strict output formats, where reasoning text can leak into the payload or break a schema.
- Hurts: anything under a tight latency budget, where the cheapest improvement is a smaller task, not a longer thought.
Cost, latency and context
Reasoning tokens are billed like any other output token, and they are produced one at a time. Decoding is memory-bandwidth bound on most hardware: each token requires reading the weights and the KV cache, so a 2,000-token trace takes roughly two thousand sequential decoding steps before the answer even starts. A thinking indicator makes the wait feel shorter; it does not make it cheaper.
The trace also consumes context. In a single call the reasoning sits between the prompt and the answer. In a multi-turn agent it can accumulate across turns, and providers differ on whether earlier reasoning is kept, summarised or discarded. Long traces push tool results and instructions out of the effective window, and models attend less reliably to material buried in the middle of a long context.
Budget explicitly. Most APIs expose a reasoning-effort or thinking-budget control; set it per task instead of leaving it at maximum. Cap output length so a stuck model cannot burn an unbounded number of tokens. Suppress the trace from responses where nobody will read it — you still pay to generate it, but you do not pay to store and render it. And measure p95 latency rather than the average, because reasoning length varies enormously between runs of the same prompt and the tail is what users complain about.
Variants worth knowing
Self-consistency samples several traces at a non-zero temperature and takes the majority answer. It is one of the most reliable cheap improvements on maths and logic, because independent wrong traces tend to disagree while correct ones converge. The cost is linear in the number of samples, so it is usually reserved for high-value queries or used to generate training data rather than applied to every request.
Least-to-most prompting decomposes a problem into easier sub-questions and solves them in order, feeding each answer into the next. It helps when the decomposition is the hard part, and it makes every step independently checkable.
Tree-of-thought generalises this into a search: generate several candidate next steps, score them, expand the promising ones and backtrack from dead ends. It can beat linear reasoning on puzzles at a large multiple of the token cost, and it needs a scoring function that is itself reliable.
ReAct interleaves reasoning with tool calls — search, calculate, query a database — so the trace can use facts the model does not hold in its weights. This is the backbone of most agents. The characteristic failure is trusting a tool result that is wrong, so a good trace quotes the evidence it used rather than paraphrasing it.
Program-of-thought sidesteps a real weakness: language models are unreliable arithmeticians. If the trace writes a small program and a runtime executes it, the arithmetic is exact and the trace becomes auditable. The trade-off is a sandbox, a timeout and a new class of failure, namely code that runs and computes the wrong thing.
Common mistakes
- Turning on reasoning for every request, including classification and extraction, and paying ten times the latency for no accuracy gain.
- Reading the trace as ground truth and shipping a system whose only verification is that the explanation looks coherent.
- Assuming longer is better: trained models will produce redundant loops, and extra tokens raise the chance of talking themselves into an error.
- Withholding the facts and hoping reasoning will substitute for them. A model that does not know a price, a schema or a policy will invent one, and the trace will make the invention look deliberate.
- Mixing the trace into the answer field, so downstream parsers receive prose where they expected a value.
- Evaluating with the trace visible to the grader, which inflates scores because a plausible derivation biases human and model judges alike.
- Changing the reasoning budget mid-experiment and then attributing the difference to the prompt.
- Copying a short textbook derivation into the prompt and expecting a trained reasoning model to match its style; these models often do better with a plain instruction and no example.
How to evaluate it
Score the final answer separately from the trace. Final-answer accuracy against a held-out set is the number that matters for the product; trace quality is a diagnostic that explains why the number is what it is.
For the trace, a few checks are cheap and informative. Does every number trace back to the prompt or a tool output? Does each step follow from the previous one, or are there leaps? Does the model ever revisit an assumption? Does the final line actually answer the question that was asked? Rubrics like these can be applied by a second model, but validate the judge against human labels on a sample before trusting it at scale.
Ablate. Run the same questions with reasoning disabled and compare. If the gap is small, the trace is costing money for nothing. If the gap is large, check whether it comes from the reasoning or from the extra tokens giving the model more chances to sample a correct answer; self-consistency on a direct-answer prompt is the control that separates the two.
Watch for contamination. Public maths and coding benchmarks leak into training data, and a model can score well by memorising answers and formats. Private sets, perturbed numbers and freshly written problems are the only defence that survives a model upgrade.
Finally, report variance. Reasoning models are high-variance: the same prompt can succeed on one run and fail on the next. A single pass tells you very little. Run each item several times and report pass@1 with an interval, or you will spend weeks chasing noise.
Putting it to work
Start with the smallest intervention that could work: a clear instruction, the relevant facts in the prompt, and an explicit output format. Add reasoning only where a measured gap remains.
When you do add it, make the contract explicit. Say that the model should work through the problem and then give a final answer in a named field or after a marker. Give it the tools or documents it needs, because reasoning cannot retrieve what was never in the context. Ask for a check before the final line; substituting an answer back into the original constraint catches a surprising share of errors.
Keep the trace off the user-facing surface by default and show a progress indicator instead. If you do expose it, label it as a draft of the model's thinking rather than an audited derivation, and strip anything that looks like a system prompt or a personal detail.
Then measure end to end: accuracy on your private set, p95 latency, tokens per request and cost per successful task. A reasoning model that triples cost for two points of accuracy may still be the right call for a contract-review tool and the wrong one for an autocomplete.