The Fast Track AI Subscribe

Home / Blog

Prompts

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.

Updated on 8 min read

Chain of thought at a glance

QuestionShort answer
What is it?A prompting technique that makes the AI lay out its reasoning, step by step, before the final answer.
OriginA Google Research paper published in January 2022 (Wei et al.).
Two formsZero-shot (a sentence such as "Let's think step by step") or few-shot (solved examples inside the prompt).
Where it worksMath, logic, multi-step problems. Little effect on knowledge or writing-style questions.
In 2026Reasoning 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

  1. Check that the task fits: a calculation, a deduction, scheduling under constraints, a multi-step diagnosis. For a translation or a summary, skip it.
  2. 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.
  3. 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.
  4. 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.
  5. 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

VariantHow it worksPublished result
Self-consistencyGenerate several reasoning paths and keep the most frequent answer+17.9 points on GSM8K (Wang et al., 2022)
Tree of thoughtsExplore several paths, evaluate them, backtrack when neededGame of 24: 74% success vs 4% for GPT-4 with chain of thought (Yao et al., 2023)
Auto-CoTHave the reasoning examples generated automaticallyAvoids 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.

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

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.

Related articles

Reference guideAI prompt: what a prompt is, how AI reads it and how to write a good one

The essentials of AI, every Wednesday.

Free, once a week, on Wednesday. A 5-minute read.