Few-Shot Prompting
Teach the model the target pattern with compact examples.
Learning Objectives
- Know when examples outperform extra instructions.
- Select examples that match structure and judgment.
- Keep few-shot prompts compact enough to maintain signal.
Teach with examples
Few-shot prompting gives the model examples of the input and output pattern. It is especially useful when the task depends on tone, structure, judgment, or team-specific style.
Examples should be short, consistent, and close to the real task. Avoid examples that are impressive but unrelated. The model imitates patterns, so the examples should demonstrate the pattern you want repeated.
When to use few-shot prompting
- The output needs to match a specific writing style.
- The task has a subjective quality bar.
- Instructions alone are not producing the right shape.
- The team needs consistent outputs across users.
A good few-shot prompt is not a giant archive. Two excellent examples often beat ten noisy ones.
Examples
Style transfer
Two strong renewal notes can teach the model the team's level of brevity, evidence, and recommended action better than a long tone paragraph.
Practice Exercise
Build a two-example prompt
Find two excellent examples from your team. Use them to generate a third output from new source material.
- The examples are close to the real task.
- The examples share a consistent structure.
- The new output follows the demonstrated style.
Mini Prompt Templates
Few-Shot Composer
Examples: [EXAMPLE_1] [EXAMPLE_2] New input: [NEW_SOURCE] Task: Produce a new output following the same structure, tone, and level of detail.
