Why does adding the phrase 'think step by step' to a prompt so dramatically improve a model's reasoning performance — and what does this reveal about how reasoning is encoded in transformer weights?
There's something almost embarrassing about the most powerful trick in AI engineering: it's four words. "Think step by step." Not a clever architecture change, not a new training run, not a bigger model. Just four words that can take a model from confidently wrong to reliably correct on problems it was already "capable" of solving. That gap — between capability and performance — is exactly what's strange here, and worth pulling apart.
Here's what's actually happening. A transformer doesn't reason the way you might naively assume. It doesn't maintain a scratchpad in some hidden layer, working through a problem silently before printing an answer. Every token it generates is produced in a single forward pass through the network — a fixed-depth computation, no loops, no going back. The model sees your prompt, runs it through its layers once, and produces the next token. Then it does that again. The architecture has no built-in mechanism for "thinking longer" about a hard problem.
This creates a fundamental constraint: the depth of reasoning available for any single token is bounded by the depth of the network. A 96-layer transformer is 96 layers of computation, full stop. If a math problem genuinely requires more inferential steps than that depth can accommodate in one pass, the model will fail — not from ignorance, but from computational shallowness.
Chain-of-thought prompting is a hack that exploits the autoregressive loop.
When you ask the model to "think step by step," you're not unlocking hidden reasoning it was suppressing. You're changing what tokens get generated before the final answer. And those intermediate tokens — "first, let me identify the variables," "the rate is 60 mph, so in 2 hours..." — become part of the context window for subsequent token predictions. The model is literally reading its own work.
This matters enormously because each new token generation gets another full forward pass. A chain of 20 reasoning steps is 20 forward passes, each with the full computational depth of the network. The problem that was too complex for one pass becomes tractable when decomposed across many. The model's own output becomes a scaffold — external working memory that extends the effective computation far beyond what a single forward pass allows.
What this reveals about how reasoning is encoded in weights is subtle and important. The knowledge needed to solve the problem was always in there. The weights contain arithmetic, logical inference, domain knowledge. But weights alone don't determine output — the context window does too. When intermediate reasoning steps appear in context, they activate different attention patterns, different weight pathways, different "circuits" (to use the mechanistic interpretability term). The model trained on human reasoning chains learned that certain textual patterns — "therefore," "this means that," "substituting back" — are followed by correct inferential moves. By generating those patterns, you're essentially cueing the model to continue in a mode where it was trained to be careful and sequential.
There's a deeper implication here. The model doesn't have a "reasoning mode" it switches into. It has learned statistical associations between certain kinds of text and certain kinds of subsequent text. Human mathematical writing tends to show work. Human explanations tend to be step-structured. When you prompt for that structure, you're pulling the model into a region of its distribution where the training data was careful, explicit, and correct. You're not making the model smarter — you're making it more like the smart humans it learned from.
This is why chain-of-thought prompting works better on larger models. Smaller models haven't learned robust enough associations between reasoning steps and correct conclusions. The scaffold only helps if the model can actually follow it.
The quotable compression: chain-of-thought prompting works because transformer inference is bounded by forward-pass depth, and generating intermediate tokens effectively purchases additional computation by turning the model's output into its own extended context.
In practice, this is why techniques like "let's verify this answer" or "what could go wrong with this reasoning?" also improve performance — they're all variations on the same trick. You're forcing the model to generate tokens that activate the careful, checking, second-order-reasoning parts of its learned distribution before committing to a final output. The model's output isn't just the answer. It's the thinking environment in which the answer is produced.