EasyDeepLearn

Few-shot vs zero-shot — when do you use each?

easy

Answer

  • Zero-shot: task description only.
  • Best for well-known task formats or when tokens matter (long few-shot examples eat context).
  • Few-shot: 1-5 example pairs.
  • Best when: (1) output format is non-obvious and needs demonstration; (2) task is unfamiliar; (3) you want deterministic style.
  • Modern instruction-tuned LLMs are strong zero-shot for common tasks, but few-shot still gives 2-10% gains on niche tasks.
  • Rule: start zero-shot, add examples only if quality misses.
Check yourself — multiple choice
  • Zero-shot is always better
  • Zero-shot for common tasks / short prompts; few-shot when output format needs demonstration or on niche tasks (+2-10%)
  • Few-shot always wins
  • Same effectiveness

Zero-shot for familiar tasks; few-shot for format demonstration or niche domains.

#prompting#in-context-learning

Practise LLMs & GenAI

214 interview questions in this topic.

Related questions