π Step 9: AI/LLM#245 / 291
Few-Shot Prompting
Few-Shot Prompting
πOne-line summary
Showing the model a few examples in the prompt so it follows the pattern when answering.
π‘Easy explanation
Showing a couple of example answers and asking "please respond in this style." Like giving worked examples before a test.
β¨Example
Teach the pattern with a few examples
Shipping was fastβPositive
Packaging was a messβNegative
Price is just okayβNeutral
Battery drains quicklyβNegative β¨
β‘Vibe coding prompt examples
>_
Build a few-shot prompt that classifies customer reviews as positive/negative/neutral. Include 3 examples per label.
>_
We have too many few-shot examples eating tokens. What's the criterion for keeping the most effective 3?
>_
Give 5 few-shot examples for free-text Korean β JSON extraction. Inputs vary in style; outputs share one fixed schema.
Try these prompts in your AI coding assistant!