Some things are easier to show than describe. If you asked an AI assistant for a reply that sounds “friendly but not gushing” and got something else, a short example can close the gap faster than another paragraph of instructions.
The short answer: when a description is not producing the result you want, paste in one short example of the output you are after, label it clearly as an example, and add a sentence saying what it should teach (the structure, the tone, how to sort things) and what to ignore (the topic, the length, the specific facts). Then give the real task. Keep private or borrowed material out of your examples, and do not assume they always help: for simple requests and some reasoning-focused models, try without them first. Examples are one part of the full beginner method for prompting AI.
TL;DR
- An example shows the assistant the shape, tone or sorting rule you want; it changes only the current response, not the model itself.
- Label each example, say what to copy and what to ignore, then put your real request last.
- Use several varied examples when one gets copied too closely, and avoid stacking them all toward one answer.
- Check examples for mistakes, because a model can reproduce an error it sees in one.
- Use invented or anonymized examples, and for simple tasks or some reasoning models, try without examples first.
What an Example Does in a Prompt
An example in a prompt is a sample of the result you want, placed in your request so the assistant can follow its pattern. Researchers and providers call this few-shot prompting: giving the model a few demonstrations of a task inside the prompt. A request with one example is called one-shot, and a request with none is zero-shot, terms the 2020 paper that introduced GPT-3 used to define these settings [1]. Examples guide only the current response and do not change the model itself [1, 2]. In a new chat, you will usually need to paste them again. The exception is a feature built to carry material across chats, such as a Claude project, whose instructions and uploaded files apply to the chats inside it, or Gemini’s memory of past chats and saved instructions, which are not available to every account [3, 4].
As of November 2026, Anthropic’s documentation calls examples one of the most reliable ways to steer the format, tone and structure of Claude’s output [5]. Google’s Gemini guide says examples are often used to control formatting, phrasing, scope and general patterning [6]. OpenAI’s developer guide describes the model picking up a pattern from a handful of input-and-output pairs [7]. These are each company’s advice for its own models, mostly written for developers, but they agree on what examples are for. As the GPT-3 authors put it, a task’s content or format can be hard to communicate without examples [1].
When an Example Helps More Than a Description
An example earns its place when what you want is easier to recognize than to put into words:
| What you want to convey | What to show |
|---|---|
| Structure | One finished item in the exact layout, with headings, order and length |
| Tone | Two or three sentences written the way you want the whole reply to sound |
| Categories | A few items already sorted, with the label you gave each |
| Edge cases | The awkward item and how it should be handled |
| Quality bar | A sample that meets your standard, with a note on why it works |
Take categories: definitions of “billing,” “delivery” and “product” leave room for interpretation, while three sorted customer comments show where the lines fall. Microsoft’s documentation shows a sorting task in which a few labeled examples were enough for the model to infer the kind of label wanted [2]. Anthropic’s advice to include examples that cover edge cases points the same way [5].
An example is not background: facts about your situation and audience are context, covered in what context to give AI. An example shows the form of the answer. And a tone sample suits a single reply; adapting an assistant to your own writing voice is a larger job, covered in making AI responses sound more like you.
How to Add an Example in Four Steps
Without some framing, the assistant has to guess which features of an example matter.
- Label it and set it apart. Introduce it with a line such as Here is an example:, and mark where it starts and ends. Anthropic recommends wrapping examples so the model can distinguish them from instructions [5].
- Say what to copy and what to ignore. One sentence does it: Follow the structure and tone; the topic and figures are placeholders.
- Make sure the example matches your instructions. If you ask for three bullet points and your example has five, you have sent mixed signals. In its guidance for reasoning models, OpenAI warns that discrepancies between examples and instructions may produce poor results [8].
- Put your real task last. After the example, state clearly what you want now, with your own content.
Illustrative example (adapt to your task):
I need short weekly updates for my team. Here is an example of the format I want:
Example: “Done: finished the vendor shortlist. Next: schedule two demos. Blocked: waiting on budget approval.”
Copy the three labels and the one-line-per-label style. Ignore the content; it is invented. Now write this week’s update from these notes: [your notes].
If the first answer is close but copies something you did not intend, adjust with a targeted follow-up rather than starting over.
How Many Examples, and in What Order
One example often teaches more than you meant. If your only sample is short, about a late delivery and opens with an apology, the assistant may treat all three as rules. Several examples that vary the topic and length while keeping the same structure show which features are fixed and which are not. OpenAI and Google both advise showing a diverse range of examples [7, 6].
There is no single right number. Anthropic suggests three to five examples for best results with its models, while Google says the right number may take experimenting and warns that with too many examples the model may start to copy their pattern too closely [5, 6]. For everyday chat, one to three short examples is a reasonable start.
Balance and order matter too. A study of GPT-3 published in 2021 found that the choice of examples, their order and the prompt format could move accuracy from near chance to near the best results then reported [9]. The same researchers found models leaned toward answers that appeared most often in the examples, or that came last [9]. Separately, a study from the same year found that reordering the same examples alone could make the difference between strong and random-guess performance [10].
These studies tested older models on sorting and benchmark tasks, so treat them as lessons, not predictions. The practical habits:
- If your examples carry labels or categories, include each one rather than three of one kind.
- Do not always end with the same kind of example, since the last one can pull hardest.
- Keep all examples in the same format, which Google also recommends [6].
Layout details matter as well: Sclar and colleagues found that small, meaning-preserving formatting changes in few-shot prompts shifted results for several open-weight models, and more examples did not remove the effect [11].
When Examples Backfire: Copied Errors and Surface Imitation
Confidence: Research Finding
Examples can backfire in two ways: the model copies a mistake, or copies features you did not mean to teach.
On mistakes, the research is mixed in an instructive way. A 2022 study of 12 models found that randomly replacing the answers in classification examples barely hurt performance; the format of the examples, the range of possible answers and the kind of input mattered more [12]. A follow-up study the same year found that correct answers can matter, depending on the setup and the size of the model [13]. Researchers at Google then found in 2023 that large models, unlike small ones, could follow deliberately wrong answers in examples, even when that contradicted what the model would otherwise predict [14]. In the same work, instruction-tuned models (trained to follow instructions) were more reluctant to follow those wrong answers [14].
So errors are not harmless. Models pick up an example’s format strongly, and in these tests larger models could follow labels that were deliberately wrong [14]. None of the studies tested everyday mistakes, but it is reasonable to expect a typo, outdated figure or miscategorized item in an example to resurface in the answer, so proofread examples as carefully as the final output.
Surface imitation is the more everyday problem: the answer reuses your example’s topic, length or exact phrases. The fixes:
- Add a second example that differs in topic and length.
- State the limit directly: Do not reuse wording from the example.
- Replace a real-looking example with a deliberately generic one.
An example shapes the form of an answer. It does nothing to make the facts in that answer true, so important claims still need checking against reliable sources.
Keep Private and Protected Material Out of Examples
The easiest example to grab is often a real one, such as a client email, a colleague’s report or a published article you admire. Those can carry names, account details, confidential information or someone else’s creative work into a prompt. Removing a name does not necessarily make material safe to share, and what to leave out of prompts for privacy explains what to consider before pasting anything sensitive.
Safer options usually teach the pattern just as well:
- Invent or placeholder it. Write a short made-up example, or replace names and figures with stand-ins such as [Client].
- Ask the assistant to draft examples, then correct them. Anthropic’s documentation notes that Claude can be asked to generate additional examples from an initial set [5]. Check what comes back.
- Describe others’ work instead of pasting it. Name the qualities you admire, such as short paragraphs or a direct opening.
This is editorial guidance, not legal advice; for regulated or confidential material, your organization’s rules come first.
When to Leave Examples Out
Confidence: Expert Debate
Providers differ on how often to use examples. Google’s Gemini guide recommends always including few-shot examples and says prompts without them are likely to be less effective [6]. Microsoft’s everyday Copilot help is less demanding about prompts in general: it says only a clear goal is required, though you will often need more to get the result you want [15].
Reasoning models, which work through a problem in steps before answering, are where the advice splits most. OpenAI advises trying its reasoning models without examples first and adding a few only for more complex output requirements [8]. DeepSeek reported in its January 2025 technical report that few-shot prompting consistently degraded the performance of its R1 reasoning model, and recommended describing the problem and output format directly instead [16]. Anthropic, by contrast, says worked examples shape how Claude approaches similar problems when it reasons before answering [5]. Each describes that company’s own models, so none settles the question for every assistant.
A practical rule:
- Skip examples for simple requests, when you want the assistant’s own approach, and as a first try with OpenAI’s or DeepSeek’s reasoning models [16, 8].
- Add examples when the format, tone, categories or quality bar keep coming out wrong after a clear description.
- Compare when it matters: run the request with and without an example and keep the better result.
If the answer misses the task itself, not the format, an example is unlikely to help; see what to do when AI misunderstands your prompt.
Practical Takeaways
- Use an example when describing the structure, tone, categories or quality you want has not worked.
- Label every example, mark where it starts and ends, and say in one sentence what to copy and what to ignore.
- Use two or three varied examples if one gets copied too literally; keep their format consistent and their labels balanced.
- Proofread examples, and use invented or placeholder ones rather than private documents or other people’s work.
- Try simple requests, and some reasoning models, without examples first, and compare the two versions when the result matters.
Sources
- Language Models are Few-Shot Learners. arXiv (NeurIPS 2020), 2020-05-28, accessed 2026-11-09.
- Prompt engineering techniques – Microsoft Foundry | Microsoft Learn. Microsoft, 2026-05-13, accessed 2026-11-09.
- What are projects? | Claude Help Center. Anthropic, accessed 2026-11-12.
- Get personalization in Gemini Apps – Gemini Apps Help. Google, accessed 2026-11-12.
- Prompting best practices – Claude Platform Docs. Anthropic, accessed 2026-11-09.
- Prompt design strategies. Google, accessed 2026-11-09.
- Prompt engineering | OpenAI API. OpenAI, accessed 2026-11-09.
- Reasoning best practices | OpenAI API. OpenAI, accessed 2026-11-09.
- Calibrate Before Use: Improving Few-Shot Performance of Language Models. arXiv (ICML 2021), 2021-02-19, accessed 2026-11-09.
- Fantastically Ordered Prompts and Where to Find Them: Overcoming Few-Shot Prompt Order Sensitivity. arXiv (ACL 2022), 2021-04-18, accessed 2026-11-12.
- Quantifying Language Models' Sensitivity to Spurious Features in Prompt Design or: How I learned to start worrying about prompt formatting. arXiv (ICLR 2024), 2023-10-17, accessed 2026-11-09.
- Rethinking the Role of Demonstrations: What Makes In-Context Learning Work?. arXiv (EMNLP 2022), 2022-02-25, accessed 2026-11-09.
- Ground-Truth Labels Matter: A Deeper Look into Input-Label Demonstrations. arXiv (EMNLP 2022), 2022-05-25, accessed 2026-11-12.
- Larger language models do in-context learning differently. arXiv (Google Research), 2023-03-07, accessed 2026-11-09.
- Get started writing prompts in Microsoft Copilot | Microsoft Support. Microsoft, 2026-09, accessed 2026-11-09.
- DeepSeek-R1: Incentivizing Reasoning Capability in LLMs via Reinforcement Learning. arXiv (DeepSeek-AI), 2025-01-22, accessed 2026-11-09.
