Chain of thought prompting: how to make an AI reason step by step, and when to skip it
In 2022, Google researchers showed that adding eight worked reasoning examples to a prompt took the PaLM model from 17.9% to 56.9% correct answers on a benchmark of math word problems (Wei et al.). The technique is called chain of thought prompting: you ask the AI to write out the intermediate steps of its reasoning before it gives the answer. It helps most with arithmetic and logic problems. This guide covers where it comes from, how to write it with examples, its main variants, and why it adds much less with the reasoning models of 2026.
Chain of thought at a glance
| Question | Short answer |
|---|---|
| What is it? | A prompting technique that makes the AI lay out its reasoning, step by step, before the final answer. |
| Origin | A Google Research paper published in January 2022 (Wei et al.). |
| Two forms | Zero-shot (a sentence such as "Let's think step by step") or few-shot (solved examples inside the prompt). |
| Where it works | Math, logic, multi-step problems. Little effect on knowledge or writing-style questions. |
| In 2026 | Reasoning models do it on their own: an explicit instruction adds little and costs time. |
Where chain of thought comes from
The idea is simple: a person solving a math problem writes down the intermediate calculations. Jason Wei and eight Google colleagues applied that to large language models. Instead of showing the model "question, answer" pairs, they showed it "question, reasoning, answer" triples.
The gain only appeared with very large models. According to the paper, the technique helps only from roughly 100 billion parameters: below that, models wrote fluent but illogical reasoning and did worse than with a standard prompt.
A few months later, a team from the University of Tokyo and Google found that one sentence was enough. By adding "Let's think step by step", Kojima et al. took an OpenAI model from 17.7% to 78.7% correct answers on an arithmetic benchmark, with no examples at all.
Two ways to write a chain of thought prompt
Zero-shot: one instruction is enough
You ask the question and explicitly request the reasoning. It is the fastest version, handy for a one-off question in ChatGPT, Gemini or Claude. How few-shot and zero-shot compare is covered in our page on few shot prompting.
A store has 150 cartons of eggs. It sells 35 on Monday and 42 on Tuesday, then receives 60 on Wednesday. How many does it have on Thursday morning? Think step by step, then give the final result on a separate line.Zero-shot prompt example
The model then writes 150 − 35 = 115, then 115 − 42 = 73, then 73 + 60 = 133, before concluding. If one step is wrong, you spot it immediately.
Few-shot: show a model answer
You put one or more solved problems in the prompt, with their reasoning, followed by the real question. The model copies the shape of the reasoning. This is the method of the 2022 paper, and it is more reliable for a repeated task because you set the structure of the steps.
Question: Lea has 3 boxes of 12 pencils and gives away 8. How many does she have left? Reasoning: 3 × 12 = 36 pencils. 36 − 8 = 28. Answer: 28. Question: Tom buys 4 packs of 6 bottles and drinks 5. How many are left? Reasoning:Few-shot prompt example
How to use chain of thought prompting in 5 steps
- Check that the task fits: a calculation, a deduction, scheduling under constraints, a multi-step diagnosis. For a translation or a summary, skip it.
- Check which model you are using: if it is a reasoning model (thinking mode on), do not add a step-by-step instruction and go straight to step 5.
- Ask for the reasoning before the answer: "Think step by step before you answer." If the answer comes first, the reasoning written afterwards can no longer correct it.
- Separate the final answer: ask for it on its own line or after a marker ("Answer:"). This is essential if a program has to extract it.
- Ask for a check: add "Before you finish, verify your result." Anthropic recommends this kind of instruction, which catches errors especially in code and math.
These settings are part of the broader practice of prompt engineering: always compare the prompt with and without chain of thought on a few real cases before you adopt it. For the basics of a well-built AI prompt, see our reference guide.
Chain of thought variants
| Variant | How it works | Published result |
|---|---|---|
| Self-consistency | Generate several reasoning paths and keep the most frequent answer | +17.9 points on GSM8K (Wang et al., 2022) |
| Tree of thoughts | Explore several paths, evaluate them, backtrack when needed | Game of 24: 74% success vs 4% for GPT-4 with chain of thought (Yao et al., 2023) |
| Auto-CoT | Have the reasoning examples generated automatically | Avoids writing examples by hand (Zhang et al., 2022) |
Self-consistency rests on a simple idea: a hard problem can be solved along several paths that reach the same correct answer. Tree of thoughts goes further but needs many calls to the model. Auto-CoT groups questions by similarity and produces one reasoning example per group. These variants mostly serve developers; in a chat, the zero-shot version is enough.
Chain of thought and reasoning models in 2026
Since 2024-2025, reasoning models from OpenAI, Google, Anthropic and DeepSeek produce an internal chain of thought before every answer. The technique has become a model feature. As a result, a "step by step" instruction does almost nothing for them.
- OpenAI says in its reasoning best practices that asking these models to "think step by step" is unnecessary, since they already reason internally. It recommends brief, clear instructions.
- Anthropic writes in its prompting guide that a general instruction such as "think thoroughly" often produces better reasoning than a hand-written step-by-step plan. Manual chain of thought remains a fallback when thinking is off.
- A Wharton study from June 2025 (Meincke et al.) tested the instruction on 198 PhD-level questions. Average gains were 11.7% for Claude 3.5 Sonnet and 13.5% for Gemini 2.0 Flash, both standard models, but only 2.9% for o3-mini, a reasoning model. For reasoning models, answers took 20 to 80% longer.
Explicit chain of thought prompting therefore still has a place with standard models, small models run locally, and applications where built-in thinking is switched off to cut costs.
The limits of chain of thought
- The gain is mostly limited to math and logic: a meta-analysis of over 100 papers shows that outside those areas, answering directly is almost as accurate. On the MMLU benchmark, the gap is concentrated in cases where the question or the answer contains an equals sign.
- It costs more: every written step uses tokens, so time and money on an API.
- It can hurt an easy answer: the Wharton study notes more variability, with errors on questions the model got right without the instruction.
- The displayed reasoning is not always the real one: in an Anthropic study from April 2025, models that used a hint slipped into the question mentioned it only 25% (Claude 3.7 Sonnet) and 39% (DeepSeek R1) of the time.
- Well-written reasoning can still be wrong: the 2022 paper says so itself, nothing guarantees the chain is correct. An AI hallucination laid out in five steps is still a hallucination.
That last point goes beyond prompting: in July 2025, 41 researchers from several labs published a call to preserve the readability of these chains of thought, because the ability to monitor models through them is described as "fragile".
Key takeaways
Frequently asked questions
What is chain of thought prompting?
It is a prompting technique that asks a generative AI to write out the steps of its reasoning before the final answer. It was introduced by Google researchers in 2022 and improves results most on math and logic problems.
How do you write a chain of thought prompt?
The simplest way is to add a sentence such as "Think step by step, then give the final answer" to your question. For a repeated task, place one or two solved examples with their reasoning before the question: the model will follow that structure.
What is the difference between chain of thought and few-shot prompting?
Few-shot prompting means giving examples in the prompt. Chain of thought means making the model write its reasoning. The two combine: few-shot chain of thought shows examples that include their reasoning, while zero-shot chain of thought uses only an instruction.
Does chain of thought prompting work with ChatGPT?
Yes, with standard models it mainly improves calculations and multi-step problems. With a reasoning model, which already thinks before answering, OpenAI considers the instruction unnecessary: ask for a clear answer instead and check it.
What is the difference between chain of thought and tree of thoughts?
Chain of thought follows a single line of reasoning from start to finish. Tree of thoughts explores several paths, evaluates them and drops the bad ones. It does better on some search-type problems but needs many more calls to the model.
Sources
- Chain-of-Thought Prompting Elicits Reasoning in Large Language ModelsarXiv (Wei et al., 2022)
- Large Language Models are Zero-Shot ReasonersarXiv (Kojima et al., 2022)
- Self-Consistency Improves Chain of Thought Reasoning in Language ModelsarXiv (Wang et al., 2022)
- Tree of Thoughts: Deliberate Problem Solving with Large Language ModelsarXiv (Yao et al., 2023)
- Automatic Chain of Thought Prompting in Large Language ModelsarXiv (Zhang et al., 2022)
- Reasoning best practicesOpenAI
- Prompting best practicesAnthropic
- Prompting Science Report 2: The Decreasing Value of Chain of Thought in PromptingWharton Generative AI Labs
- To CoT or not to CoT? Chain-of-thought helps mainly on math and symbolic reasoningarXiv (Sprague et al., 2024)
- Chain of Thought Monitorability: A New and Fragile Opportunity for AI SafetyarXiv (Korbak et al., 2025)