Reference · Glossary
Few-shot prompting
Last updated
Giving the model **a few input→output examples** in the prompt so it copies the pattern on new inputs.
When to use
Classification, formatting, tone matching, or any task where examples beat long rules.
When not to
When examples would leak private data, or when a strict schema + JSON mode is cleaner.
Example
Input: "refund late" → Label: billing
Input: "app crashed" → Label: technical
Input: "upgrade plan" → Label: sales
Input: "can't log in" → Label: