The best way to teach a prompt is to show it, not just tell it. If you include 2–3 examples of what you want, it learns the pattern instantly. This is called few-shot prompting.
How it works:
Write a caption for a product. Examples:
- green tea → "Fresh green tea from Mondulkiri, naturally fragrant. Try it today! #KhmerTea"
- moringa soap → "Handmade moringa soap, good for dry skin. Delivered nationwide. #KhmerSoap"
Now write one for: red chilli powder
The model learns tone, length and structure from your examples — the output follows the pattern better than a long description would produce.
When to use few-shot:
- Structured output (tables, lists, special formats).
- A specific tone or language that's hard to describe.
- Work you repeat often and want consistent results.
Rules for good examples:
- Use 2–5 — more makes the prompt long and expensive.
- Examples must be correct and slightly varied (not all the same words).
- Your examples are the standard — errors in them produce errors in output.
Try it in the widget below: compare a prompt with no examples vs one with 2 examples on the same task — note the difference.
Takeaways:
- Few-shot = give 2–5 examples instead of a long description
- For format, tone and repetitive tasks
- Examples are the standard — bad examples give bad output