Chain of Thought
Chain of thought (CoT) prompting asks the model to show its reasoning step by step before giving a final answer. This dramatically improves accuracy on math, logic, and multi-step problems.
Prompt
A store sells notebooks for $4 each. If you buy 5 or
more, you get a 20% discount. Tax is 8%.
How much does it cost to buy 7 notebooks?
Think step by step.
The "think step by step" instruction triggers the model to show its reasoning, making the answer verifiable.
Response
Step 1: Calculate the base price.
7 notebooks × $4 = $28.00
Step 2: Apply the bulk discount (20% off for 5+).
$28.00 × 0.20 = $5.60 discount
$28.00 − $5.60 = $22.40
Step 3: Add sales tax (8%).
$22.40 × 0.08 = $1.79
$22.40 + $1.79 = $24.19
Total cost: $24.19
Without CoT, the model might jump to an answer and make errors. Here's a logic puzzle where step-by-step reasoning is essential.
Prompt
There are 3 boxes. One contains only apples, one
contains only oranges, and one contains both. All
labels are wrong. You pick one fruit from the box
labeled "Both". It's an apple.
What's in each box? Reason step by step.
The model lays out the logical deductions one at a time, arriving at the correct answer through reasoning.
Response
Step 1: All labels are wrong, so:
- "Apples" box doesn't have only apples
- "Oranges" box doesn't have only oranges
- "Both" box doesn't have both
Step 2: I drew an apple from "Both". Since "Both" can't
contain both fruits, it must contain only apples.
Step 3: The box labeled "Apples" can't have apples
(wrong label) and can't have both (that's accounted
for), so it has only oranges.
Step 4: The box labeled "Oranges" must have both.
Answer:
- "Both" label → Only Apples
- "Apples" label → Only Oranges
- "Oranges" label → Both
Key takeaway: Adding "think step by step" or "show your reasoning" to any prompt can significantly improve accuracy. This is especially powerful for math, logic, and any problem with multiple steps.
Variations:
- "Think step by step"
- "Let's work through this systematically"
- "Show your reasoning before answering"
- "Break this down into steps"