Glossary · 3 · Working with models: prompts and context
Few-shot prompting
Also known as: Zero-shot prompting, In-context learning, One-shot prompting
Few-shot prompting is the technique of including a small number of input–output examples in a prompt so that the model infers the desired pattern, style or format from them; with no examples it is called zero-shot prompting.
- Intermediate
- Technical writers
- Technical marketers
- Developers
In one sentence
Few-shot prompting explained: show an AI model two or three examples and it follows the pattern — ideal for style, format and terminology.
Example
To generate glossary definitions, the prompt includes three approved definitions from the house style guide, then asks for a new one in the same pattern.
Why it matters on your learning path
- Technical writers: Examples from your style guide are often more effective than long style rules.
- Technical marketers: Show two or three approved posts to get on-brand variants.
- Developers: Few-shot examples consume context; for large numbers of examples consider fine-tuning.