What Is Chain of Thought Prompting? (With Simple Examples)

Chain of thought prompting asks an AI to show its steps before answering. Simple examples, copy-paste templates, the research behind it, and when to skip it.

Get a summary in:
Headline Chain of Thought Prompting beside a card showing two calculation steps, 23 minus 20 equals 3 and 3 plus 6 equals 9, leading to Final answer: 9
Follow Teck Hustlers on Google
Add Teck Hustlers as a preferred source to see more of our stories in Google Top Stories.
Add as preferred source on Google

Chain of thought prompting is a way of asking an AI model to work through the intermediate steps of a problem before it gives the final answer. Instead of jumping straight to “the answer is 12,” the model writes out the reasoning that gets it there. On multi-step tasks like word problems, logic puzzles and planning, that small change can make answers noticeably more accurate. This guide explains what chain of thought (CoT) prompting is, shows simple before-and-after examples, gives you templates you can copy, and covers when it is worth using in 2026 — and when newer “thinking” models make it unnecessary.

What is chain of thought prompting?

A chain of thought is a series of short reasoning steps that lead from a question to an answer, written in plain language. Chain of thought prompting is any prompt that gets a large language model to produce those steps before committing to a result.

The term comes from a 2022 Google Research paper by Jason Wei and colleagues, “Chain-of-Thought Prompting Elicits Reasoning in Large Language Models.” Their method was simple: instead of giving the model example questions with bare answers, they gave it a handful of examples where each answer included the worked-out steps. The model then copied that pattern on new questions, writing its own steps before the answer.

A few months later, researchers at the University of Tokyo and Google showed you do not even need worked examples. Adding the sentence “Let’s think step by step” before the answer was enough to trigger step-by-step reasoning in large models (Kojima et al., 2022). That version is called zero-shot chain of thought, and it is the one most people use in everyday chat.

If you are new to prompting terms, chain of thought sits alongside zero-shot and few-shot prompting as one of the core techniques in prompt engineering.

A simple chain of thought example

Here is the difference in practice, using a small word problem.

Standard prompt:

A café had 23 muffins. It sold 20 in the morning and baked 6 more at lunch.
How many muffins does it have now? Answer with a number.

A model answering in one shot has to do all the arithmetic “in its head” in a single step, and on harder versions of this kind of question that is where mistakes creep in.

Chain of thought prompt:

A café had 23 muffins. It sold 20 in the morning and baked 6 more at lunch.
How many muffins does it have now?
Work through it step by step, then give the final answer on its own line.

The kind of answer you get back:

Start: 23 muffins.
After selling 20: 23 - 20 = 3.
After baking 6 more: 3 + 6 = 9.
Final answer: 9

Each step is small and checkable. If the model slips, you can see exactly where. That is the whole idea: break one hard jump into several easy ones, and make them visible.

Diagram comparing a standard prompt that jumps straight from question to answer with a chain of thought prompt that goes from question through step 1 and step 2 to a clearly marked final answer, plus four tips on when to use it
A standard prompt asks for the answer in one jump. A chain of thought prompt asks the model to write the steps first, so each step is small and you can check where it went wrong.

Why chain of thought prompting works

Language models generate text one token at a time, and each new token is based on everything written so far. When the model writes out “23 – 20 = 3” first, that intermediate result is now part of the text it is working from, so the next step builds on something concrete instead of a guess.

The research results were large for their time, especially on math word problems:

  • In the original paper, Google’s 540-billion-parameter PaLM model scored 17.9% on the GSM8K grade-school math benchmark with standard few-shot prompting and 56.9% with chain of thought prompting, using eight worked examples (Wei et al., 2022, Table 2).
  • With zero-shot chain of thought, adding “Let’s think step by step” took OpenAI’s text-davinci-002 from 17.7% to 78.7% on the MultiArith benchmark and from 10.4% to 40.7% on GSM8K (Kojima et al., 2022).
  • Sampling many reasoning paths and taking the most common final answer, a method called self-consistency, added another 17.9 percentage points on GSM8K for PaLM 540B (Wang et al., 2022).

Two caveats from the same papers matter just as much. First, the gains showed up mainly in very large models; Wei and colleagues found chain of thought only helped once models reached roughly 100 billion parameters, and smaller models wrote “fluent but illogical” chains that did worse than standard prompting. Second, the benefit was biggest on multi-step problems and small or even negative on one-step questions. Those benchmarks used 2022-era models, so treat the numbers as evidence that the technique works, not as a forecast of what you will see with today’s chatbots.

The main types of chain of thought prompting

“Chain of thought” now covers a small family of techniques. These are the ones worth knowing.

Zero-shot chain of thought

You add a short instruction like “think step by step” or “work through this one step at a time” to your prompt. No examples needed. It is the quickest version and the one to try first.

Few-shot chain of thought

You include two to eight example questions in your prompt, each with a worked answer that shows the steps. The model copies both the reasoning style and the answer format. This takes more effort to write, but it gives you more control. In Kojima’s comparisons, few-shot CoT with eight examples scored higher than zero-shot CoT on the same model (93.0% vs 78.7% on MultiArith), though zero-shot needed no examples at all (Kojima et al., 2022, Table 2).

Self-consistency

You run the same chain of thought prompt several times (with some randomness, controlled by temperature) and keep the answer that comes up most often. It costs more because you are paying for several runs, but it is useful when you need one reliable answer, such as a number or a yes/no.

Plan, then answer

A practical variation for everyday work: ask the model to outline its approach or list what it needs to check, then produce the final output. This is chain of thought applied to writing, research and planning tasks rather than math.

TechniqueWhat you add to the promptBest forTrade-off
Zero-shot CoT“Think step by step” or similarQuick fixes on multi-step questionsLess control over format and style of reasoning
Few-shot CoT2–8 worked examples with stepsRepeated tasks where you want a consistent methodMore work to write; examples must match the task
Self-consistencySame CoT prompt, several runs, majority voteSingle answers you need to trust (numbers, yes/no)Several times the cost and time
Plan, then answer“First outline your approach, then write the result”Writing, research, planning, comparisonsLonger responses; you may want to hide the plan

Chain of thought prompt examples you can copy

These templates work in ChatGPT, Claude, Gemini and most other assistants. Swap the bracketed parts for your own details. For more general templates, see our list of AI prompt examples.

1. Math or money question

[Paste the problem.]
Solve this step by step. Show each calculation on its own line.
Then write "Final answer:" followed by the number only.

2. Decision between options

I'm choosing between [option A] and [option B] for [goal].
My constraints: [budget, time, must-haves].
First list the factors that matter for my situation.
Then compare both options on each factor, one at a time.
Finish with a one-sentence recommendation and the main reason.

3. Debugging a spreadsheet formula or code

This formula returns [wrong result] but I expect [right result]:
[paste formula or code]
Walk through what it does step by step with my example values.
Point to the exact step where the result goes wrong, then give the fix.

4. Planning a project

I want to [goal] by [date] with about [hours per week].
Before giving a plan, list the main steps in order and any dependencies.
Then turn that into a week-by-week plan.

5. Few-shot example for a repeated task

Classify each customer message as Refund, Bug or Question. Reason briefly first.

Message: "I was charged twice this month."
Reasoning: Mentions a duplicate charge, which is about money back.
Label: Refund

Message: "The export button does nothing when I click it."
Reasoning: Describes a feature not working as expected.
Label: Bug

Message: "[new message]"
Reasoning:

If you build prompts for an app, the step-by-step instruction usually belongs with your standing rules, while the specific problem goes in each request — see system prompt vs user prompt for how to split them.

When chain of thought helps, and when it doesn’t

Use it for

  • Multi-step arithmetic and money questions — budgets, discounts, unit conversions, invoices.
  • Logic and rules — “does this situation meet all these conditions?”
  • Comparisons and decisions where several factors need weighing.
  • Debugging, where seeing the step that fails is the whole point.
  • Checking the model’s work, because visible steps are easier to audit than a bare answer.

Skip it for

  • Simple lookups and one-step questions. The research found little or no gain there, and you pay for a longer answer.
  • Creative writing and rewriting, where a reasoning preamble just gets in the way.
  • Reasoning models. Newer “thinking” models already reason internally before they answer. OpenAI’s reasoning best practices say prompting these models to “think step by step” is unnecessary and may not help, and can sometimes hinder performance; it recommends simple, direct prompts instead. Anthropic’s prompting guide similarly describes current Claude models deciding for themselves when and how much to think, and notes that thinking adds latency. Our explainer on what a reasoning model is covers how that built-in thinking works.

A useful rule of thumb in 2026: if you are using a fast, non-reasoning model (often the default or “instant” option in a chat app), add a step-by-step instruction for multi-step problems. If you are using a reasoning or “thinking” mode, give a clear goal and constraints and let it do its own reasoning.

Common mistakes with chain of thought prompting

  • Trusting the chain because it looks tidy. A neat, confident chain can still contain a wrong step or a made-up fact. In Wei’s error analysis, many wrong answers came from chains that were almost right but had a calculation slip or a missing step (Wei et al., 2022, Appendix D). Read the steps, and check any fact against a real source — the same habit that protects you from AI hallucinations.
  • Not asking for a clear final answer. Without “Final answer:” or a similar marker, the result can get buried in the reasoning.
  • Using mismatched examples. In few-shot CoT, examples from a different kind of task can confuse the model. Kojima’s team found examples from an unrelated task with a different answer format helped much less than matched ones.
  • Wording that discourages reasoning. The exact phrase matters less than its intent, but in Kojima’s tests, instructions like “Don’t think. Just feel.” performed no better than no instruction at all.
  • Using it everywhere. Longer answers cost more tokens and time. Save it for questions that actually have steps.

Frequently asked questions

What is chain of thought prompting in simple terms?

Chain of thought prompting means asking an AI to show its working. You tell it to go through a problem step by step before giving the final answer, which tends to make multi-step answers more accurate and lets you see where any mistake happened.

What is an example of chain of thought prompting?

Adding “Work through it step by step, then give the final answer” to a word problem is the simplest example. A few-shot example goes further: you include a couple of solved problems with their steps written out, and the model follows that pattern on your new question.

Who invented chain of thought prompting?

The term was introduced by Jason Wei and colleagues at Google Research in a 2022 paper, “Chain-of-Thought Prompting Elicits Reasoning in Large Language Models.” The zero-shot “Let’s think step by step” version came from Takeshi Kojima and co-authors the same year.

What is the difference between zero-shot and few-shot chain of thought?

Zero-shot chain of thought adds only an instruction such as “think step by step.” Few-shot chain of thought adds worked examples that show the steps. Few-shot gives more control and scored higher in the original research, while zero-shot is faster to write and often good enough.

Does chain of thought prompting still work with new AI models?

It still helps fast, non-reasoning models on multi-step tasks. Reasoning models already think before they answer, and OpenAI says telling them to “think step by step” is unnecessary and can sometimes hurt, so give those models a clear goal instead.

Is chain of thought the same as a reasoning model?

No. Chain of thought is a prompting technique you add to your request. A reasoning model is a model trained to produce its own internal reasoning before answering, without being asked. The idea is related, but one is something you write and the other is built into the model.

Does chain of thought prompting cost more?

Usually yes, a little. The model writes more text, so it uses more output tokens and takes longer. Self-consistency costs more again because it runs the prompt several times. For simple questions the extra cost buys you little.

The bottom line

Chain of thought prompting asks an AI model to write out its reasoning steps before answering. The 2022 research behind it showed big accuracy gains on multi-step math and logic for large models, and the zero-shot version only needs a line like “think step by step.” Use it with fast models on problems that genuinely have steps, always ask for a clearly marked final answer, and check the steps rather than trusting them. With reasoning models, skip the instruction and give a clear goal instead. To go further, pair this with zero-shot prompting and our AI prompt examples.

Follow Teck Hustlers on Google
Add Teck Hustlers as a preferred source to see more of our stories in Google Top Stories.
Add as preferred source on Google
About

The Teck Hustlers Editorial Team covers technology, business, finance and gaming news for readers who want the story behind the headline. Every article is researched, written and edited by our in-house team, checked against company announcements, filings and reputable reporting, and updated when new facts emerge. We focus on what each development means for founders, professionals, investors and everyday users. Have a tip or a correction? Reach us through our contact page.

Up next: How to Invoice a Client as a Freelancer (Step by Step)