Choosing Good Examples
Like this video? Get new free AI lessons on YouTube.
SubscribeThe quality of your examples determines the quality of few-shot results. Selecting the right examples is both an art and a science.
What Makes a Good Example?
Good examples are:
- Representative - They reflect real-world cases
- Clear - The input-output relationship is obvious
- Diverse - They cover different scenarios
- Correct - They demonstrate the right behavior
Example Selection Criteria
1. Coverage
Cover the full range of expected inputs.
2. Difficulty Gradient
Include examples ranging from easy to challenging:
3. Edge Cases
Anticipate tricky scenarios:
Exercise: Select Diverse Examples
Example Ordering
Order can affect results:
Recency Bias
The last example often carries more weight. Put important patterns last.
Similar First
Put simpler examples first, complex ones later.
Balanced Alternation
For classification, alternate between categories:
Quality Over Quantity
Exercise: Quality Example Writing
Avoiding Example Bias
Class Imbalance
Length Bias
Content Bias
Example Debugging
If results are inconsistent:
- Check if examples contradict each other
- Verify all examples are correctly labeled
- Look for unintended patterns (length, keywords)
- Test with edge cases
- Add examples for failure cases
Practice: Example Audit
Well-chosen examples are the foundation of reliable few-shot prompting.
Up next ยท Lesson 15 of 29
Specifying Output Format
1 min read
14 of 29 lessons done

Ask Byte about this lesson
A private chat about this lesson. Byte has read the whole lesson, answers in seconds, and shows the section each answer comes from. Ask follow-ups in any language.
Questions & Answers
Public questions about this lesson. The AI Tutor answers right away in your language, the FreeAcademy team checks answers, and every learner can read them.

