Chain-of-Thought Prompting
Zero to GPT's sampling lesson covered how a model generates one token at a time, each new token attending back over everything already generated, including the tokens it just produced itself. Chain-of-thought (CoT) prompting exploits this directly. Instead of asking for a final answer immediately, you ask the model to reason out loud first, and every reasoning token it writes becomes part of the context the next token gets to attend to. The model is effectively handing its future self extra scratch work instead of trying to leap straight to the answer in one shot.
Predict before you look
A multi-step percentage word problem. Before you look, do you expect the direct-answer version and the step-by-step version to land on the same final number?
They don't. Asked to answer immediately, the model got 31, wrong, off by a step, the correct answer is 38. Asked to think step by step, it correctly computed 35% of 120 = 42 sold in the morning, added the 40 sold in the afternoon for 82 total, and subtracted from 120 to get 38. Same model, same question, same underlying weights, the only difference is whether it got to write out intermediate steps before committing to a final number.
This isn't universal. On a simpler problem (a juggler/golf-ball puzzle, try it in the widget above by imagining swapping the payload) both direct and step-by-step land on the same correct answer, because the problem doesn't need much intermediate work. CoT's advantage shows up specifically on multi-step problems, the kind where skipping straight to an answer skips real computation the model needed to do first.
Why does writing out reasoning steps actually change a model's final answer, rather than just making the response longer?