Zero-shot vs few-shot prompting: what examples do to an answer

The fastest way to improve an AI answer is often to show it an example or two. Here is the difference between asking cold and asking with examples.

Published 2026-08-28 · by M.R. Sterling

Two terms come up constantly once you start prompting seriously: zero-shot and few-shot. They sound technical and they are not. They describe the difference between asking a model to do something cold, and asking it after showing it a couple of examples of what you want. Knowing when to switch from one to the other is one of the highest-return prompting habits there is.

Zero-shot: asking cold

A zero-shot prompt is just an instruction with no examples. "Summarise this in three bullet points." "Classify this message as urgent or not." The model has to work out the exact shape of what you want from the instruction alone.

For clear, common tasks this is often enough, and it is the right place to start because it is the least effort. If a plain instruction gets you what you need, you are done. Do not add machinery you do not need.

Few-shot: showing before asking

A few-shot prompt includes a small number of worked examples before the real request. You show the model two or three inputs paired with the exact outputs you would have wanted, and then give it the real input. The examples do the explaining that words struggle with.

This is the move to make when the task is fussy about format, tone or edge cases, and a description keeps falling short. Instead of writing a paragraph trying to pin down the style you want, you show two examples in that style and let the pattern speak.

Why examples work so well

A model is, at heart, a very good pattern continuer. When you show it a consistent pattern, continuing that pattern is exactly what it is built to do. An example carries information that is genuinely hard to put into instructions: the precise level of detail, how to handle the awkward case, where to stop. One good example often replaces a whole paragraph of rules.

If you find yourself writing longer and longer instructions to nail down a format, stop writing rules and show an example instead. It is usually shorter and works better.

Getting few-shot right

A few things make examples steer well rather than mislead.

  • Keep them consistent. If your examples disagree about format, the model has no single pattern to follow.
  • Cover the tricky case. If there is an edge case you care about, make one of your examples that edge case, handled the way you want.
  • Match the real task. Examples that look different from the real input teach the wrong pattern.
  • Do not overdo it. Two or three sharp examples usually beat ten sloppy ones.

Start cheap, escalate when needed

The practical workflow is a ladder. Try zero-shot first. If the answer is not shaped right, add one example. Still not right, add another, and make sure one covers the case that keeps going wrong. You climb only as far as you need to, which keeps your prompts short and your intent clear.

Where to go next

Examples are the single most reliable lever for steering an answer, and most people discover them far later than they should. Examples That Steer is built around this exact skill, and Your First Real Prompts covers the groundwork of writing a clear instruction in the first place, which is what few-shot builds on.

Books that go deeper

More articles

One email when a new book lands

No schedule, no filler. Just the new titles and the odd free chapter.