Intermediate Technique
Chain-of-Thought
Encourage step-by-step reasoning for complex problem solving
What is Chain-of-Thought?
Chain-of-Thought (CoT) prompting encourages the AI to break down complex reasoning into a series of intermediate steps. Instead of jumping to the answer, it shows its work first.
This technique significantly improves performance on math, logic, and multi-step reasoning tasks.
How It Works
Add phrases like these to your prompts:
- • "Think step by step"
- • "Let's work through this logically"
- • "Explain your reasoning"
- • "Show your work"
Examples
Math Problem
Prompt with CoT
If a store sells 3 apples for $2, how much would 15 apples cost? Let's think step by step.
Output
Step 1: Find the cost per apple: $2 ÷ 3 = $0.67 per apple
Step 2: Multiply by 15 apples: $0.67 × 15 = $10.00
Answer: $10.00
Step 2: Multiply by 15 apples: $0.67 × 15 = $10.00
Answer: $10.00
When to Use CoT
Use It For:
- • Math problems
- • Logic puzzles
- • Multi-step calculations
- • Complex decisions
- • Debugging code
Skip It For:
- • Simple questions
- • Creative writing
- • Basic translations
- • Quick lookups
Zero-Shot CoT
Simply adding "Let's think step by step" to any prompt can trigger chain-of-thought reasoning, even without explicit examples. This is called Zero-Shot CoT.
"What is 23 × 47? Let's think step by step."