Examples in Prompts
Sometimes words alone cannot show the model what you want. A few examples can. In this lesson you learn zero-shot, one-shot and few-shot prompts, and how to choose good examples.
New words
- Zero-shot
- A prompt with an instruction but no examples.
- One-shot
- A prompt with exactly one example.
- Few-shot
- A prompt with a small number of examples, usually 2 to 5.
- Example (shot)
- A sample input with the exact answer you want for it.
- Label
- The name of the group you give to an input, such as "praise".
- Classification
- Putting each input into one of a few fixed groups.
- Pattern
- A repeating shape that the model notices and copies.
What you will learn
- Show me, do not tell me
- Zero-shot, one-shot and few-shot
- Why examples work
- Worked example: messy customer SMS
- Choosing good examples
- How many examples?
- Two common mistakes
- Try it: add examples and test
- Trade-offs, and real systems
- Try it today, and key takeaways
10 quiz questions at the end.
The full lesson, with interactive demos and the quiz, opens after you sign in with Google. It is free.