Skip to main content

Zero-shot and Few-shot Prompting

You need a project status email drafted. You type one line into the AI. Three paragraphs later you have something good enough to send.

You need the same AI to classify fifty support tickets into complaint categories. Same energy. You get a mixed bag — some right, some confused, all different tones.

What changed is not the AI. It is how much context you gave it to understand the pattern you want.

Zero-shot: Just Ask

Zero-shot prompting means giving the AI a direct instruction with no examples. You tell it what to do and trust it will figure it out from its training.

"Summarise this customer review in one sentence."

"Translate this email to French."

"Is this feedback positive, negative, or neutral?"

Each of these is zero-shot. You did not show the AI what good looks like. You just asked. And for straightforward tasks, that works brilliantly.

::: When To Use Zero-shot] The task is clear, well-defined, and matches something the AI has seen millions of times in training. Summarising, translating, classifying by obvious categories — these are zero-shot territory. :::

The advantage is speed. No examples to prepare. No patterns to design. Type, send, done.

Few-shot: Show What You Want

Few-shot prompting means giving the AI two or three input-output examples before asking it to do the real task. The AI does not "learn" from these examples the way a person does. It recognises a pattern in what you are showing it and then completes that pattern with your actual request.

Consider this professional use case. You want customer support tickets classified:

Input: "My order never arrived and customer service won't reply"
Category: Order Fulfillment
Priority: Urgent

Input: "The new dashboard looks great but can we get a dark mode?"
Category: Feature Request
Priority: Low

Input: "I was charged twice for the same subscription this month"
Category: Billing
Priority: Urgent

Input: "App crashes every time I try to upload a photo"
Category: Technical Issue
Priority: [what goes here?]

Notice what happened. The AI now knows the output format, the category list, how to judge priority, and the overall tone — all from three examples.

Few-shot works because it resolves ambiguity. Your real-world tasks are rarely as simple as "positive or negative." There are edge cases, company-specific categories, and style preferences that only examples can communicate.

::: Bad Examples Hurt More Than None] Give the AI inconsistent examples — one with a priority of "High" and another "URGENT" for the same type of issue — and it will pick one, often the wrong one. Example quality matters more than quantity. Clean, consistent examples always beat more messy ones. :::

When To Use Which

SituationBest Approach
Simple, well-known tasksZero-shot
Summarising a documentZero-shot
Quick translationZero-shot
Brainstorming initial ideasZero-shot
Specific output format neededFew-shot
Company-specific categoriesFew-shot
Tone or style mattersFew-shot
Consistent structured dataFew-shot

A good rule of thumb: start with zero-shot. If the output is close but not quite right — wrong format, wrong tone, missing nuance — move to few-shot with two or three clean examples.

Think of zero-shot as your first pass and few-shot as your refinement. You are not teaching the AI something new. You are showing it which of the things it already knows is the right one for this task.

Try This Now

Pick one exercise. It takes two minutes.

  1. Zero-shot test: Paste a news article into ChatGPT or Claude and type: "Summarise in three bullets for a busy manager." You will likely get clean, usable output immediately.

  2. Few-shot test: Gather three real emails from your inbox. Write a short label for each (like "Customer Inquiry," "Internal Update," "Action Required"). Then give the AI those three examples and a fourth unlabeled email. Watch how it categorises the fourth one.

  3. Compare both: Ask the AI to "Rate this customer review out of five stars" — zero-shot. Then repeat with two or three examples of how you personally rate things. Notice the difference in how closely it matches your own judgment.

Good Read