Few-Shot Prompting Techniques
What is few-shot prompting?
Few-shot prompting means giving the AI 2–5 examples of what you want *before* your actual request. The AI learns the pattern from your examples and applies it.
It's like showing a new employee 3 sample reports before asking them to write one — they immediately understand the format, style, and level of detail you expect.
The structure of few-shot prompts
Format your few-shot prompt like this:
```
Here are examples of [what you want]:
Input: [example 1 input]
Output: [example 1 output]
Input: [example 2 input]
Output: [example 2 output]
Now do the same for:
Input: [your actual input]
Output:
```
The AI completes the pattern you've shown it.
When few-shot works best
Few-shot is most powerful when:
• You need a specific format that's hard to describe in words (e.g., tweet style, product descriptions)
• You want consistent tone across many outputs
• The task is classification or labeling (e.g., Sentiment: positive/negative)
• You have an existing style guide or brand voice to match
For simple, clear tasks, few-shot can be overkill — a good zero-shot prompt is faster.
Key Takeaways
- Few-shot prompting gives the AI 2–5 examples to learn from before your real request.
- Use the Input/Output format to show examples clearly.
- Few-shot is best for specific formats, tone matching, and classification tasks.
- Quality of examples matters more than quantity.
Write a few-shot product description prompt
Choose a product you know. Write 2 example product descriptions in your desired style, then ask the AI to write a third in the same style.