35 min read
Three ways to see it
In 2022 a group of researchers at Google Brain noticed something that changed prompt engineering overnight. If you ask a language model to solve a multi-step problem and you simply add the phrase "let us think step by step" to the prompt, the accuracy on reasoning tasks jumps, sometimes by a factor of three. The paper was Wei et al., "Chain-of-Thought Prompting Elicits Reasoning in Large Language Models". The technique is now called chain-of-thought, abbreviated CoT, and it is one of the few prompt engineering tricks that has crossed from research into every serious deployment. It is also one of the easiest to misuse. This lesson teaches when to use it, when not to, and how to use it cleanly.
Way one: explicit "think step by step" CoT. You write the task as usual and at the end you add a single sentence, "think through this step by step before giving the final answer". That is it. For arithmetic, multi-condition logic, legal interpretation, and any task where the answer depends on a sequence of intermediate inferences, this single sentence will move the model from frequently wrong to reliably right. The reason is that the model now generates the intermediate steps as text, and each step conditions the next, which forces the kind of careful reasoning that fluent next-word generation tends to skip.
Way two: structured CoT with named steps. You name the steps you want the model to take, in order. For a Zakat calculation problem: "Step 1: list all assets and their values in PKR. Step 2: apply the relevant Zakatable rate for each asset class. Step 3: sum the Zakat amounts. Step 4: state the final Zakat due." The model now follows your scaffolding. This is much more reliable than the open-ended "think step by step" because you are not trusting the model to discover the right steps, you are imposing them. For domains where you know the procedure (tax, audit, legal due diligence) structured CoT will outperform open-ended CoT every time.
Quick check
Quick check: what makes modern AI different from a rule-based program?
The why-tree
Why CoT works. A language model has a fixed amount of computation per token it produces. If you force it to produce a one-word answer immediately, you get one token's worth of thinking. If you let it produce a long reasoning before the answer, you get a long chain of thinking, each step refining the next. CoT is the prompt-level mechanism for buying more reasoning compute from a model that cannot otherwise pause to think.
Sources
Sources. Wei, Wang, Schuurmans et al. 2022, "Chain-of-Thought Prompting Elicits Reasoning in Large Language Models". Kojima et al. 2022, "Large Language Models are Zero-Shot Reasoners" (the paper that introduced the bare "let us think step by step" trick). Anthropic's documentation on chain-of-thought and extended thinking in Claude. Wang et al. 2022, "Self-Consistency Improves Chain of Thought Reasoning in Language Models", for a useful extension.