Choosing Good Examples
The 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
Loading Prompt Playground...
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
Loading Exercise...
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
Loading Prompt Playground...
Exercise: Quality Example Writing
Loading Exercise...
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
Loading Prompt Playground...
Well-chosen examples are the foundation of reliable few-shot prompting.

