Home Tools Glossary Few-shot Learning
Technique

Few-shot Learning

Few-Shot In-Context Learning

/fyoo shot lur-ning/

Providing an AI model with a small number of demonstration examples within the prompt to guide task execution.

In plain English
If you want an AI to write product descriptions in a very specific format, you show it two or three examples of good descriptions first. Those few examples teach the AI the pattern instantly without needing any retraining.
Real-world example
Providing three examples of customer reviews paired with sentiment labels before asking the model to classify a new review.
Technical definition
Few-shot learning in generative models involves conditioning an LLM with a small set of input-output exemplars directly within the prompt context window. The model leverages in-context pattern recognition to infer the target task distribution without modifying internal weights. This bridges the gap between pre-trained generalization and custom downstream tasks.