What is chain-of-thought prompting?

Updated October 2026 · How we answer

Short answerChain-of-thought prompting asks an AI to reason step by step before giving an answer. It improves performance on tasks that require logic, math, or multi-step reasoning.

How chain-of-thought works

Chain-of-thought (CoT) prompting encourages the model to break down a problem into intermediate steps. Instead of asking for a final answer directly, you prompt with something like 'Let's think step by step' or provide an example of step-by-step reasoning. This helps the model avoid jumping to conclusions and reduces errors.

CoT is especially useful for arithmetic, logical deduction, and complex decision-making. For example, if you ask 'If a train leaves at 3 PM traveling 60 mph and another leaves at 4 PM traveling 80 mph, when will they meet?', a CoT prompt would have the model first calculate distances and relative speeds before solving.

  • Ask for step-by-step reasoning
  • Provide a worked example
  • Use phrases like 'Let's think step by step'
  • Break the problem into sub-questions
  • Request the model to show its work

When to use it

CoT is most effective for tasks that require planning or multiple steps. It's less useful for simple factual recall or creative writing, where it might slow down responses without adding value. Some models, especially smaller ones, may not benefit as much from CoT.

You can combine CoT with few-shot prompting by including examples that show the reasoning process. This is called few-shot CoT. It's a powerful technique for getting reliable answers on challenging problems.

  • Math and logic puzzles
  • Multi-step instructions
  • Decision-making with trade-offs
  • Debugging or troubleshooting
  • Any task where the answer depends on intermediate steps

Common mistakes

  • Using CoT for simple questions where it's unnecessary and slows down the response.
  • Assuming all models benefit equally; some may not improve with CoT.
  • Forgetting to ask for the final answer after the reasoning steps.
From our shopsCaseMorph: Type an idea, see a custom phone case in seconds, then print a one-of-one.