Teaching by Example: Few-shot Prompting
Zero-shot: describe the task and let the model do it. Few-shot: also show a few input → output examples. GPT-3's paper ("Language Models are Few-Shot Learners", 2020) showed that large models can learn a task from examples in the prompt alone, with no weight updates. This is in-context learning.
In this lesson
- Zero-shot: start here
- Few-shot: show, don't tell
- Choosing good examples
- Dynamic few-shot: retrieve the examples
- Few-shot vs fine-tuning
This lesson is part of AI Engineering. Unlock the full course to read it, take the quiz and track your progress.