Key insight
There are two ways to get a model to do a task: describe it in words, or show a few finished examples. Showing almost always wins, because a couple of concrete examples pin down the tone, format, and edge cases that words fumble — and a model is a pattern machine, so examples are the pattern. Zero-shot means no examples (fine for common tasks); few-shot means a handful (the workhorse). Pick examples that are varied, correct, and consistent — because the model copies them, mistakes included.
The techniques with the best effort-to-payoff ratio in all of prompting involve examples, and they mirror exactly how we teach humans. This guide starts from nothing and shows you when to just ask, when to show, and how to choose examples that teach the right lesson.
1 · Telling vs. showing
There are two ways to get a model to do a task: describe it in words, or show it a few finished examples done right. Describing is the default, but showing is almost always clearer — a couple of concrete examples pin down a dozen little details words struggle with: the exact tone, the format, the level of detail, the edge cases. It's the difference between telling a new cook “make it look nice” and handing them a photo of the finished plate. This topic is about using examples deliberately, and it comes in named levels by how many you give.
2 · Zero-shot: no examples
Zero-shot means zero examples — you describe the task and ask. “Classify this review as positive or negative.” “Translate this into French.” For tasks the model has seen countless times in training, zero-shot works great — you don't need to demonstrate translation because the model already understands it deeply. So always try zero-shot first; it's the least effort. Zero-shot struggles when your task is unusual, has a specific format you care about, or where “good” is defined by your particular taste rather than a universal standard. That's exactly when examples start to pay off.
3 · Few-shot: show a handful
Few-shot is the workhorse. You give a handful of examples — each an input paired with the exact output you'd want — then your real input. To sort reviews into positive, negative, or neutral, you show: “great value” → positive, “broke in a day” → negative, “okay, nothing special” → neutral. Then a new review, and the model follows the pattern. Notice how much those three examples conveyed that words fumble: that you want one-word labels, that neutral is even an option, where you draw the lines. Few-shot is astonishingly effective for “do it like these” tasks, and it's often the fastest fix when zero-shot gives the wrong shape.
4 · Why examples beat instructions
Why do examples work so well? A language model is at its core a pattern-completion machine — extraordinarily good at seeing a pattern and continuing it. Provide examples and you hand it the exact pattern to continue, playing to its greatest strength. And a single example silently communicates the tone, length, format, vocabulary, and edge-case handling all at once. Express all that in instructions and you get a long, brittle paragraph the model may still misread. Show two clean examples and it clicks. This is why examples are the go-to fix when a model “almost” gets it: instead of writing more rules, show one more example of the thing done right.
5 · Pick examples that teach
Examples are powerful, so bad examples are powerfully bad — the model copies whatever you show, flaws included. Choose with care. Cover the variety of cases you expect, not just easy ones. Deliberately include a tricky case, because that's where your judgment matters most. Make every example correct and formatted exactly as you want the output — one sloppy example teaches sloppiness. And keep them consistent; contradicting examples confuse the model about the real rule. Think of yourself as a teacher choosing the worked problems that best convey the method — that's precisely the skill.
6 · How many? Start small
Fewer than people expect. Often two to five is plenty — enough to establish the pattern without drowning the prompt. The method: start with zero, add examples only if the answer isn't right, add one or two, check, and stop the moment it works. More isn't automatically better — each example costs space on the model's limited context and adds to what you pay per request, and past a point they stop helping. There's also a trap: if all your examples look alike, the model may latch onto a shallow surface pattern instead of the real task. Favour a few diverse, high-quality examples over many similar ones.
7 · Examples can show the reasoning
A powerful extension: your examples don't have to show only the final answer — they can show the reasoning that leads to it. For a word problem, instead of jumping to “thirteen,” show an example that works it out: start with twelve, subtract four, that's eight, add five, that's thirteen. When the model sees examples that reason step by step, it tends to reason step by step on your real question too — dramatically improving accuracy on anything involving logic. This is the bridge to chain-of-thought prompting, the next topic. For now, hold the insight: an example can teach not just what a good answer looks like, but how to arrive at one.
8 · A simple test you can run this week
1. Take a task where the model keeps missing your style.
2. Add two or three examples of the input and the ideal output.
3. Include one tricky case; keep every example correct.
4. Run it — watch the model copy your pattern.
The lesson: showing beats telling — a few good examples teach what words cannot.
9 · Glossary — every term, spelled out
- Zero-shot
- Prompting with no examples — just describe the task and ask. Fine for common, well-understood tasks.
- Few-shot
- Prompting with a handful of input–output examples before your real input, so the model follows the pattern.
- Example (shot)
- A demonstration of an input and the exact output you'd want; each is a “shot.”
- Pattern completion
- A model's core strength — seeing a pattern and continuing it; examples are the pattern.
- Diversity of examples
- Covering the range of cases so the model learns the real task, not a shallow surface pattern.
- Worked example
- An example that shows the reasoning, not just the answer — the bridge to chain-of-thought.
Showing beats telling: a few examples pin down tone, format, and edge cases words fumble.
Zero-shot (no examples) is fine for common tasks; few-shot (a handful) is the workhorse.
Examples work because a model is a pattern machine — but it copies mistakes too, so keep them correct, varied, and consistent.
Start with two to five and stop when it works; and let examples show reasoning when logic is involved.
References
- Anthropic, Use examples (multishot prompting) — why and how to show examples. docs.anthropic.com
- Brown et al., Language Models are Few-Shot Learners — the paper that named the technique. arxiv.org
- This guide’s Prompt Engineering Basics, Explained From Zero — specificity, which examples reinforce.
- This guide’s Chain-of-Thought & Reasoning, Explained From Zero — showing the reasoning, not just the answer.