Compare zero-shot, few-shot, and chain-of-thought prompting.
LLM & AILevel: FoundationCore Techniques
Compare zero-shot, few-shot, and chain-of-thought prompting.
Hints
- Identify the stage: pretraining, adaptation, generation or evaluation.
- Name the inputs, constraints and a case where the approach fails.
Answer
| Technique | What It Does | When to Use |
|---|---|---|
| Zero-shot | Task description only | Simple, well-defined tasks; strong base models |
| Few-shot | Include 2–8 worked examples | When zero-shot underperforms; need consistent format |
| CoT (chain-of-thought) | "Think step by step" | Multi-step reasoning, math, logic problems |
| Self-consistency | Sample N CoT paths, majority vote | Critical accuracy; single sample unreliable |
| Zero-shot CoT | Add "Let's think step by step" | Easy CoT without examples |
When to use few-shot: if the output format is non-standard, or the model needs to understand a domain-specific evaluation rubric. If the task is simple, zero-shot is cheaper and often equally good.
Source and licence: JustInCache & contributors — Awesome AI Interviews · Apache-2.0