few-shot-patterns
Installation
SKILL.md
Few-Shot Patterns
Few-shot prompting provides examples of input-output pairs that demonstrate the desired behavior. The AI learns the pattern from the examples and applies it to new inputs. The quality of examples directly determines the quality of outputs.
Why Examples Work
Examples communicate what instructions alone cannot:
- Implicit patterns: The AI picks up on format, style, and reasoning patterns from examples without being told explicitly
- Ambiguity resolution: When instructions could be interpreted multiple ways, examples show which interpretation you want
- Quality calibration: Examples set the bar for output quality, length, and depth
- Edge case handling: Examples of tricky cases teach the AI how to handle similar situations
Example Design Principles
Diversity: Examples should cover different scenarios, not repeat the same type
- Include easy cases, hard cases, and edge cases
- Vary the input format and content
- Show different valid output formats if applicable Clarity: Each example should demonstrate one clear pattern
- Avoid examples that could be interpreted multiple ways
- Make the mapping from input to output obvious
- Remove irrelevant variation between examples Quality: Examples set the ceiling for output quality
- Every example should be one you'd be happy to ship
- If the example has a flaw, the AI will replicate that flaw