Few-shot prompting means you show the AI one or more worked examples before you ask it to do the task. Zero-shot means you ask with instructions only and no example at all. Both are just ways of phrasing a request, and you already know how to use them once you see the two side by side.
The choice matters because the same model can hand back a clean answer or a messy one depending on whether it has a pattern to copy. This guide gives you plain definitions, copy-paste examples of each, and a simple rule for picking the right one.
Key Takeaways
- Zero-shot prompting asks with instructions only; few-shot prompting shows one or more examples first so the model copies the pattern.
- In a 2024 study, adding one example per class raised classification accuracy from 25.0% to 48.2% (arXiv, 2024).
- Reach for zero-shot first. Add one good example only when the format or tone starts to drift.
- One or two examples usually fix output. You rarely need more than three.

What is zero-shot prompting?
Zero-shot prompting is asking the model to do a task with no example shown. You describe what you want in words, and the model relies on its training to figure out the rest. The "zero" means zero examples in your prompt, not zero instructions.
It's the way most people already use AI. You type a request, you get an answer. For common tasks like summarizing, rewriting, or answering a general question, this is usually all you need.
Classify this customer message as Billing, Bug, or Feature request.
Message: """My invoice shows two charges for the same month."""That prompt has clear instructions and a clear goal, but it never shows the model what a finished answer looks like. For an easy task that's fine. For a fussy one, it leaves room for the model to guess at the format.
What is few-shot prompting?
Few-shot prompting means you include one or more examples of the task done correctly, then ask the model to do the next one the same way. Seeing the pattern is far more reliable than reading a description of it, so the model locks onto your format instead of inventing its own.
One example is often called one-shot. Two or more is few-shot. The idea is identical: demonstrate, then ask.
Classify each message as Billing, Bug, or Feature request. Match these examples.
Message: "I was charged twice this month." -> Billing
Message: "The export button does nothing when I click it." -> Bug
Message: "Can you add dark mode?" -> Feature request
Now classify this one:
Message: """My invoice shows two charges for the same month."""Same task, same model. The only change is the three labeled examples. Now the model knows the exact labels to use, the arrow format you want, and how to handle an edge case. It has a pattern to copy instead of a description to interpret.
This is also why few-shot helps with tone, not just structure. If you want replies in your brand voice, one example of a real reply teaches more than three sentences describing the voice.
Zero-shot vs few-shot: how do they compare?
The two approaches trade speed for control. Zero-shot is faster to type and works for the everyday stuff. Few-shot costs you a few extra lines but buys you predictability when the answer has to land in a specific shape.
| Zero-shot | Few-shot | |
|---|---|---|
| Best for | Common, open-ended tasks | Strict formats, specific tone, edge cases |
| Example count | 0 | 1 to 3 (sometimes more) |
| When to use | First attempt, simple requests | When zero-shot output drifts or breaks format |
The research backs up the gap. In a 2024 study, adding just one example per class raised a model's classification accuracy from 25.0% to 48.2% and cut invalid answers from 56.2% to 13.4% (arXiv, Bhowmik et al., 2024). That second number is the quiet win: fewer answers that come back in the wrong shape and need a do-over.
The boost isn't limited to small tasks. On the TriviaQA benchmark in 2020, GPT-3 scored 64.3% zero-shot and rose to 71.2% with a few examples (arXiv, Brown et al., 2020). Same model, same questions, a handful of examples added. The pattern shows up across very different jobs.
Save your few-shot prompts once
Promptly keeps your best example-driven prompts one click away across every AI.
When should you use zero-shot vs few-shot?
The practical rule is short: reach for zero-shot first, and add one good example when the format or tone drifts. Most of the time, plain instructions are enough, and writing examples for every request would slow you down for no payoff.
Start zero-shot when:
- The task is common, like summarizing, drafting, or answering a question.
- You don't care about an exact output shape.
- You're exploring and want to see what the model does on its own.
Switch to few-shot when:
- The output keeps coming back in the wrong format.
- You need a specific tone or voice the model isn't matching.
- The task has tricky edge cases a single example can clarify.
- You're extracting data and need every field in the same structure.
Think of the example as a fix you apply, not a habit you keep. When a zero-shot answer misses, don't retype the same request louder. Paste one clean example of the result you wanted and the model usually snaps to it. That single move corrects more bad outputs than any amount of rephrasing, a pattern covered in our roundup of common AI prompting mistakes.
How many examples should you include?
Usually one to three. Counterintuitively, more examples don't keep helping in a straight line, and a single strong, representative example often does most of the work.
Start with one. If the model still gets confused on an edge case, add a second example that covers that case. A third helps when your categories are easy to mix up, like telling a bug report apart from a feature request. Past three, you're typically spending tokens for tiny gains, and very long prompts can even distract the model from the actual task.
Quality beats quantity. One clean, correct, on-format example teaches more than five sloppy ones. Make sure each example shows exactly the output you want, because the model will copy your mistakes just as faithfully as your good habits. For more on shaping requests cleanly, see our guide to writing better AI prompts.
If you find yourself needing the model to reason step by step rather than just match a format, that's a different tool. Chain-of-thought prompting asks the model to show its work, and it pairs well with a worked example.
Why save the prompts that work?
Once you've built a few-shot prompt that reliably produces what you need, the examples inside it are the valuable part. They took thought to write, and they're easy to lose in a wall of chat history. Retyping them every time defeats the point.
That's the case for keeping your prompts in one place. A prompt with two good examples is a small tool you built once and can run again across ChatGPT, Claude, Gemini, or Perplexity, since they all respond to the same demonstrate-then-ask pattern. Promptly stores those proven prompts so the example-driven ones you refine stay one click away instead of disappearing after the session ends. Start with one task you repeat often, get the examples right, and save it.
Frequently asked questions
What is the difference between zero-shot and few-shot prompting?
Zero-shot prompting asks the model to do a task with instructions only and no example. Few-shot prompting includes one or more worked examples first, then asks for the next one in the same style. Few-shot helps when output keeps missing the right format or tone, because the model copies a shown pattern more reliably than it follows a written description.
Is one-shot the same as few-shot prompting?
One-shot is a special case of few-shot that uses exactly one example. Few-shot is the umbrella term for any prompt with at least one example, whether that's one, two, or several. People often say few-shot loosely even when they mean a single example, so the terms overlap in everyday use.
Does few-shot prompting actually improve accuracy?
Yes, measurably. In a 2024 study, adding one example per class raised classification accuracy from 25.0% to 48.2% and cut invalid answers from 56.2% to 13.4%. On the TriviaQA benchmark in 2020, GPT-3 rose from 64.3% zero-shot to 71.2% few-shot. Both used the same model, with only examples added.
How many examples should a few-shot prompt have?
Usually one to three. Start with one strong, correct example. Add a second if an edge case confuses the model, and a third only if your categories are easy to mix up. Beyond three you spend tokens for small gains, and overly long prompts can distract the model. One clean example beats several sloppy ones.
When should I not bother with examples?
Skip examples for common, open-ended tasks like summarizing, drafting, or answering a general question, where plain instructions already work. Reach for zero-shot first and only add an example when the output drifts off-format or misses the tone you wanted. Writing examples for every request slows you down with no real payoff.
Sources
- arXiv (Bhowmik et al.). Improving In-Context Learning with Reasoning Distillation (2024). https://arxiv.org/html/2412.13859v1, retrieved 2026-06-16.
- arXiv (Brown et al., OpenAI). Language Models are Few-Shot Learners (2020). https://arxiv.org/abs/2005.14165, retrieved 2026-06-16.
- Hero image: Planet Volumes via Unsplash.