What Is Chain-of-Thought Prompting?
Chain-of-thought prompting is a way of asking an AI chatbot to show its working before giving an answer, by reasoning through a problem step by step instead of jumping straight to a conclusion. Rather than asking for the final answer alone, you ask the model to break the problem down, work through each part in order, and then state the result.
The technique became widely known after researchers showed that large language models answer complex questions far more accurately when they are given room to reason. A model asked to solve a maths word problem in one leap often guesses; the same model, asked to work through the numbers one step at a time, usually gets it right. The difference is not a bigger model: it is the same model, given a better way to approach the task.
For anyone who uses AI tools at work in 2027, chain-of-thought prompting is one of the most useful skills to learn. It costs nothing, needs no special software, and improves results on exactly the tasks where AI is otherwise weakest: multi-step reasoning, planning and checking work. This explainer covers what it is, how it works, the main variants, where it helps, where it can mislead, and how to use it well.
Key takeaways
- Chain-of-thought prompting asks an AI to reason step by step before answering, which improves accuracy on multi-step problems.
- It works best on tasks with clear intermediate steps, such as maths, logic, planning and structured analysis.
- The reasoning an AI shows is a generated explanation, not a record of its thinking, so it can sound convincing while being wrong.
- Zero-shot prompting uses a simple instruction, while few-shot prompting shows the model worked examples to copy.
- Always check the final answer independently on anything that matters, because step-by-step reasoning reduces errors but does not remove them.
What chain-of-thought prompting means in plain terms
When you ask a chatbot a question normally, it produces an answer directly. With chain-of-thought prompting, you ask it to lay out the steps first, then work through them one at a time, often by adding “think step by step” to your prompt. The final answer comes at the end of that chain.
A simple example makes the difference clear. Asked “A shop sells 3 packs of batteries for £9. How much do 7 packs cost?”, a model answering directly might guess. Asked to think step by step, it would write: one pack costs £9 divided by 3, which is £3; seven packs at £3 each cost £21. Each step is easy on its own, and the final answer follows from them.
How chain-of-thought prompting works

Large language models generate text one piece at a time. When a model must answer a hard question in a single leap, it has to do all the reasoning silently before producing the first word, which is where mistakes creep in. When it writes out intermediate steps, later steps can build on earlier ones instead of guessing.
Think of it as doing a sum on paper rather than in your head: you write down each intermediate result, and the next step uses the written number. Chain-of-thought prompting gives the model that paper. There is an important limit, though: the steps are generated text, not a window into its internal thinking, and a model can produce neat-looking steps that lead to a wrong answer.
Types and variants of chain-of-thought prompting
The simplest variant is zero-shot chain-of-thought, where you add a short instruction to your prompt, such as “Let’s think step by step”. You give no examples; you just ask the model to reason before answering. This is the easiest way to start, and it works surprisingly well on many problems. It is the variant most people should try first.
Few-shot chain-of-thought goes further: you include two or three worked examples in your prompt, each showing a question, a step-by-step solution, and the final answer, before asking your real question. The model copies that pattern, which helps when the steps need a particular format. Other variants build on the same idea: self-consistency runs the problem several times and takes the most common answer, while tree-of-thought compares several lines of reasoning.
Benefits of chain-of-thought prompting
The main benefit is accuracy on multi-step tasks. Studies of the technique consistently show the largest gains on arithmetic, logic puzzles, and problems where one wrong intermediate step ruins the answer. For everyday work, that translates into better results on budgeting, comparing quotes, planning a project timeline, and working through a decision with several factors.
A second benefit is transparency: when the model shows its steps, you can see its assumptions, and correct a wrong price, date or rule instead of receiving a confident answer with no way to check it. A third benefit is consistency: a model that writes down its intermediate results is less likely to contradict itself halfway through. For longer tasks, that consistency is often the difference between a usable result and a muddle.
Risks and limits to watch out for
The biggest risk is false confidence. Step-by-step reasoning looks rigorous, and a neat chain of steps can make a wrong answer feel trustworthy. A model can make a small error in step two, carry it faithfully through steps three and four, and arrive at a wrong answer with perfect-looking logic. The format feels like proof, but it is not proof, and the steps need the same checking as any other AI output.
Chain-of-thought prompting also uses more output, which means slower replies and higher costs on services that charge per word. For simple questions it adds nothing. It is also weak on questions that depend on facts the model does not know, because no amount of careful reasoning can invent a missing fact, and on creative work, where the steps can make the result feel mechanical.
Real-world uses of chain-of-thought prompting
In business, people use it to work through decisions that involve several factors: comparing two suppliers on price, delivery time and reliability; planning a project with tasks that depend on each other; or checking a budget where each line depends on the one before it. Asking the model to show each comparison or calculation makes the result easy to audit, which matters when money is involved.
In education, students use it to break down problems into teachable steps: a student stuck on a maths problem can ask the model to work through a similar example, then try the real problem alone. In software work, asking a model to trace through code line by line often surfaces a mistake faster than asking for the answer directly.
Chain-of-thought prompting vs direct prompting
Direct prompting asks for the answer straight away, and it is the right choice for simple, single-step tasks: a summary, a translation, a short draft, or a fact you want recalled. It is faster, cheaper, and less likely to overcomplicate something straightforward. Most everyday AI use is direct prompting, and that is fine.
Chain-of-thought prompting is the better choice when the task has several steps, when an error in the middle would ruin the result, or when you need to check the reasoning rather than just the answer. The trade-off is a longer reply. The broader skill of writing effective prompts is covered in our guide to the best AI writing tools in 2027, and our explainer on what a small language model is explains how smaller models handle reasoning tasks.
How to choose when to use chain-of-thought prompting
Choose it when the problem has clear intermediate steps and a single checkable answer. Maths, logic, planning, comparing options against criteria, and tracing a process are all good fits. If you can describe the steps yourself, even roughly, the model will usually follow them well. Skip it for simple recall, short creative writing, and anything where the answer is a matter of taste, or when speed matters more than accuracy, such as a quick draft you will rewrite anyway.
Remember that the technique is a tool for reasoning, not for knowledge: if the model does not know the facts, give it the facts in the prompt. For background on how models store information, our explainer on what a vector database is is a useful starting point.
| Detail | What it means |
|---|---|
| Definition | Prompting an AI to reason step by step before giving its final answer |
| Simplest form | Zero-shot: add “think step by step” to your prompt |
| More control | Few-shot: include worked examples for the model to copy |
| Best for | Maths, logic, planning, comparing options, checking work |
| Weakest for | Simple recall, creative writing, questions needing unknown facts |
| Main risk | Neat-looking steps can lead to a wrong answer with false confidence |
| Cost | Longer replies, so slower and more expensive per question |
| Key habit | Check the steps and the answer independently when it matters |
Checklist: using chain-of-thought prompting well
Use this checklist whenever you ask an AI to reason through something important, to get the benefit without being misled by it.
- Ask for the steps before the answer, not after it.
- Give the model the facts it needs in the prompt, rather than letting it guess them.
- Read the steps, not just the final answer, and check each one.
- For important decisions, run the problem twice and compare the reasoning.
- Use worked examples when the steps need a particular format.
- Keep direct prompting for simple tasks, and save step-by-step reasoning for multi-step ones.
Frequently asked questions
What is chain-of-thought prompting in simple terms?
It is asking an AI to show its working step by step before giving an answer, for example by adding “think step by step” to your prompt. The model then breaks the problem into smaller parts and solves each one in order.
Does chain-of-thought prompting always give the right answer?
No. It reduces errors on multi-step problems, often substantially, but the model can still make a mistake in one step and carry it through to the end. Always check the answer independently when accuracy matters.
What is the difference between zero-shot and few-shot chain-of-thought?
Zero-shot means you simply instruct the model to think step by step, with no examples. Few-shot means you include two or three worked examples in the prompt, showing the question, the steps and the answer, so the model copies that pattern for your question.
Can I use chain-of-thought prompting with any AI chatbot?
Yes, in most cases: it is a prompting method, not a feature, so it works with the major chatbots and AI writing tools. Some newer systems also reason step by step automatically.
Why does showing steps make an AI more accurate?
Because the model generates text one piece at a time, writing down intermediate results lets each later step use the earlier ones instead of guessing. It is like doing a sum on paper rather than in your head: the written steps keep track of the working.
Is chain-of-thought prompting the same as the AI thinking?
Not exactly. The steps are generated text that explains how an answer could have been reached, not a record of the model’s internal processes. They are useful and usually faithful, but they can be wrong, which is why checking matters.
The bottom line
Chain-of-thought prompting is a simple, free technique that makes AI noticeably better at the tasks where it is otherwise weakest: problems with several steps, where one error ruins the result. Ask the model to show its working, give it the facts it needs, and read the steps as well as the answer.
The habit to keep is checking. Step-by-step reasoning feels rigorous, and that is exactly why it can mislead when a step is wrong. Treat the chain as a draft to verify, not as proof, and you will get the accuracy gains without the false confidence.

