← Back to the A-Z glossary
AI glossary · P1

Few-shot / Zero-shot

Zero-shot means asking with no example. Few-shot means giving a few examples before your request.

Prompting 4 min read Updated 2026-05-22
— Definition

Few-shot / Zero-shot, in plain words

Zero-shot means asking with no example. Few-shot means giving a few examples before your request.

Present few-shot and zero-shot as a dial for examples, not as two opposing schools of thought.

A concrete example

I want Claude to sort emails. I give it 3 examples (input → category) in the prompt, and it keeps going on the rest.

Why it matters

A few well-chosen examples often replace a long explanation. It's the highest-payoff hack in prompt engineering.

Handy for locking in a stable format, classifying data, or copying a structure.

Don't mix it up with

Prompt engineering: Prompt engineering means phrasing a request with enough context, examples, and constraints to get a useful answer.

Chain of thought: Chain of thought is the step-by-step reasoning a model can work through before it answers.

Common mistakes

  • Giving 50 examples: it clutters the context and quality drops.
  • Picking unrepresentative examples (the model generalizes badly).
  • Forgetting a reasoning model needs fewer examples than a classic model.

Quick checklist

  • First I check whether the word names a concept, a tool, a risk, or a metric.
  • I tie it to a concrete case: I want Claude to sort emails. I give it 3 examples (input → category) in the prompt, and it keeps going on the rest.
  • I keep the main trap in mind: Giving 50 examples: it clutters the context and quality drops.

Quick questions

What is Few-shot / Zero-shot in AI?

Zero-shot means asking with no example. Few-shot means giving a few examples before your request.

Where will I run into Few-shot / Zero-shot?

Handy for locking in a stable format, classifying data, or copying a structure.

Which word should I read next?

Start with Prompt engineering, Chain of thought, Context engineering.

Want to keep going in order?

Head back to the full glossary, search a word, then open only the pages that deserve more than a short definition.

Open the AI glossary