In this guide
Chain-of-thought prompting means asking an AI model to work through a problem in explicit steps before giving its final answer. It tends to help on tasks with several stages, such as arithmetic, logic, planning and comparing options. It does not help on every task, and the steps it shows can still contain mistakes, so you need to read them rather than trust them.
What chain-of-thought prompting is
A language model produces text one piece at a time. When you ask it to write out intermediate steps, those steps become part of the text it is working from, which can make later parts of the answer more consistent. In effect, you are giving it room to work instead of demanding an instant verdict.
A simple version is adding an instruction such as "work through this step by step, then give the final answer". A more structured version asks for specific stages, such as listing facts, then calculating, then concluding.
A worked example
Here is a task where steps matter:
A team has a budget of 12,000. Software costs 3,500 per year. Training costs 450 per person for 8 people. Travel is a flat 1,200. How much of the budget is left?
Work through it step by step. Show each calculation, then state the final amount on its own line.A good response lists the training total (450 multiplied by 8), adds the three costs, subtracts from the budget and states the result. Because each step is visible, you can spot an arithmetic slip quickly. Without the request, the model may jump to a number with no way for you to audit it.
For anything that matters, still check the calculation yourself or with a calculator. Models can make errors in arithmetic, even when they show their steps.
When step-by-step helps
- Multi-step reasoning: puzzles, word problems and scheduling.
- Comparing options: listing criteria, assessing each option, then recommending.
- Planning: breaking a goal into ordered tasks and dependencies.
- Debugging logic: tracing where a process or argument goes wrong.
- Checking work: asking the model to review its own answer against a list of criteria.
When it helps less
- Simple lookups and short rewrites, where steps add length without value.
- Creative writing, where over-structuring can make text stiff.
- Tasks needing facts the model lacks, because reasoning cannot create missing information. See AI hallucinations.
- Strict output formats, where extra explanation breaks your template. In that case, ask for the reasoning in a separate section, or ask for the answer only.
A note on reasoning-focused models
Some current models are built to reason in steps internally before they respond, and some tools show or hide that process. This is a fast-moving area, so check the current documentation of the tool you use. If a model already reasons by default, adding "think step by step" may add little. Test with and without it on a few of your own tasks and compare.
Chain-of-thought is not proof
The reasoning shown by a model reads like an explanation, but it is not a guarantee that the answer is right, or even that the written steps match how the answer was produced. Treat it as a readable draft. Watch for:
- Confident steps that rest on an invented fact.
- Calculation errors in the middle of a correct-looking method.
- A conclusion that does not follow from the steps above it.
The habits in how to fact-check AI answers apply here too.
Practical ways to use it
- Ask for stages. "First list the assumptions, then analyse, then recommend."
- Separate reasoning and answer. "Show your reasoning under 'Working', and give the final answer under 'Answer'."
- Add a verification step. "After answering, check each calculation again and note any doubt."
- Combine with examples. Show one worked example of the reasoning style you want. This pairs well with few-shot prompting.
- Request assumptions. "State any assumption you make instead of filling gaps silently."
Here is a prompt template for a decision task:
Decide which of the two vendors below better fits a small team with a limited budget.
Step 1: List the criteria that matter and why.
Step 2: Score each vendor against each criterion using only the information provided. Mark "unknown" where details are missing.
Step 3: Give a recommendation in two sentences and name the biggest remaining uncertainty.
Vendor information:
"""
[paste details]
"""This works because it controls the structure of the thinking and exposes gaps. For the wider framework around it, read how to write good AI prompts. In the QAM.AI course, structured reasoning prompts are practised with text exercises; the curriculum lists the stages.
Key takeaways
- Chain-of-thought prompting asks the model to reason in steps before giving a final answer.
- It helps most on multi-step reasoning, planning and comparisons, and least on simple or creative tasks.
- Shown reasoning can still be wrong, so review the steps and verify key facts and numbers.
- Some models reason by default, so test whether the extra instruction changes anything.
- Ask for assumptions and a separate final answer to make output easier to check.
Frequently asked questions
Does "think step by step" always improve answers?
No. It can help on tasks with several stages, but it adds little to simple questions and may make creative writing worse. Test it on your own tasks and keep it only when the results are better.
Should I trust the reasoning the model shows?
Use it as something to check, not as proof. The steps make errors easier to spot, but a model can still present flawed reasoning with confidence. Verify important facts and calculations independently.
How is this different from few-shot prompting?
Chain-of-thought is about asking the model to show intermediate steps. Few-shot prompting is about giving examples to follow. You can combine them by giving examples that include the reasoning you want.
This guide is general educational information and is reviewed periodically. AI tools change quickly, so check each vendor's current documentation before relying on specific features or limits.