How to Use Examples in Claude Prompts: The Technique That Doubles Output Quality
Progress1 of 4
1
Why examples work
2
Zero, one and few-shot
3
How to write good examples
4
Quiz: test your knowledge
Section 01
Words tell Claude what to do. Examples show Claude exactly how.
Most professionals describe what they want in a prompt. They explain the task, the audience, the tone. And Claude tries its best to interpret those instructions — but interpretation leaves room for error. The output is close, but not quite right. Another round of back-and-forth follows.
There is a faster path. When you include an example of the output you want, Claude stops interpreting and starts replicating the pattern. The gap between what you asked for and what you get closes dramatically.
Key insight: An example is worth a hundred words of instruction. It shows Claude the exact format, tone, length and style you want — more precisely than any description can.
Eliminates interpretation
Claude matches your example directly instead of guessing what your instructions mean.
Fewer revision rounds
First-draft quality improves significantly when Claude has a concrete target to aim at.
Reusable pattern
A prompt with a good example can be reused repeatedly to get consistent outputs every time.
Without an example
Summarise this article for our newsletter.
What Claude produces
A general summary in Claude's default style — probably accurate, but not matching your newsletter's voice, length or structure. Needs editing.
With an example
Summarise this article for our newsletter. Here is an example of the style I want:
"AI regulation in the EU moved forward this week as the European Parliament approved new guidelines. Here is what it means for UK businesses: [2 bullet points]. Read the full story here."
Now summarise the attached article in the same style.
What Claude produces
A summary that matches your newsletter format exactly — correct length, correct structure, correct tone. Ready to publish.
In prompting, the number of examples you provide has a name. Each approach serves a different purpose — and knowing which to use is half the skill.
Key insight: Start with one example. In most cases, a single well-chosen example outperforms a long description and is faster to write than two or three examples. Add more only if the first example is not enough.
No examples
Zero-shot
No examples given. Claude relies on instructions alone. Works for simple, standard tasks.
Use when: the task is straightforward and format does not matter much.
One example
One-shot
One example given. Claude matches the pattern. The sweet spot for most professional tasks.
Use when: you need a specific format, tone or structure consistently.
2–5 examples
Few-shot
Multiple examples given. Claude learns the pattern from variation. Best for complex or nuanced outputs.
Use when: one example is not capturing the full range of variation you need.
One-shot prompt template — copy and adapt
Here is an example of the output I want:
[Paste your example here]
Now do the same for the following:
[Paste your input here]
A bad example is worse than no example — it sends Claude in the wrong direction with confidence. Here is how to write examples that actually improve your outputs.
Key insight: Your example does not have to be perfect — it has to be representative. Claude is extracting the pattern, not copying the content. A real output from a previous session is almost always better than an example you write from scratch.
1
Use a real output you liked
The best examples are outputs Claude already produced that you were happy with. Copy them directly. Claude will extract the pattern and replicate it on new inputs.
2
Match the length you want
Claude calibrates output length against your example. If your example is 80 words, Claude targets 80 words. If you want shorter or longer, adjust your example accordingly.
3
Show the structure, not just the content
What matters is the format — bullet points vs paragraphs, headers vs flowing text, formal vs casual tone. The specific content of your example is secondary to its structure.
4
Label your example clearly
Tell Claude explicitly what the example is: "Here is an example of the output I want:" followed by the example, then "Now do the same for:" followed by your actual input. Clear labels prevent Claude from treating the example as the input.
When not to use examples: For open-ended creative tasks where you want Claude to surprise you, or for analysis tasks where you want Claude's own structure and logic — adding an example can constrain the output in unhelpful ways. Use examples when consistency matters, not when originality does.