Show, don’t only tell
Describing a style in words is hard. Try explaining “friendly but professional, with short sentences and no clichés” and you may still get something that feels off. A sample often communicates more in two lines than a paragraph of adjectives could.
Giving an assistant one or more examples of the output you want is sometimes called example-based prompting, or few-shot prompting. You provide a sample input and output, then ask the tool to produce a new one in the same pattern. It works because language models are good at picking up patterns in text, including tone, length, layout and vocabulary.
What examples are good at
Examples are most helpful for qualities that are easy to recognize and hard to define:
- Tone and voice: how formal, warm or blunt the writing is.
- Structure: a fixed layout such as “headline, one-sentence summary, three bullets.”
- Length and level of detail: how much each item should say.
- Format: how dates, names, labels or categories are written.
- Classification and labeling: if you show a few messages with the labels you use, the assistant can often apply them to new ones.
Compare two requests. First: “Write a product update announcement.” Second: “Write a product update announcement for the feature below, following the style of this earlier one: [sample].” The second narrows the range of possible outputs a great deal.
How to include an example
A clear layout helps the tool tell instruction from sample. For instance:
“Write a short status update for the item below in the same style as the example.
Example input: Finished testing the login page; two bugs left. Example output: Login page: testing done, two bugs remaining. Fixes expected this week.
Now write one for: Payment page design approved; development starts Monday.”
Some tips:
- Label things plainly: “Example input,” “Example output,” “Your task.”
- Use more than one when variety matters. Two or three examples that differ slightly show what stays constant and what may change. A single example risks being copied too literally.
- Choose good examples. The tool will imitate flaws as faithfully as strengths. If your sample has an awkward phrase, expect to see it again.
- Keep them short. Long samples use up space and can drown out your instructions.
- Add a sentence of explanation. “Notice that each update begins with the page name and avoids adjectives.” This makes the pattern explicit.
Avoiding copy-paste results
A common problem is the output that echoes the example too closely: same sentence openings, same phrasing, even same details. To reduce this:
- tell the assistant, “Match the style and structure, but don’t reuse phrases from the example”;
- supply examples with different content but similar style;
- ask for variations and choose the best;
- check for leftover details from the sample, such as names, dates or numbers that don’t belong in the new text.
Negative examples
Occasionally it helps to show what you do not want: “Avoid sentences like this one: ‘We are thrilled to announce an exciting new…’” Describe why it is bad, such as vague or full of hype. Use these sparingly, since mentioning a pattern can sometimes make it more likely to appear. Positive examples are generally the better first move.
Where examples come from
The best samples are your own past work that you were happy with. Be careful, though:
- Remove personal or confidential details before pasting, a habit covered in the guide to giving context without oversharing.
- Don’t paste someone else’s copyrighted writing for imitation without thinking about ownership; the broader issues around content ownership are still debated.
- Keep a small set of reliable examples with your saved templates in a prompt library so you can reuse them.
Examples in classification and data tasks
When labeling items, a few examples can improve consistency, such as sorting support messages into categories. Still, results vary, especially on borderline cases. Test on a batch where you already know the answers, check the mistakes, and adjust your examples. For anything that affects people, such as screening applicants or flagging employees, a model’s pattern-matching may reflect hidden problems in its training data, and this is where human review and awareness of hiring fairness issues matter. Examples can steer style; they do not make a judgment fair or correct.
When examples do not help
- When you have no good example, a clear description is better than a poor sample.
- When facts matter more than style: an example does not make the tool more accurate about information it does not have.
- When the sample is unusual: unusual patterns may not generalize.
Examples shape the form of an answer, not its truth, so the usual checks still apply.
A simple recipe
- State the task in one sentence.
- Add one to three good examples, clearly labeled.
- Say what to copy (style, structure) and what not to copy (content, wording).
- Run it on a new input and compare the result with the sample.
- Adjust the example or the instructions, then save the version that works.
A few well-chosen samples can turn a frustrating series of revisions into one or two quick tries.