Chain-of-thought (CoT) prompting asks a model to work through a problem in explicit steps before giving a final answer — often meaningfully improving accuracy on multi-step reasoning tasks like math or logic problems.
Example
Without CoT:
"A store has 120 items. It sells 35% on day one and 20% of the
remainder on day two. How many items are left? Answer directly."
→ higher risk of an arithmetic slip with no visible reasoning to check
With CoT:
"...Work through this step by step before giving your final answer."
→ Step 1: 35% of 120 = 42 sold on day one. Remaining: 78.
Step 2: 20% of 78 = 15.6 ≈ 16 sold on day two. Remaining: 62.
Final answer: 62 items left.
Breaking the problem into explicit steps tends to reduce compounding arithmetic/logic errors compared to jumping straight to a final answer, and — importantly — gives you something concrete to check for correctness.
An Important, Current Caveat
Some modern reasoning-focused models perform internal step-by-step reasoning automatically, and providers increasingly restrict or discourage exposing a model's full raw internal reasoning trace to end users, for both safety and product-design reasons. Treat "ask the model to show its steps in the final response" as one specific technique with real tradeoffs — not a universal requirement, and not something to force when a provider's model/API is designed to keep detailed internal reasoning hidden. Always work within your specific provider's documented capabilities and guidance rather than assuming this technique applies identically everywhere.
Practical Use Case
Multi-step calculations, logical deduction problems, and tasks with clear intermediate steps (like planning an itinerary within a budget) benefit most from this technique — simple factual lookups or short creative tasks generally don't.
Verifying Reasoning, Not Just the Final Answer
A genuine practical benefit: visible step-by-step output (where a provider supports it) makes it possible to spot exactly where a reasoning chain went wrong, rather than only seeing a final answer with no way to audit how it was reached — useful for both debugging and building user trust in higher-stakes applications.
Common Mistakes
- Applying chain-of-thought prompting to simple, single-step tasks where it adds token cost and latency with no accuracy benefit
- Assuming every model/provider handles "show your reasoning" requests identically — behavior and support for this varies, and some providers deliberately restrict exposing raw internal reasoning
- Trusting a fluent-looking step-by-step chain as automatically correct — verify the actual arithmetic/logic, since a wrong step can still read confidently
Interview Relevance
"When does chain-of-thought prompting help, and when doesn't it?" — multi-step reasoning tasks benefit; simple, single-step factual or creative tasks generally see little benefit and added cost.
Practice Question
Identify whether chain-of-thought prompting would meaningfully help for: (1) "What's the capital of Japan?", (2) "If a train leaves at 3pm going 80km/h and another leaves at 4pm going 100km/h on the same route, when does the second catch up?"