mantus.ai

FIVE MINUTES TODAY, A SMARTER TOMORROW

What is Chain of Thought and when should I use it?

Discover how to break complex problems into reasoning steps, making AI show its work and dramatically improve accuracy on multi-step tasks.

Chain of Thought prompting is a way of asking the model to produce structured reasoning as part of its response. The key thing to separate upfront: what the model outputs as "reasoning" is not a transparent window into its internal process. Modern models do a lot of computation before producing a word. What you're shaping with Chain of Thought prompts is the form of the output, not a faithful record of what happened inside. A visible explanation can still be useful. Just do not treat it as ground truth about how the model "really" solved the problem.

What you actually control is which kind of reasoning support you want in the response: a concise explanation, stated assumptions, intermediate checks, or a step by step verification. Knowing which you need changes how you write the prompt.

When explicit reasoning helps

Large language models struggle with multi-step problems when you ask for direct answers. They're prediction engines, not calculators. Give them a math problem without guidance and they often fail.

Try asking: "When I was 3 years old, my partner was 3 times my age. Now, I am 20 years old. How old is my partner?"

The model might answer "63 years old", completely wrong. It's pattern-matching from training data rather than working through the problem. The model sees numbers and relationships but skips the logical steps needed to solve it correctly.

This happens because language models predict the most likely next token based on patterns they've seen before. For complex reasoning tasks, the most likely token is not necessarily the correct one.

The Chain of Thought solution

Add reasoning steps to your prompt. Instead of asking for a direct answer, guide the model through the process:

"When I was 3 years old, my partner was 3 times my age. Now, I am 20 years old. How old is my partner? Let's think step by step."

Now the model works through it methodically:

  1. When I was 3 years old, my partner was 3 × 3 = 9 years old
  2. The age difference is 9 - 3 = 6 years
  3. Now I'm 20 years old, so my partner is 20 + 6 = 26 years old

The answer: 26 years old. Correct.

The displayed steps helped produce a better answer. Whether those steps accurately reflect what the model computed internally is a separate question and not one you can answer from the output alone.

A note on newer models

If you're using a reasoning model like o3, o4-mini, or Claude with extended thinking, "Let's think step by step" is largely redundant. These models reason by default, often in a hidden scratchpad before producing output. You don't need to prompt them to reason. What you do need to decide is what you want visible in the final response.

For older models or general-purpose ones like GPT-4o or Claude Sonnet in standard mode, the explicit instruction still helps. Knowing which model you're using matters.

Choosing what to surface

Ask for the form of reasoning support that actually serves your task. Full traces are long and often harder to read than a clean answer with key assumptions stated. Be specific:

  • Assumptions only: "State any assumptions you're making, then give your answer."
  • Key steps only: "Show only the steps where the logic could go wrong."
  • Verification check: "Solve the problem, then verify your answer by working backwards."
  • Full trace: "Show every step of your reasoning."

The verification check is underused. Asking the model to confirm its own answer with a different method catches errors that a single chain of steps misses. It also makes the output easier to check yourself, which matters more than knowing what the model "really" did.

Few-shot Chain of Thought works better

Zero-shot (just adding "Let's think step by step") helps, but providing an example works better. Show the model how you want it to reason:

"Q: When my brother was 2 years old, I was double his age. Now I am 40 years old. How old is my brother? Let's think step by step.

A: When my brother was 2 years old, I was 2 × 2 = 4 years old. That's an age difference of 2 years and I am older. Now I am 40 years old, so my brother is 40 - 2 = 38 years old. The answer is 38.

Q: When I was 3 years old, my partner was 3 times my age. Now, I am 20 years old. How old is my partner? Let's think step by step.

A:"

The model follows your reasoning pattern more consistently when you demonstrate it first.

Beyond math

Chain of Thought works for any task that benefits from step by step reasoning. For code generation, break down requirements into specific implementation steps before asking for code. For data analysis, ask the model to state its assumptions before running calculations. For strategic recommendations, ask it to outline the logic before landing on a conclusion.

The technique works best when you can describe the steps a human would follow to solve the problem. If you know the logical sequence, you can prompt the model to replicate it.

Configuration

Set temperature to 0 for Chain of Thought prompts. Reasoning tasks typically have one correct answer, so you want deterministic output. The model should follow the most logical path, not explore alternatives.

Expect longer responses. The model generates reasoning steps plus the final answer, consuming more tokens. This costs more but delivers better accuracy on complex tasks.

Reading the output critically

Visible reasoning is useful for catching errors. If the final answer is wrong, trace through the stated steps to find where it went off track. Maybe it misunderstood the problem setup or made a calculation mistake partway through. That is genuinely useful. Just remember: the displayed explanation is not a guaranteed faithful record of the model's internal process. Treat it as a useful artifact, not a confession.

This means you should verify conclusions on tasks where accuracy matters, not just check whether the steps look plausible. Plausible-looking reasoning that produces a wrong answer is a real failure mode.

Use Chain of Thought when accuracy matters more than speed, when you need to verify the model's output, or when working with tasks that require multiple logical steps. Think of it not as "make the AI show its work" but as "ask for the reasoning support that helps you check the answer."