Last updated

Zero-shot, One-shot, and Few-shot Prompting

Definition: These terms describe how many examples you give the AI. Zero-shot = no example, one-shot = one example, few-shot = several. Examples teach the model the exact pattern you want.

Zero-shot (just ask)

Zero-shot

Classify this review as Positive or Negative: "The shoes fell apart in a week."

Few-shot (show the pattern)

Few-shot

Classify the sentiment.
Review: "Loved it, fast delivery!" -> Positive
Review: "Terrible quality." -> Negative
Review: "The shoes fell apart in a week." ->

By showing two labelled examples first, the model copies the format and labels the new one consistently.

When to use few-shot

  • You need a consistent format across many items
  • The task is unusual or has your own rules
  • Zero-shot gave inconsistent or wrongly formatted answers

💡 Tip: 2 to 4 clear examples are usually enough. Make sure your examples are correct — the model imitates them faithfully, mistakes included.

Ad · responsive