# Few-shot prompting

Concept · [Building with AI](https://ecosystem.samcarlton.com/ai)

Also called: few-shot, few shot, few-shot examples, one-shot, zero-shot, examples in the prompt

Including a few worked examples in a [prompt](https://ecosystem.samcarlton.com/prompt) so the model copies the pattern. Zero-shot means asking with no examples.

**For example:** A [prompt](https://ecosystem.samcarlton.com/prompt) shows three customer emails, each labeled 'billing', '[bug](https://ecosystem.samcarlton.com/bug)' or '[sales](https://ecosystem.samcarlton.com/revenue)', then asks the model to label a fourth.

## Connects to (4)

- [Prompt](https://ecosystem.samcarlton.com/prompt): The instructions or question you give an AI tool in everyday words.
- [Prompt optimization](https://ecosystem.samcarlton.com/prompt-optimization): Improving a prompt through repeated testing: change it, run it against a set of examples, measure results and keep the better version.
- [Fine-tuning](https://ecosystem.samcarlton.com/fine-tuning): Extra training of an existing model on a smaller, narrower set of examples, so it suits one task or style.
- [Context engineering](https://ecosystem.samcarlton.com/context-engineering): Deciding what information, instructions, examples and tools to put in front of an AI model for each task, and what to leave out.

Map view: https://ecosystem.samcarlton.com/few-shot-prompting
