Few-Shot CoT with Reasoning Examples
What you'll learn: How to teach an LLM to reason properly by showing it complete examples with intermediate thinking steps, not just question-answer pairs.
The Core Idea
In Zero-Shot CoT, you simply added "Let's think step by step" and hoped the model would reason well. Few-Shot CoT goes further: you provide actual examples of good reasoning before asking your real question. Each example shows the full thought process—the intermediate steps—not just the final answer.
Think of it like teaching a student math. You don't just show them:
- "Problem: 23 × 14" → "Answer: 322"
Instead, you demonstrate:
- "Problem: 23 × 14"
- "Let me break this down: 23 × 10 = 230, then 23 × 4 = 92, finally 230 + 92 = 322"
- "Answer: 322"
The model learns the reasoning pattern from your examples.
Building Few-Shot CoT Prompts
Structure your prompt with 2-3 example problems, each showing:
- The question
- Explicit reasoning steps (the "chain of thought")
- The final answer
Then present your actual question in the same format, and the model will naturally follow the demonstrated reasoning style.
This works because the model pattern-matches your examples and applies the same step-by-step approach to new problems. It's especially powerful for math, logic puzzles, multi-step analysis, and any task requiring intermediate reasoning.
Key Takeaway: Few-Shot CoT provides complete reasoning blueprints through examples, teaching the model how to think through problems, not just what answers look like. This dramatically improves accuracy on complex reasoning tasks.