AI Glossary / Few-shot
⌨️ Prompts
Few-shot
Providing the model with a few examples in the prompt to show how it should respond.
Few-shot is a prompting technique where instead of describing a task abstractly, you show the model several examples of input and expected output. The model picks up the pattern and applies it to new data - like an employee who's been shown two completed forms instead of having the procedure explained. This is one of the most effective and simplest techniques: for tasks with a defined format (classification, data extraction, specific writing style), two or three good examples can improve results more than lengthy descriptions.
Related concepts