Show, don't only describe
Some things are hard to describe and easy to show. Try explaining in words exactly how you like product descriptions written: the length, the rhythm, which details come first, how much enthusiasm is too much. It takes a paragraph and still leaves room for guessing. Paste two descriptions you like and the model picks up most of that in one go.
That is what examples do in a prompt. They give the model a pattern to follow: the format, the length, the tone and, often, which details matter. For a lot of everyday work, a couple of well-chosen examples will do more than any amount of adjectives.
Zero-shot and few-shot
You will see two terms for this in guides and courses.
- Zero-shot. You give only the instruction, with no examples. "Classify this review as positive, negative or mixed."
- Few-shot. You include a few examples of the input and the output you want, then the new input. The model continues the pattern.
Neither is better in general. Zero-shot is quicker and works well when the task is common and the format is obvious. Few-shot pays off when the output has to follow a specific pattern every time, when your categories or style are unusual, or when the zero-shot reply keeps coming back in a slightly wrong shape.
A middle option is one example, sometimes called one-shot. It is often enough to fix the format, but with only one example the model is more likely to copy its surface details, which we come back to below.
Worked example: sorting messages
Say you get customer messages and want each one tagged so the right person sees it.
Sort this customer message into Billing, Delivery or Other: "My parcel says delivered but it isn't here."
That will probably work. But across hundreds of messages you will see the answers drift: sometimes "Delivery", sometimes "Category: Delivery issue", sometimes a sentence explaining the choice. Examples fix that.
Sort each customer message into exactly one category: Billing, Delivery or Other. Answer with the category name only. Message: "I was charged twice this month." -> Billing Message: "The box arrived crushed." -> Delivery Message: "Do you have gift cards?" -> Other Message: "I was charged for delivery but picked it up in store." -> Billing Message: "My parcel says delivered but it isn't here." ->
The examples do three jobs at once. They show the exact answer format, a single word. They show what each category means in practice. And the fourth example settles a tricky case: a message that mentions delivery but is really about a charge. That kind of borderline example is where few-shot earns its keep.
Worked example: matching a writing style
Examples work just as well for writing. Here is a small shop that wants product blurbs that sound like the ones already on its website.
Write a product blurb for our shop in the same style as these two. Example 1: "Hand-thrown in our studio, this mug holds a proper amount of tea. Speckled glaze, comfortable handle, dishwasher safe. Each one is a little different." Example 2: "A linen tea towel that actually dries things. Washed soft, natural color, hangs from a cotton loop. Gets better every wash." Now write one for: a small olive-wood serving board, about 30 cm long, oiled with food-safe oil, hand wash only.
Notice what the model can pick up without being told: one short opening line, then a quick list of facts, then a short closing line. No exclamation marks. Practical details over adjectives. Writing all of that out as rules would take longer and be less precise.
How to pick good examples
- Make them consistent. If one example answers with a word and another with a sentence, expect mixed answers. Format, length and level of detail should match what you want back.
- Cover the edges. Include at least one example near the line between two categories or styles. Easy examples teach little the model did not already know.
- Vary what should vary. If all your examples are about mugs, you may get a mug-flavored blurb for an olive-wood board. Use examples on different subjects so the model learns the style and not the topic.
- Keep the count small. Two to five is plenty for most patterns. More examples make the prompt longer and harder for you to maintain, and add little once the pattern is clear.
- Use real examples when you can. Something you actually wrote or approved carries your real voice better than something invented on the spot.
- Label them clearly. "Example 1", "Example 2", then "Now do this one" makes it obvious where the examples end and the new task starts.
When examples mislead
Examples are powerful, which means they can also push the model in directions you did not intend.
- Copying surface details. The model may reuse phrases, sentence openings or even facts from your examples. If both examples start with "Hand-thrown", do not be surprised if the olive-wood board is somehow "hand-thrown" too. Read the output for borrowed details that are false.
- Copying length. If your examples are three sentences, you will usually get three sentences, even if the new item needs more. Say so if the length should differ.
- Locking in a mistake. If an example contains an error, such as a wrong category, the model will learn the error too. Check your examples as carefully as you would check the output.
- Order effects. With classification, the last example or the most common label can nudge answers its way. If one category keeps winning, shuffle the examples or add a counterexample.
- Too narrow a pattern. If every example is a short, polite message, a long angry message may confuse the pattern. Include at least one example that looks different on the surface but belongs to the same category.
Examples plus instructions
Examples work best alongside a short instruction, not instead of one. The instruction says what the task is and any hard rules, the examples show what good looks like.
Turn each meeting note into a to-do item. Start with a verb, include the owner in brackets, and keep it under 12 words. If no owner is mentioned, write [owner?]. Note: "Sam said he'd look into the printer quote" -> Get printer quote [Sam] Note: "we need to update the website hours before Monday" -> Update website opening hours before Monday [owner?] Note: "Priya will send the slides to the client tomorrow" ->
The instruction covers the rule for a missing owner, which might not be obvious from the examples alone. The examples show the exact format. Together they leave very little to guess.
When not to use examples
Examples are not always the right tool. Skip them, or use them carefully, in these cases.
- When you want variety. If you are brainstorming names, ideas or angles, examples pull every answer toward them. Ask for ideas first, then share examples only if the ideas are in the wrong territory altogether.
- When the task is simple and common. "Translate this into Spanish" or "fix the spelling" does not need examples. Adding them only makes the prompt longer.
- When you cannot share real ones. If your best examples contain customer names, salaries or health details, either remove those details first or write neutral examples that keep the shape without the private content.
- When the examples disagree with your instruction. If the instruction says "under 50 words" and both examples are 90 words, the model has to pick one. It often follows the examples. Make them agree.
Build a small example bank
If you use AI for the same kinds of tasks every week, keep a short document of examples that worked: two or three good emails in your voice, a well-written product blurb, a summary format your team liked, a tagged message for each category. When you start a new task, paste the matching examples in.
This has a second benefit. Choosing examples forces you to decide what good looks like before you ask, which often makes the instruction itself clearer. Teams that share an example bank also get more consistent output across people, because everyone is showing the model the same standard.
Review the bank now and then. Styles change, categories get added and an example that was perfect last year can teach the wrong thing today.
Try it
- Pick a small task you repeat: turning notes into to-dos, writing short replies, tagging messages, or rewriting text in a house style.
- Write the instruction alone and run it on three real inputs. Note where the answers drift in format or tone.
- Add two examples, including one tricky case, and run the same three inputs again.
- Check the new outputs for anything copied from your examples that should not be there.
Keep the version that works as a template. Reusing a good few-shot prompt is one of the easiest ways to get consistent results from AI.
Questions people ask
How many examples should I use?
Start with two. Add more only if the results still drift, and stop when adding one makes no difference.
Can I ask the model to make the examples for me?
You can ask it to draft examples, but check and edit them yourself before using them. Its examples will reflect its own default style, which may be exactly what you were trying to get away from.
Does this work in every AI assistant?
The idea works across chat assistants because they all continue patterns in the text you give them. How strictly each one follows the pattern varies, so test with the tool you actually use.