2026-10-21 · 2 min read · AI Prompts Online Team
Few-Shot Prompting Examples: Teach the Format by Showing It
Few-shot prompting examples for classification, extraction, rewriting, and tone matching, with tips on choosing examples and avoiding copy-paste outputs.

Few-shot prompting examples prove that showing beats telling. Describing a format in a paragraph leaves room for interpretation; three examples of the exact output leave almost none.
Classification
Classify support messages as billing, bug, feature_request, or other.
Message: "I was charged twice this month."
Label: billing
Message: "The export button does nothing on Safari."
Label: bug
Message: "Would love a dark mode."
Label: feature_request
Message: "{new message}"
Label:
Extraction to JSON
Extract company, role, and start date.
Text: "Maya joined Northwind as a data analyst in March 2024."
JSON: {"company":"Northwind","role":"data analyst","start":"2024-03"}
Text: "{input}"
JSON:
Rewriting in a Voice
Rewrite corporate sentences in our plain voice.
Corporate: "We are pleased to announce enhanced functionality."
Plain: "New: you can now do X."
Corporate: "{input}"
Plain:
Choosing Good Examples
| Do | Don't |
|---|---|
| Include edge cases | Only show easy ones |
| Vary length and wording | Repeat near-identical examples |
| Balance labels | Show 4 of one class and 1 of another |
| Keep them short | Paste long documents as examples |
Few-Shot + Reasoning
For tasks that need judgment, include a short reason in each example ("Reason: mentions a charge → billing"). That's chain-of-thought by demonstration.
In Apps
Put stable examples in the system prompt and test with real inputs. Assemble templates fast in the prompt generator.
FAQ
What is few-shot prompting?
Including a few input-output examples in the prompt so the model copies the pattern. It's the fastest way to get consistent formats and labels.
How many examples should I use?
Two to five is usually enough. Cover the tricky cases, not just easy ones, and keep them varied so the model doesn't copy wording.
Why does the model copy my examples too closely?
Your examples are too similar or too long. Vary them, keep them short, and add a line like 'match the format, not the content'.
Frequently asked questions
- What is few-shot prompting?
- Including a few input-output examples in the prompt so the model copies the pattern. It's the fastest way to get consistent formats and labels.
- How many examples should I use?
- Two to five is usually enough. Cover the tricky cases, not just easy ones, and keep them varied so the model doesn't copy wording.
- Why does the model copy my examples too closely?
- Your examples are too similar or too long. Vary them, keep them short, and add a line like 'match the format, not the content'.
Related articles
Ready to generate a prompt?
Use our free tools to build copy-ready prompts for any model and category.