You ask an AI to write a short project update. You tell it to be clear, concise, and professional.
It gives you something technically correct but oddly formal, too long, and nothing like the updates your team usually sends.
Then you add one example of a good update. The next answer is much closer.
Why can a single example make such a large difference?
Because words such as short, friendly, and professional leave room for interpretation. An example makes some of those choices visible. It shows the AI what the finished result should resemble.
This technique is often called few-shot prompting: giving a model one or more examples inside your request before asking it to produce a new answer. The name sounds technical. The basic idea is familiar. If you have ever said, “Do it like this,” you have used the same teaching move.
Instructions Describe; Examples Demonstrate
An instruction tells the AI what you want in abstract terms. An example turns those terms into a pattern.
Suppose you need to convert customer messages into a compact support summary. You begin with instructions alone:
Instructions only
Summarize this support message. Include the problem, urgency, and next action. Keep it concise.
Message: I was charged twice for my plan this morning. I need the extra charge reversed before Friday because rent is due.
The AI might return:
The customer reports being charged twice and wants assistance resolving the issue as soon as possible.
That is a reasonable summary, but it does not clearly separate the three requested fields. It also weakens the deadline and does not state who should act.
Now keep the instructions and add one strong example:
Instructions plus an example
Summarize each support message using exactly this format:
Problem: ...
Urgency: ...
Next action: ...
Example message: My replacement keyboard arrived, but the space bar does not work. I need it for a presentation tomorrow.
Example output:
Problem: Replacement keyboard has a broken space bar.
Urgency: High — customer needs it for a presentation tomorrow.
Next action: Arrange an expedited replacement or offer an immediate alternative.
Now summarize this message:
I was charged twice for my plan this morning. I need the extra charge reversed before Friday because rent is due.
A likely result is:
Problem: Customer was charged twice for the same plan.
Urgency: High — the duplicate charge must be reversed before Friday.
Next action: Verify the duplicate payment and begin the refund process.
The example clarified what “include” and “concise” meant. It demonstrated the labels, order, sentence length, urgency wording, and kind of action expected. The AI no longer had to guess as much.
The exact wording may still vary from one run or model to another. The useful improvement is not that the example forces one guaranteed answer. It narrows the range of plausible answers toward the pattern you showed.
What an Example Communicates
A well-chosen example can carry several instructions at once.
- Structure: headings, fields, bullets, ordering, or JSON keys.
- Tone: warm, direct, formal, playful, cautious, or technical.
- Level of detail: one sentence, a short paragraph, or a full explanation.
- Labels: the exact categories or terminology to use.
- Boundaries: what belongs in the answer and what should be left out.
- Decision rules: how to handle a particular type of input or edge case.
That density is why an example can outperform a pile of adjectives. “Write a brief, approachable, useful reply” still asks the model to decide what all three words mean here. A sample reply shows those choices together.
The AI Is Continuing a Pattern
Language models generate answers by predicting likely next pieces of text from the material in their current context. Your instructions, examples, and question all become part of that context.
When the prompt contains an input followed by a good output, the model can infer a local pattern: this kind of input should be transformed into that kind of output. A second input invites it to continue the pattern.
Researchers often call the broader behavior in-context learning. The model adjusts its response based on patterns present in the prompt, without changing its underlying trained parameters.
That last distinction matters. Giving the AI an example usually does not permanently teach or retrain it. The example guides the current request or conversation. Whether it remains available later depends on the product's conversation history, memory features, and privacy settings—not on few-shot prompting itself.
Examples Reduce Ambiguity
Many disappointing AI answers begin with a request that supports several reasonable interpretations.
Consider “classify this feedback.” What labels should the model use? Can one message receive two labels? Is a feature request that mentions a bug mainly a bug report or a feature request? Should uncertain cases be guessed or marked for review?
You can answer every question with written rules. Sometimes you should, especially when the result has consequences. Examples help because they show how those rules behave in concrete cases.
For instance:
Feedback: “Dark mode is nice, but it resets every time I reopen the app.”
Label: Bug
Reason: The user mentions a feature positively but reports that it does not retain its setting.
This example reveals a boundary between casual praise, a feature request, and a bug. That boundary may have been difficult to express with one short instruction.
Bad Examples Work Too—In the Wrong Direction
The model follows the pattern you actually provide, not the one you intended to provide.
If your example is verbose, the answer may become verbose. If its labels conflict with your written rules, the model may copy the conflict. If three examples use different formats, you have demonstrated inconsistency.
An example can also smuggle in accidental requirements. A sample email that always begins “Dear valued customer” may cause the AI to repeat that phrase even if you only meant to demonstrate paragraph length. A sample containing a real customer name or account number may expose information that did not need to be shared.
Treat examples as part of the specification. Inspect every feature of them, not only the feature you had in mind.
How to Choose a Useful Example
Use a representative case
Choose an input that looks like the work the AI will normally receive. A perfect, unusually simple case may teach little about the messier requests you actually need handled.
Make the output genuinely good
Do not give the model a rough sample and expect it to infer an improved standard. Correct the structure, facts, tone, and level of detail first.
Preserve the exact format you want
If downstream work expects three fields in a fixed order, show those three fields in that order. If you want valid JSON, provide valid JSON. Formatting in the example is itself an instruction.
Add an edge case when it matters
One normal example teaches the central pattern. A second example can show an important exception: missing information, multiple valid labels, an empty input, or a case that should be escalated to a person.
Do not add examples merely to make the prompt look sophisticated. Each one should resolve a real ambiguity.
Remove private or sensitive data
Use invented or anonymized names, addresses, account numbers, health details, and internal information. The AI usually needs the shape of the example, not a real person's data.
Keep instructions too
An example should not be forced to carry every rule. State the task and important constraints plainly, then use examples to demonstrate them. This combination is usually clearer than instructions or examples alone.
Examples Are Guidance, Not Guarantees
A strong example can greatly improve consistency, but it does not turn a language model into a deterministic template engine.
The AI can still misunderstand the pattern, omit a field, invent a fact, or apply the example badly to a very different case. More examples are not automatically better either. They consume context, can contradict one another, and may cause the model to copy details too literally.
For low-stakes writing, a quick review may be enough. For financial, medical, legal, safety, or automated decisions, use stronger safeguards: validate the output, test varied cases, restrict allowed values, and keep human review where errors matter.
A Simple Recipe
When an AI's answer is broadly correct but not shaped the way you want, try this:
- State the task in one clear sentence.
- Name the important constraints.
- Show one representative input and an excellent output.
- Add one edge case only if it teaches an important boundary.
- Provide the new input and ask for the same pattern.
- Check the result instead of assuming the pattern was followed.
The reason examples help is not mysterious. They replace part of an abstract description with visible evidence of what “good” means.
Instructions point toward the destination. A strong example shows the AI what the destination looks like.