Show one example
When the output shape is hard to describe in words, stop describing it. Paste one example of exactly what you want and ask for more of that.
Use this when you have described the format twice and the model still gets it subtly wrong.
The pattern
Copy this and replace everything in [SQUARE BRACKETS] with your own specifics.
Here is an example of the output I want, in the exact shape I want it:
[PASTE ONE COMPLETE, CORRECT EXAMPLE — ideally one you wrote by hand.]
Now produce the same thing for each of these inputs:
[INPUT 1]
[INPUT 2]
[INPUT 3]
Match the example's structure, length and tone exactly. If an input is missing something the example has, write "not stated" rather than inventing it.Why each part is there
- The example
- One concrete example carries more format information than a paragraph of description — it pins down structure, length, tone and vocabulary at once, with nothing left to interpret.
- The batched inputs
- You pay the setup cost once and get consistent output across all of them. That consistency is the actual product here.
- The “not stated” rule
- Without it the model pattern-matches your example so hard that it fabricates missing fields to make the shape fit. This one line converts a hallucination into a visible gap.
Before and after
The lazy version
Summarise each of these 12 customer emails in a short, consistent, professional format with the key issue and next step.
What goes wrong: “Short, consistent, professional” means something different on email 1 than on email 12. You get drifting formats — some bulleted, some prose, some with a next step, some without.
The pattern, filled in
Here is an example of the output I want, in the exact shape I want it:
Customer: Meera S. (Premium, 8 months)
Issue: Payment succeeded but the plan did not upgrade.
Evidence: "I got the Rs 2,000 receipt but my account still says Free."
Next step: Check the webhook log for her payment ID, then upgrade manually.
Urgency: High — she has paid and cannot use what she paid for.
Now produce the same thing for each of these emails:
[email 1 text]
[email 2 text]
[email 3 text]
Match the example's structure, length and tone exactly. If an email is missing something the example has, write "not stated" rather than inventing it.What that buys you: Twelve summaries you can scan in one pass, because they all carry the same five lines in the same order — and the gaps show up as gaps instead of plausible fiction.
Now do it on your own work
Find a repetitive formatting job you have done by hand at least three times (revision notes per chapter, per-question feedback, a log entry). Write ONE perfect example by hand, then get five more from it.
Check yourself — every box should be true
- You wrote the example yourself rather than asking the model to generate it.
- Your example includes at least one field that could legitimately be missing from some inputs.
- You included the “not stated” instruction and can show one output where it fired.
- All the outputs carry the same fields in the same order — check by eye.
Then explain it back
Your example did a job your written description could not — what specifically did it manage to communicate that you had failed to put into words?
Write two or three sentences in your own words. If you cannot, you copied a prompt rather than learning a pattern — which is the whole difference this library is trying to make.
Does this depend on which AI tool I use?
This is few-shot prompting, and it works everywhere because it is a property of how these models use context, not a feature someone built. The only real limit is context length: on a tool with a short window, one strong example plus more inputs beats three examples plus fewer.
Why it actually works
Inferring a rule from worked instances instead of being told the rule is exactly what fitting a model does — you have just done it by hand, in text.
Watch a model infer a rule from examples →Prompting well is a skill you can pick up in a week. Understanding what is happening underneath is the 18-month curriculum — and it is what stays useful when the tools change.
FAQ
- How many examples should I give?
- Start with one. Add a second only to cover a case the first does not — for instance, what to do when a field is missing. Three near-identical examples mostly waste context.
- Should the example be real or made up?
- Made up is fine, but write it yourself. An example you hand-wrote encodes your judgement about what matters; an example the model generated just reflects its own default back at you.
Next patterns
The Prompt Patterns Library is a separate, optional track — it does not change the 78-week curriculum or your roadmap. See what the curriculum actually covers →