Introduction
When you want an AI to do a task well, it can be hard to explain exactly what you want in just a few words. Few-shot prompting helps by showing the AI some examples first, so it understands better what kind of answer you expect.
Imagine teaching a friend to sort laundry by showing them a few piles of clothes already sorted by color. After seeing these examples, your friend can sort the rest correctly without needing detailed instructions.
┌─────────────────────────────┐ │ Few-shot Prompting │ ├─────────────┬───────────────┤ │ Examples │ New Input │ │ (Input- │ (Input only) │ │ Output Pairs)│ │ ├─────────────┴───────────────┤ │ AI uses examples to predict │ │ output for new input │ └─────────────────────────────┘