Few-shot Learning
TechniquesSimple Definition
Providing a small number of input-output examples in the prompt to guide the AI's response format and style.
Full Explanation
Few-shot prompting dramatically improves performance on structured tasks by showing the model exactly what format you want. Instead of describing the task, you show 2-5 examples of desired input→output pairs. The model infers the pattern and applies it to new inputs. Particularly effective for classification, data extraction, and stylistic writing tasks.
Example
Providing 3 example customer reviews with sentiment labels before asking the model to classify new reviews.
Related Terms
Last verified: 2026-03-30← Back to Glossary