What Is Chain-of-Thought Prompting?
Chain-of-thought prompting is a technique where you instruct an AI model to explain its reasoning step by step before giving a final answer, rather than jumping straight to a conclusion. This works because a language model generates each word based on everything it has written so far, so forcing it to lay out intermediate steps gives it more accurate context to build the final answer on. It noticeably improves performance on tasks involving arithmetic, logic, multi-step reasoning, and decisions that depend on several pieces of information.
Chain-of-thought prompting asks an AI model to reason step by step before answering, which improves accuracy on tasks that require logic or multiple steps.
Ask an AI model “what is 17 times 24, then subtract that from 500?” and jump straight to a number, and it will sometimes get it wrong even though each individual step is trivial arithmetic. Ask the same question but tell it to show its work first, and accuracy improves substantially. That gap is what chain-of-thought prompting exploits.
Why showing the work actually helps
A language model generates its response one token at a time, and each new token is predicted based on everything generated so far, including its own prior output in the same response. If a model is asked to answer immediately, it has to arrive at the correct answer in essentially one shot, with no intermediate scratch space.
If instead the model writes out “first, 17 times 24 is 408. Then, 500 minus 408 is 92,” each of those intermediate steps becomes part of the context the model reads when generating the next part. Errors are easier to avoid because the model is working with an explicit, correct intermediate result rather than trying to hold the entire calculation in one implicit pass. This is closer to how a person doing mental math benefits from writing down intermediate numbers instead of trying to do everything in their head at once.
What a chain-of-thought prompt looks like
The technique can be as simple as one added sentence:
A customer's order is €340. They have a 15% discount code
and free shipping is only applied above €300 after the discount.
Does this order qualify for free shipping? Think step by step
before giving your final answer.
Without the “think step by step” instruction, a model might jump to a plausible-sounding answer without correctly sequencing the discount calculation and the threshold check. With it, the model typically works through the discount first, checks the result against the threshold, and only then states the conclusion, which is far more likely to be correct.
Few-shot chain-of-thought
A stronger version of the technique includes a worked example directly in the prompt before asking the real question. You show one similar problem, walk through the reasoning explicitly, state the answer, and then present the actual question in the same format. The model picks up the pattern from the example and applies the same step-by-step structure to the new problem. This is called few-shot chain-of-thought, and it tends to produce more consistent reasoning than simply asking the model to “think step by step” with no example.
When it is not worth using
Chain-of-thought prompting adds generated text before the answer, and that costs both time and money since most AI providers bill per output token. For a question like “what is the capital of a country” or “rewrite this sentence more formally,” there is no multi-step reasoning to unlock, and adding chain-of-thought instructions just adds latency and cost with no accuracy benefit. Reserve the technique for genuinely multi-step problems: calculations, conditional logic, and questions that require combining several pieces of information into one conclusion.
Reasoning models versus prompted chain-of-thought
Newer models increasingly build step-by-step reasoning into their default behavior rather than requiring you to ask for it explicitly. Claude’s extended thinking mode and OpenAI’s reasoning-focused models spend additional computation reasoning through a problem before producing a final answer, often exposing that reasoning trace separately from the final response. Prompted chain-of-thought remains useful with any model, including simpler and cheaper ones, since it does not depend on a specific reasoning feature being available.
Our tip: For any prompt involving a calculation, a decision with more than one condition, or a conclusion drawn from multiple facts, add “explain your reasoning step by step before giving the final answer.” It costs a few extra tokens and catches a meaningful share of errors before they reach a customer or a report.
Frequently asked questions
How do I actually trigger chain-of-thought reasoning in a prompt?
The simplest way is adding a phrase like 'think step by step' or 'explain your reasoning before giving the final answer' to your prompt. You can also demonstrate the pattern with an example: show a similar question, walk through the reasoning, and give the answer, then ask your real question in the same format. Modern models such as Claude and GPT-4 often reason step by step by default on complex questions, but explicitly asking for it still improves reliability and gives you a visible trail to check.
Does chain-of-thought prompting make responses slower or more expensive?
Yes, because the model generates more text (the reasoning steps) before reaching the final answer, and most AI providers charge per token generated. For simple factual questions, this added cost brings no benefit and just slows the response down. The technique earns its cost specifically on tasks with multiple steps, calculations, or conditional logic, where the extra reasoning measurably reduces wrong answers.
Is chain-of-thought the same as reasoning models like extended thinking?
They are related but not identical. Chain-of-thought prompting is a technique you apply through how you write a prompt, usable with any language model. Dedicated reasoning models, such as Claude with extended thinking enabled or OpenAI's o-series models, have this step-by-step reasoning built into how they process a request by default, often with additional training specifically to make that internal reasoning more reliable, and typically show or hide the reasoning trace as a distinct feature rather than requiring a specific prompt phrasing.
What kinds of business tasks benefit most from chain-of-thought prompting?
Tasks that involve calculations (pricing, tax logic, unit conversions), multi-step decisions (should this expense be approved given three conditions), or extracting a conclusion from several pieces of unstructured information all benefit clearly. Simple lookups, tone rewrites, or straightforward summarization see little to no benefit and do not need the technique.