Ask a 5-year-old "what is 17 x 24?" and they will guess. Maybe they will say 100, or 200, or some random number that feels right. Now ask them to work it out step by step: "First, what is 17 x 4? Now what is 17 x 20? Now add those together." Suddenly, with each sub-problem small enough to handle, even a child can reach the correct answer.
This is exactly what was happening with large language models before 2022. A 540-billion parameter model -- trained on essentially the entire internet -- could answer trivia questions, write essays, and translate languages. But ask it a grade-school math problem and it would confidently produce a wrong answer. The knowledge was there. The arithmetic capability was there. What was missing was a way to organize the computation into manageable steps.
Wei et al. (2022) discovered something remarkable: simply providing examples that include intermediate reasoning steps in the prompt caused the model to generate its own reasoning chains. No fine-tuning, no architecture changes, no new training data -- just a different kind of prompt. It is like showing your work in math class: the teacher does not make you smarter by requiring you to write out steps, but the act of writing forces you to think through each part sequentially, catching errors and building on intermediate results.
Standard Prompting
The model jumps straight to the answer. For simple problems this works, but for complex multi-step problems the model has no way to organize its reasoning. It must solve everything in a single "mental leap" -- and for hard problems, that leap is too far.
Chain-of-Thought Prompting
The model shows its work, decomposing the problem into verifiable steps. Each step becomes context for the next, creating a reasoning scaffold. Every intermediate result reduces the remaining problem complexity.
Why This Was Revolutionary
Chain-of-thought revealed that large language models already possessed reasoning capabilities that standard prompting could not access. The reasoning was latent in the weights -- CoT prompting simply provided the right format to elicit it. Think about the implications: the model was not learning to reason from the few-shot examples. It already knew how. The examples were just showing it the format in which to express its reasoning.
This insight -- that how you prompt matters as much as what you prompt -- launched the entire field of prompt engineering and reasoning research. It changed how we think about what language models can do and how to unlock their capabilities.
Did You Know?
The CoT paper was initially met with skepticism. Many researchers believed that the improvements were simply due to providing more tokens in the prompt. But ablation studies showed that random or incorrect reasoning chains did NOT help -- only logically valid chains improved performance. The model was actually following and extending the reasoning pattern, not just benefiting from longer context.
Wei et al. did not just show one example and declare victory. They ran a systematic, large-scale evaluation across three language model families (GPT-3, LaMDA, PaLM), five model sizes (ranging from 350M to 540B parameters), and eight reasoning benchmarks spanning arithmetic, commonsense, and symbolic reasoning. The results were remarkably consistent.
The experimental setup was elegant in its simplicity. For each benchmark, the authors wrote 8 exemplars -- question-answer pairs where the answer included a step-by-step reasoning chain. These exemplars were hand-crafted by the authors themselves, not generated by the model. The same 8 exemplars were used for all model sizes, allowing a clean comparison of how scale affects CoT's effectiveness.
Models Tested
Benchmarks
Key Controls
The Ablation Studies
To prove that CoT was actually working -- and not just benefiting from longer prompts -- the authors ran several clever ablation studies:
Replace natural language chains with just the equations (e.g., "2 x 3 = 6, 5 + 6 = 11"). Result: lower accuracy than natural language chains, proving the explanatory text matters.
Put the answer BEFORE the reasoning chain. Result: no improvement over standard prompting. The chain must come first to serve as working memory for computing the answer.
Replace reasoning text with "......" (same number of tokens). Result: no improvement. It is not about extra tokens -- it is about meaningful reasoning content.
Provide chains with incorrect logic but correct format. Result: accuracy drops significantly. The model is actually following the reasoning pattern, not just mimicking format.
Why This Matters
These ablation studies are what elevated the CoT paper from a neat trick to a scientific contribution. They showed that the improvement is not from prompt length, not from format, not from giving the model more time -- it is specifically from providing logically valid reasoning chains that the model can follow and extend.
The fundamental mechanism of CoT is the reasoning chain -- a sequence of intermediate natural language steps that bridge a question and its answer. Unlike formal proofs or structured programs, these chains use everyday language, making them both human-readable and model-friendly.
Why does writing out steps help? Because each intermediate step reduces the problem complexity. Consider the difference between solving "17 x 24" in your head versus on paper. On paper, you break it into 17 x 4 = 68 and 17 x 20 = 340, then add. Each sub-problem is trivial. The paper -- or in the model's case, the generated tokens -- acts as external working memory. The chain of thought is the model's scratch paper.
Chain-of-thought works across diverse reasoning domains: arithmetic reasoning (word problems), commonsense reasoning (physical world knowledge), symbolic reasoning (logical manipulation), and multi-hop reasoning (combining multiple facts). The key insight is that the chain acts as an external working memory, letting the model handle problems that exceed its single-pass computational capacity.
Reasoning Chains: Watch a Model Think
Pick a problem below and watch how chain-of-thought transforms a wild guess into a structured solution
Roger has 5 tennis balls. He buys 2 more cans of 3 tennis balls each. How many tennis balls does he have now?
The Core Insight
A chain of thought turns one hard problem into many easy problems. Ask a child "what is 17 x 24?" and they will guess. Ask them to work it out step by step -- "17 x 20 = 340, 17 x 4 = 68, 340 + 68 = 408" -- and they get it right. Chain-of-thought does the same thing for AI.
What Makes a Good Chain?
The Working Memory Analogy
When humans solve complex problems, we use scratch paper. The chain of thought serves the same purpose for language models: each generated token becomes part of the context window, effectively giving the model access to intermediate results that would otherwise be lost after a single forward pass.
This is not a loose analogy -- it is computationally precise. A Transformer with L layers has fixed computational depth per token. But with CoT, each new token gets L more layers of processing on ALL previous tokens. N reasoning steps means N x L effective depth. The model literally thinks deeper by thinking longer.
The original CoT paper used few-shot prompting: providing 8 exemplars, each with a question, a detailed reasoning chain, and the final answer. The model then generates a similar chain for new questions. But subsequent work discovered multiple variations, from zero-shot to self-consistency, each with different tradeoffs.
The choice of prompting strategy matters enormously. Self-consistency can boost GSM8K accuracy from 58.1% to 74.4% -- a massive 16-point improvement over basic CoT. Zero-shot CoT requires no examples at all and still captures a large fraction of the gains. Understanding these strategies is essential for getting the most out of modern language models.
Prompt Design Lab
Experiment with different prompting strategies and see how they affect reasoning quality
Build a few-shot CoT prompt below. Adjust the number of exemplars and chain style to see how the prompt changes. The paper found that 8 exemplars with natural language chains performed best.
Key Finding from the Paper
Natural language chains consistently outperformed equation-only chains by ~9%. Why? Because natural language provides explanatory structure that helps the model understand not just WHAT to compute, but WHY. The model benefits from the reasoning scaffold, not just the computation. This is similar to how a student learns better from a teacher who explains each step rather than just showing formulas.
The Prompt Engineering Revolution
CoT showed that how you ask matters as much as what you ask. This single insight launched a wave of research into prompt design. Today, every major AI application uses some form of structured prompting -- and it all traces back to the simple idea of including reasoning steps in examples.
Exemplar Design Matters
The original paper tested different reasoning chain styles: natural language, equations only, and a mix. Natural language chains consistently performed best, suggesting that the model benefits from the explanatory structure of natural language reasoning, not just the computational steps.
The number of exemplars also matters -- 8 was a sweet spot, with diminishing returns beyond that. Interestingly, the specific exemplars chosen can swing accuracy by 10-15 percentage points. The best exemplars cover diverse problem types and demonstrate different reasoning strategies.
Chain-of-thought is not just a clever trick -- it has deep computational foundations. A standard Transformer can only perform a fixed amount of computation per token (determined by its depth -- the number of layers). Complex reasoning problems may require more computation than a single forward pass provides. CoT solves this by letting the model trade inference time for computational depth.
Here is the key insight: each reasoning token the model generates gets fed back as input for the next prediction. This creates a feedback loop where the model can effectively perform sequential computation across multiple forward passes. A 5-step chain of thought means 5 forward passes, each building on the results of the previous -- dramatically more compute than a direct answer. It is analogous to how a 5-layer neural network can compute more complex functions than a 1-layer network.
Why Chain-of-Thought Works: A Computational Perspective
Explore the deep reason why generating intermediate steps makes models smarter
A Transformer has fixed computational depth -- determined by its number of layers. Without CoT, it must solve any problem in that fixed depth. With CoT, each generated token effectively adds another "pass" through the model. Drag the slider to see how CoT multiplies effective depth.
The Deep Insight
Chain-of-thought is not a hack or a trick. It is a fundamental expansion of what Transformers can compute. By generating intermediate tokens, the model turns a fixed-depth circuit into a variable-depth sequential computer. Each reasoning step is one more computational cycle. This is why CoT works, why it scales with more steps, and why it is here to stay.
The Scratchpad Analogy
Imagine being asked to multiply 47 x 83 in your head -- very difficult. Now imagine doing it on paper, writing intermediate results. The paper does not make you smarter; it gives you working memory. Chain-of-thought is the model's scratch paper. And just as you can solve arbitrarily long multiplication on paper (even though your mental capacity is limited), a model can solve arbitrarily complex reasoning with enough chain-of-thought steps.
Formal Results
Feng et al. (2023) proved that constant-depth Transformers cannot solve certain composition problems in one pass but CAN with CoT. Merrill and Sabharwal (2024) showed CoT makes Transformers Turing-complete under certain conditions. These are not heuristic improvements -- CoT provably expands the computational class of problems Transformers can handle.
One of the paper's most important findings is that CoT depends heavily on model scale. For small models (around 1B parameters), adding CoT prompting actually hurts performance -- the model generates plausible-sounding but incorrect reasoning steps. The benefits only emerge around 100B parameters and become dramatic at 540B.
This scale dependence is one of the strongest pieces of evidence for emergent abilities in large language models. It suggests that at sufficient scale, models develop qualitatively new capabilities -- not just more of the same. Chain-of-thought reasoning does not gradually improve with scale; it suddenly appears above a threshold. Below the threshold, CoT is actively harmful. Above it, it is transformative.
Scale and Reasoning: The Emergence Threshold
Explore how model size dramatically changes whether CoT helps or hurts
Drag the slider to explore how CoT performance changes with model scale. This is one of the most striking findings in the paper: CoT is an emergent ability that appears suddenly above a threshold.
At sufficient scale, CoT unlocks a qualitatively new capability. The model can reliably decompose, compute, and integrate multi-step solutions. Performance more than triples.
The Phase Transition
This is not a gradual improvement. Between 8B and 540B, CoT goes from actively harmful to tripling performance. This sudden "unlock" is what researchers call an emergent ability -- a capability that appears suddenly at scale rather than improving gradually. It suggests that at sufficient scale, models develop qualitatively new internal representations for logical decomposition.
Scale as a Prerequisite
CoT is an emergent ability -- it only works above a certain model size threshold. This is one of the strongest pieces of evidence that larger models do not just know more facts; they develop qualitatively different reasoning capabilities. The implication is profound: some AI capabilities are unlocked not by better algorithms, but simply by more scale.
The Emergent Ability
CoT is classified as an emergent ability because it appears suddenly above a scale threshold rather than improving gradually. PaLM 8B: CoT hurts. PaLM 62B: CoT helps moderately. PaLM 540B: CoT transforms performance. There is no smooth interpolation between these regimes. This is fundamentally different from most capabilities that scale smoothly with model size.
Why Small Models Fail
Small models can generate text that looks like reasoning chains, but the individual steps contain logical errors. They lack the internal representations needed to actually perform the computations described in the chain. The text is mimicry, not reasoning. It is like a student who has memorized the format of a proof but does not understand the logic -- the structure looks right, but the substance is wrong.
Implications for Practice
Do not use CoT with small models -- you will waste tokens and get worse results. For large models (GPT-4 class), CoT is almost always beneficial for reasoning-heavy tasks. For tasks that do not require multi-step reasoning (simple factual recall, classification), standard prompting is more efficient and equally accurate.
The CoT paper tested on 8 benchmarks across three categories: arithmetic reasoning, commonsense reasoning, and symbolic reasoning. The results were striking not just for their magnitude, but for their consistency across tasks.
| Benchmark | Type | Standard | CoT | Improvement |
|---|---|---|---|---|
| GSM8K | Math | 17.9% | 58.1% | +40.2% |
| SVAMP | Math | 79% | 86.7% | +7.7% |
| AQuA | Math | 35.8% | 48.3% | +12.5% |
| CSQA | Commonsense | 79% | 80.1% | +1.1% |
| StrategyQA | Commonsense | 73.4% | 77.8% | +4.4% |
| Date Understanding | Symbolic | 49.3% | 67.5% | +18.2% |
| Sports Understanding | Commonsense | 95.4% | 95.4% | 0.0% |
| Last Letter Concat | Symbolic | 0.2% | 59.6% | +59.4% |
The GSM8K Story
GSM8K is the benchmark where CoT shone brightest: a 3.2x improvement from 17.9% to 58.1%. This benchmark contains grade-school math word problems requiring 2-8 steps. Standard prompting essentially fails at multi-step math, while CoT turns PaLM 540B into a competent math problem solver. With self-consistency on top, accuracy reached 74.4%.
The Last Letter Surprise
The most dramatic result was on "Last Letter Concatenation" (concatenating the last letters of given words): from 0.2% to 59.6% -- a nearly 300x improvement. This task is purely symbolic and has no real-world training data to memorize from. CoT enabled the model to solve it by processing one word at a time, demonstrating genuine step-by-step computation.
Where CoT Helped Least
Sports Understanding showed 0% improvement (95.4% both ways) and CSQA showed only 1.1% improvement. These tasks primarily test factual knowledge rather than multi-step reasoning. If the answer can be retrieved from a single fact, intermediate reasoning steps add no value. This confirms that CoT specifically helps with reasoning tasks, not knowledge retrieval tasks. Knowing when NOT to use CoT is just as important as knowing when to use it.
The original CoT paper opened a floodgate of research into reasoning strategies. Within two years, dozens of variants emerged -- each optimizing for different tradeoffs between accuracy, cost, and applicability. From self-consistency (which boosts accuracy by sampling multiple chains) to tree-of-thought (which adds backtracking and search), the CoT family has grown remarkably rich.
The key dimension is the accuracy-cost tradeoff. Basic CoT is cheap but can be unreliable. Self-consistency samples 5-40 chains and votes, costing 5-40x more but significantly boosting accuracy. Tree-of-thought adds systematic search, yielding even better results at much higher cost. Understanding this frontier is essential for choosing the right strategy for your use case.
The CoT Family: Variants and Strategies
One idea spawned an entire ecosystem of reasoning techniques
CoT variants fall into four categories based on what they change. Click any variant to see how it works, what prompt it uses, and where it excels.
Provide exemplars with reasoning chains in the prompt
Just add "Let's think step by step" -- no examples needed
Sample multiple reasoning chains, majority vote on the final answer
Among multiple samples, prefer the longest/most complex reasoning chains
Explore multiple reasoning paths as a tree with deliberate search
Decompose into sub-problems, solve from simplest to hardest
📝 Few-Shot Chain-of-Thought
- 1.Write 4-8 question-answer examples with full reasoning
- 2.Include these examples before your actual question
- 3.The model mimics the reasoning style from examples
Q: Roger has 5 tennis balls. He buys 2 more cans of 3. How many now? A: Roger started with 5 balls. 2 cans of 3 = 6 balls. 5 + 6 = 11. The answer is 11. Q: [Your question here] A:
Choosing the Right Variant
Perhaps the most surprising follow-up to the original CoT paper was Kojima et al.'s (2022) discovery that you do not need any examples. Simply appending "Let's think step by step" to a prompt triggers chain-of-thought reasoning in large models. This zero-shot approach achieves a large fraction of few-shot CoT's gains with zero effort.
This finding has profound implications: it means the reasoning capability is already encoded in the model's weights from pretraining. The model has seen millions of examples of step-by-step reasoning in its training data (textbooks, tutorials, Stack Overflow). It already knows HOW to reason -- CoT prompting (whether few-shot or zero-shot) just tells it WHEN to reason.
The Two-Stage Process
Performance Comparison (GSM8K)
Other Trigger Phrases
Researchers tested many variations and found that the exact wording matters:
Chain-of-thought is not just an academic curiosity -- it has become a fundamental technique used in virtually every modern AI application that involves reasoning. From math tutoring to code generation, from medical diagnosis to legal analysis, CoT is the backbone of how large language models handle complex tasks.
Mathematical Reasoning
CoT enables LLMs to solve grade-school through college-level math problems by decomposing them into arithmetic steps. Used in AI tutoring platforms and homework assistants.
Code Generation
Planning code structure before writing it. Models that 'think through' the approach first write significantly better code with fewer bugs.
Medical Reasoning
Step-by-step diagnostic reasoning mimics how doctors actually think: gather symptoms, form hypotheses, eliminate possibilities, reach diagnosis.
Scientific Analysis
Breaking down complex scientific questions into sub-components, evaluating evidence, and synthesizing conclusions. Used in research assistance tools.
Legal Reasoning
Analyzing legal questions by identifying relevant statutes, applying precedents, and constructing arguments step by step.
AI Agents & Tool Use
ReAct framework interleaves reasoning (thought) with actions (tool calls). The agent thinks about what to do, acts, observes results, and reasons about next steps.
The Universal Technique
CoT has become so fundamental that it is built into the default behavior of modern chatbots. When you ask ChatGPT or Claude a complex question, the model internally generates reasoning steps before answering. Modern reasoning models like o1 take this further by spending variable amounts of "thinking time" depending on problem difficulty.
Chain-of-thought is powerful but not infallible. Understanding its failure modes is crucial for using it effectively. CoT can produce confident, detailed reasoning that leads to wrong answers. The chain can look perfect while hiding subtle errors that propagate through subsequent steps.
Arithmetic Errors in Steps
HighThe model may produce a correct reasoning structure but make a computational error in one step (e.g., 7 x 8 = 54), causing the entire chain to arrive at a wrong answer.
Faithful but Wrong Strategy
HighThe model may consistently apply the wrong approach -- using addition when multiplication is needed, or misidentifying which variable to solve for. The chain is internally consistent but fundamentally wrong.
Hallucinated Reasoning
MediumSmall or medium models may generate plausible-sounding steps that don't constitute valid reasoning. The text mimics the form of reasoning without the substance.
Exemplar Sensitivity
MediumPerformance varies significantly based on which few-shot examples are provided. Different exemplar sets can lead to 10-15% accuracy swings on the same benchmark.
Reasoning-Answer Mismatch
LowSometimes the reasoning chain arrives at the correct intermediate values but the model states a different final answer, or the chain contradicts itself.
Overhead on Simple Tasks
LowFor tasks that don't require multi-step reasoning (factual recall, classification), CoT wastes tokens and can even hurt accuracy by introducing unnecessary complexity.
The Verification Problem
A fundamental limitation of CoT is that generating reasoning and verifying reasoning require the same model. The model cannot reliably check its own work. This is why external verification (Chain-of-Verification), tool use (calculators, code execution), and human-in-the-loop approaches are important complements to CoT prompting.
Knowing the theory is great, but how do you actually use CoT effectively in practice? Here are battle-tested guidelines from both the original paper and subsequent research, distilled into actionable advice.
When to Use CoT
When NOT to Use CoT
Crafting Good Exemplars
The Cost-Accuracy Decision Matrix
For most applications, start with zero-shot CoT. If accuracy is not sufficient, try few-shot CoT with well-crafted exemplars. If you need higher reliability, add self-consistency with 5-10 samples. Only use tree-of-thought when maximum accuracy justifies the 50x cost increase.
In production systems, consider using a routing approach: use a quick classifier to determine if a query needs CoT, then only activate reasoning for complex queries. This gives you the best of both worlds -- fast answers for simple questions and accurate reasoning for hard ones.
Chain-of-thought prompting did not just improve benchmark scores -- it launched an entirely new paradigm in AI. The idea that models should "show their work" has become foundational to how we build, evaluate, and deploy language models. From prompt engineering to reasoning models, CoT's influence pervades every corner of modern AI.
The paper's citation count reflects its impact: it became one of the most-cited AI papers of its era. But more importantly, it changed how people think about AI capabilities. Before CoT, reasoning was considered something that needed to be explicitly trained. After CoT, we understood that reasoning capabilities could be latent in a model and elicited through the right prompts.
The CoT Legacy: From One Paper to a Revolution
How a simple prompting trick transformed the entire field of AI reasoning
Click on any technique to see its full story -- what it does, why it matters, and how it connects back to the original Chain-of-Thought paper.
"Let's think step by step" -- no examples needed
Sample many chains, majority vote on the answer
Explore reasoning as a tree with search and backtracking
Decompose hard problems into easier sub-problems
Generate answer, then verify each claim in the chain
Interleave reasoning with actions (tool use)
Train small models on CoT traces from large models
Train models via RL to produce long reasoning chains natively
From Prompting to Training
CoT started as a prompting technique but its success inspired training-time approaches. Modern reasoning models (OpenAI's o1, DeepSeek-R1) are trained with reinforcement learning to produce long reasoning chains. The model learns WHEN and HOW MUCH to reason, allocating more "thinking tokens" to harder problems.
Test-Time Compute Scaling
CoT revealed a new axis for scaling AI: instead of only scaling model size or training data, you can scale inference-time computation. More thinking tokens = better answers. This "test-time compute scaling" is now a major research direction, with models learning to dynamically allocate reasoning effort.
The Timeline of Reasoning
Chain-of-Thought Deep-Dive Quiz
Question 1 of 10What is the core mechanism of chain-of-thought prompting?
Congratulations! You now understand Chain-of-Thought prompting and the reasoning revolution.
From the core insight that step-by-step reasoning improves performance, to self-consistency, tree-of-thought, and modern reasoning models -- you have explored the technique that taught language models to think. The journey from a prompting trick to a fundamental AI capability is one of the most remarkable stories in modern machine learning.