AI engineering
When Chain-of-Thought Prompting Helped, and When It Hurt
Wei and colleagues found gains from worked examples on difficult tasks, but losses on smaller models. What their 2022 experiments actually establish.
Listen to the audio analysis
Create your ownWritten for builders and creators.
Most people think that if you want an AI to think harder, you just need to give it better instructions. But there's a hard physical limit to that logic.
Editor's note
Why this matters now
Wei and colleagues' 2022 chain-of-thought paper asks whether worked examples can help a language model solve multi-step problems. Its prompts show the question, intermediate reasoning and answer, then ask the model to continue that pattern on a new question.
For a builder choosing a prompting method, the useful result is conditional. The largest models tested improved on difficult reasoning tasks, while smaller models often produced fluent but incorrect steps. The paper explains when those extra tokens helped in its experiments. It does not supply a permanent parameter-count threshold for every model trained afterward.
The source
What it says
Distilled from the original. The notes above and below are the editor's own.
Show a Worked Solution in the Prompt
Standard few-shot prompting supplies examples of inputs and answers. Chain-of-thought prompting adds the intermediate steps. The model weights remain fixed: the change is in the examples supplied at inference time.
An illustrative arithmetic example makes the difference clear. A direct demonstration might pair “3 boxes contain 4 pencils each” with the answer “12.” A worked demonstration includes the multiplication before the answer. A harder word problem may also need an explanation of which quantities to combine and why.
The paper studies this form of few-shot prompting. Its results should not be treated as tests of every instruction containing “think step by step,” or of later models trained specifically for reasoning. The GPT-3 explainer describes the broader in-context learning setup that these worked examples extend.
Scale Changed the Results in These Experiments
The researchers tested several model families and sizes. Gains became pronounced at roughly the 100-billion-parameter scale in their experiments. Models below about 10 billion parameters often did worse with chain-of-thought examples than with standard prompting.
The small models could imitate the style of a solution while making invalid inferences. More text then supplied more opportunities for an error. This explains why fluent intermediate steps were not enough to establish that the method helped.
PaLM 540B, prompted with 8 worked examples, achieved a strong GSM8K result. The paper also reports gains on commonsense and symbolic reasoning tasks. These are observations about the tested models, training and benchmarks. Model size was also confounded with training compute, so the comparison does not isolate parameter count as the cause. Architecture and training can affect whether another model benefits.
The Harder Tasks Had More to Gain
GSM8K word problems require several operations and an understanding of what the quantities mean. The largest models benefited substantially from decomposing those problems into steps.
The SingleOp subset of MAWPS supplied a useful contrast. Its problems require only one operation, and the gains from chain-of-thought prompting were small or negative. Adding a longer explanation did not consistently help when a direct answer was already within reach.
The equation-only ablation tests a related question: are the extra words necessary, or would writing an equation be enough? Equations helped on simpler arithmetic tasks, but were less effective on semantically demanding GSM8K problems. In those experiments, natural-language steps helped connect the wording of the problem to the calculation.
The conclusion is about task demands, not a universal rule that every complex prompt needs a long answer. Extra generated steps have a cost, and the experiments show that their benefit varies.
Generalizing Beyond the Examples
The symbolic tasks included last-letter concatenation. A model could see examples involving shorter sequences and then be tested on longer ones. This isolates a useful question: can it apply the demonstrated procedure beyond the exact length shown in the prompt?
Larger models using chain-of-thought prompting showed better scaling on these out-of-distribution cases. Performance still depended on task and length. The result supports some procedural generalization in the tested setting, rather than unrestricted reasoning on unseen problems.
A Readable Solution Can Still Be Wrong
The paper's error analysis distinguishes mistakes in understanding the problem from missing steps and calculation errors. That makes the generated text useful for inspecting a failure. A reviewer can often locate the point where a plausible-looking solution went off track.
But a correct final answer does not prove every intermediate step was correct. The researchers found cases that arrived at the right answer despite flawed reasoning. Multiple-choice tasks also allow a model to guess correctly.
Nor does a visible chain establish a complete account of the model's internal computation. It is generated text that can be checked, not a guaranteed causal explanation. That limit matters if an application presents the explanation as evidence that an answer deserves trust.
What the Paper Supports for Builders
The paper provides a reason to compare direct answers with worked-example prompts on the task of interest. It does not justify requiring a model above 100 billion parameters, dismissing every smaller model, or promising a low-cost improvement from a prompt change alone.
A meaningful comparison keeps the input problems and scoring rules the same. Final-answer quality, latency and output length answer different questions. A more accurate but much longer solution may fit an occasional analysis task differently from a high-volume classification step.
The original paper includes the prompting examples, scale comparisons and error analysis. Its contribution is the evidence that intermediate steps can change task performance without fine-tuning, together with the conditions under which that benefit failed to appear.
Editor's note
What to do with this
Chain-of-thought prompting worked best where the tested model could use the extra steps to solve a problem it struggled to answer directly. Where that capability was absent, the same format could make performance worse. That is the transferable lesson from the 2022 result: a prompting technique belongs with the model and task on which it was evaluated. The appearance of a worked solution is useful evidence to inspect, but it cannot substitute for checking the answer.
The original
Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
Wei et al. · 28 January 2022
Read next
AI engineering
GPT-3: What Examples in a Prompt Can Teach a Model
The 2020 paper tested one model across many tasks without fine-tuning. Its gains and failures explain the promise and limits of in-context learning.
4 min read7 min listen
AI engineering
The RAG Paper: What Retrieval Added to Generation
The original RAG model combined document retrieval with generation. Its factuality gains and index-swap experiment show what that split can and cannot do.
4 min read7 min listen