Learn

Chain of thought: prompting a model to reason step by step

Chain of thought is prompting a model to write out its reasoning in steps before giving a final answer, rather than answering in one jump. Working through the problem this way often improves accuracy on multi-step tasks.

At a glance

What it is
Prompting the model to reason step by step before answering
Why it helps
Working through steps catches errors a single jump would skip
The cost
More tokens generated, so slower and more context used
Where it fits
Multi-step problems, less so for simple lookups
Comparison

Two ways to answer

Straight to the answer
Chain of thought
What the model writes
The answer, with nothing shown
The steps, then the answer
On a multi-step problem
More likely to slip on a hidden step
More likely to catch the slip mid-way
Tokens produced
Few; fast and cheap
Many; slower, uses more context

What is chain of thought?

Chain of thought is prompting a model to show its working: to lay out the intermediate steps of a problem before committing to an answer, instead of leaping straight to a conclusion. Asked to reason step by step, the model writes out the path it took, and only then states the result. The idea is that a hard problem solved in visible stages is less likely to go wrong than the same problem answered in one jump.

It tends to help most where the task has several steps that depend on each other, the kind of problem where a single skipped step quietly poisons the final answer. Writing the steps out gives the model a chance to catch that slip on the way, and gives you a chance to see where it went wrong if it did.

What does the reasoning cost?

The working is not free. Every reasoning step is more tokens generated, so a chain-of-thought answer is longer, slower, and eats more of the context window than a terse one. On an interactive setup that latency is real: a model that narrates its reasoning at length can turn a quick request into a wait.

So the trade is steps against speed. For a multi-step problem the extra tokens buy accuracy worth having. For a simple lookup they buy nothing but delay, and a plain answer is the better call. Some models reason at length by default, which makes the cost something you budget for rather than a setting you forget.

Worth it for

  • Multi-step problems where one missed step sinks the whole answer
  • Tasks where seeing the working lets you check the reasoning
  • Cases where a plain answer keeps coming out wrong

Overkill for

  • Simple lookups where the answer needs no working
  • Latency-sensitive calls where the extra tokens cost too much time
  • Outputs that must be terse, where stray reasoning is just noise

Related terms

← All terms Reviewed: June 2026