Use examples to demonstrate a pattern when verbal instructions alone leave too much ambiguity. This guide treats AI as a drafting and reasoning aid, not as an authority. The goal is to make the task explicit enough that you can review the result against real source information.
The core workflow
- Choose representative examples — define this before asking for a polished final response.
- Show both input and desired output — define this before asking for a polished final response.
- Avoid examples that smuggle in false rules — define this before asking for a polished final response.
- Keep examples consistent — define this before asking for a polished final response.
- Explain exceptions — define this before asking for a polished final response.
- Test a new case — define this before asking for a polished final response.
What to put in the prompt
For Few-Shot Prompting: How Examples Change AI Output, start with the exact task and intended user. Then provide the source facts the model cannot safely infer. Put critical requirements close to the task, separate pasted source material from instructions, and say what the response should do when information is missing.
- State one concrete deliverable or decision.
- Supply relevant context and authoritative source material.
- Name facts, commitments, or definitions that must remain unchanged.
- Specify the output structure so the result is easy to inspect.
- Require assumptions, unknowns, or unsupported claims to be visible.
A reusable prompt pattern
How to review the first response
Do not judge the first answer only by whether it sounds polished. For Few-Shot Prompting: How Examples Change AI Output, review whether the model followed the source, respected the stated limits, and produced something that can be checked. Highlight every claim that depends on a fact, date, number, policy, quote, citation, credential, or technical conclusion.
- Check choose representative examples.
- Check show both input and desired output.
- Check avoid examples that smuggle in false rules.
- Check keep examples consistent.
- Check explain exceptions.
- Check test a new case.
Common failure pattern
Iterate deliberately
When a response is weak, identify the largest specific failure and revise that instruction. Preserve the parts that are already correct. For Few-Shot Prompting: How Examples Change AI Output, a useful second pass might add missing source material, tighten one scope boundary, change the requested structure, or require a claim-by-claim verification list.
Practice exercise
- Choose a real low-risk task you understand well.
- Write down the expected facts or decisions before prompting.
- Run the prompt and mark where the response follows, omits, or invents information.
- Change one instruction and compare the second result.
- Save the final prompt only after you understand which instruction produced the improvement.
Primary documentation
Primary references
For current ChatGPT-specific prompting guidance relevant to Few-Shot Prompting: How Examples Change AI Output, consult OpenAI’s official Prompt engineering best practices for ChatGPT and How do I create a good prompt for an AI model?. Product behavior can change, so current product documentation should take priority over older tips or screenshots.
Choose examples for coverage, not decoration
Examples are most useful when they show the boundaries of the task. If every example is an easy, positive case, the model learns little about edge conditions. A stronger set may include a normal example, a borderline example, and a case that should be rejected or labeled uncertain. The examples should demonstrate the decision rule you care about, not merely the writing style. Keep the labels and output format consistent so the model can infer the pattern without having to guess which part of the example matters.
Watch for example leakage
Few-shot prompts can make the model copy incidental details from the examples. Review whether names, numbers, industries, locations, categories, or conclusions are being repeated when they should change. If so, rewrite the examples to vary those incidental details while preserving the underlying pattern. You can also state explicitly which attributes are illustrative and which attributes define the rule. This is especially important when examples contain sensitive, regulated, or highly specific factual material.