Course Content
Chain-of-Thought Prompting
Make models reason step-by-step for better accuracy on complex tasks
What is Chain-of-Thought?
Chain-of-thought (CoT) prompting instructs a model to reason step by step before giving its final answer. Research shows this dramatically improves accuracy on math, logic, and multi-step tasks.
Basic CoT
Add “Think step by step” or “Let’s reason through this” to your prompt:
A train leaves City A at 9am at 60mph. Another train leaves City B (200 miles away) at 10am at 80mph, heading toward City A. At what time do they meet?
Think step by step.Model output:
Step 1: Train 1 travels for 1 hour before Train 2 starts, covering 60 miles.
Step 2: Remaining distance = 200 - 60 = 140 miles.
Step 3: Combined speed = 60 + 80 = 140 mph.
Step 4: Time to meet = 140 / 140 = 1 hour after Train 2 departs = 11am.
Answer: 11:00 AMStructured CoT
For complex tasks, provide the reasoning structure explicitly:
Evaluate this product decision. Structure your analysis as:
1. Problem being solved
2. Key assumptions
3. Risks
4. Recommendation with rationale
Decision: [DESCRIPTION]When CoT Helps Most
- Multi-step math and logic
- Complex comparisons and trade-off analysis
- Debugging and root cause analysis
- Any task where intermediate reasoning affects the final answer
When CoT Doesn’t Help
- Simple retrieval tasks (“What is the capital of France?”)
- Single-step classification
- Tasks where length matters more than accuracy
