Skip to content
Prompt Engineering

Chain-of-Thought Prompting Explained: Step-by-Step AI Reasoning

AIblogly Team October 12, 2026
Chain-of-Thought Prompting Explained: Step-by-Step AI Reasoning

In short: chain-of-thought (CoT) prompting means getting an AI model to write out its reasoning step by step before giving the final answer. A 2022 Google paper showed that worked, step-by-step examples in the prompt raised accuracy on maths word problems; a second 2022 paper found that just adding "Let's think step by step" did much the same. Many current models now reason this way automatically, through a built-in "thinking" or effort setting.

What is chain-of-thought prompting, in simple words?

It is asking the model to show its working, like a maths teacher asks a student to. Instead of jumping straight to an answer, the model writes the intermediate steps ("first this, then that, so the answer is..."), and each step gives it something correct to build the next one on.

Without chain of thought:

Q: A shop has 23 apples. It uses 20 for lunch and buys 6 more. How many apples does it have? A: 27

With chain of thought:

A: The shop started with 23 apples. It used 20, so 23 - 20 = 3. It bought 6 more, so 3 + 6 = 9. The answer is 9.

It is a variation on few-shot prompting, the technique of putting examples in the prompt. For the basics of writing prompts, see the prompt engineering guide.

Where did chain-of-thought prompting come from?

The term comes from a paper submitted on 28 January 2022 by Jason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma and colleagues at Google: Chain-of-Thought Prompting Elicits Reasoning in Large Language Models.

Instead of examples that pair a question only with its answer, each example in the prompt also showed the reasoning:

Q: Roger has 5 tennis balls. He buys 2 more cans of tennis balls. Each can has 3 tennis balls. How many tennis balls does he have now? A: Roger started with 5 balls. 2 cans of 3 tennis balls each is 6 tennis balls. 5 + 6 = 11. The answer is 11.

How much does chain-of-thought prompting help?

In the original paper, a 540-billion-parameter model prompted with eight worked examples reached state-of-the-art accuracy on a benchmark of school maths word problems. The model was Google's PaLM and the benchmark was GSM8K; the authors report it surpassed a fine-tuned GPT-3 with a verifier.

The benefit depended on size. Chain of thought helped large models and did little for small ones, whose written reasoning was often fluent but wrong. The authors described it as an emergent ability of model scale: something that appears only once models are big enough.

What is zero-shot chain of thought ("Let's think step by step")?

Zero-shot chain of thought skips the examples and just adds one sentence: "Let's think step by step". It comes from Large Language Models are Zero-Shot Reasoners, submitted on 24 May 2022 by Takeshi Kojima and colleagues.

With InstructGPT (text-davinci-002), the paper reports:

BenchmarkStandard zero-shotWith "Let's think step by step"
MultiArith17.7%78.7%
GSM8K10.4%40.7%

What is self-consistency?

Self-consistency asks the model for several separate reasoning chains and takes the answer that comes up most often, a majority vote. It comes from Self-Consistency Improves Chain of Thought Reasoning in Language Models (Xuezhi Wang and colleagues, 2022). The idea is that a hard problem usually has several valid routes to the right answer, while mistakes scatter across different wrong answers.

Do I still need chain-of-thought prompting with today's models?

Many current models reason before answering as part of how they were trained, and expose it as a setting instead of a prompt. The papers above tested models that answered immediately unless told otherwise. Today a single model is often offered at several effort or thinking levels (for example low, medium, high and max), where higher levels spend more reasoning tokens before the answer. Each model's page in our AI models directory lists the settings its maker documents, and vendors' own prompting guides describe how their models respond to step-by-step instructions.

What carries over from the research is the finding itself: on multi-step problems, generating intermediate steps before the final answer measurably changed accuracy, and the size of the effect depended on the model.

When does chain of thought help, and when not?

  • Helps most: maths word problems, logic puzzles, multi-step questions, planning, and anything where an early mistake ruins the answer.
  • Helps little: simple lookups, short factual questions and one-step tasks, where the extra text only adds length.
  • Does not guarantee correctness: a written chain can look convincing and still contain a wrong step, as the original paper found with smaller models.

Words to know

  • Chain of thought (CoT): step-by-step reasoning written out before the answer.
  • Few-shot CoT: giving worked examples that include the reasoning.
  • Zero-shot CoT: adding "Let's think step by step" with no examples.
  • Self-consistency: sampling several reasoning chains and taking the majority answer.
  • Emergent ability: a skill that appears only in models above a certain size.
  • GSM8K: a benchmark of grade-school maths word problems.
  • Reasoning tokens: the text a thinking model generates before its final answer.
  • Effort level: a setting that controls how much a model reasons before answering.

Frequently asked questions

What is chain-of-thought prompting?+

Chain-of-thought prompting is getting an AI model to write out its reasoning step by step before giving a final answer, either by showing it worked examples or by adding an instruction such as "Let's think step by step". It improves accuracy on multi-step problems such as maths word problems.

Who invented chain-of-thought prompting?+

It was introduced in the paper "Chain-of-Thought Prompting Elicits Reasoning in Large Language Models", submitted on 28 January 2022 by Jason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma and colleagues at Google.

What does "Let's think step by step" do?+

Adding "Let's think step by step" makes a model reason in steps without needing examples, a method called zero-shot chain of thought. In the 2022 paper that introduced it, InstructGPT's accuracy on the MultiArith benchmark rose from 17.7% to 78.7%.

Does chain-of-thought prompting work on small models?+

The original paper found it helped large models and did little for small ones, whose written reasoning was often fluent but wrong. The authors described it as an emergent ability of model scale.

What is the difference between chain of thought and a thinking mode?+

Chain-of-thought prompting asks for step-by-step reasoning in the prompt. A thinking or reasoning mode is built into the model by its training and controlled by a setting such as an effort level, so the model reasons before answering without being asked.

What is self-consistency in prompting?+

Self-consistency means asking a model for several separate step-by-step answers to the same question and choosing the answer that appears most often. A 2022 paper by Xuezhi Wang and colleagues found it improved chain-of-thought accuracy.

Enjoyed this? Get more in your inbox.

Up to ten of the week's AI news stories, by email once a week.