← Back to AI Glossary

AI Glossary

Few-Shot Learning

The ability of an AI model to learn or perform a task after being given only a small number of examples.

Few-Shot Learning

Overview

Many traditional machine learning systems require large amounts of training data before they can perform well.

Modern foundation models often require much less guidance.

Few-shot learning refers to the ability of an AI model to perform a task after receiving only a small number of examples. Instead of requiring thousands of training samples, the model can often understand a task from just a few demonstrations.

A helpful way to think about few-shot learning is teaching someone a new game. Rather than explaining every possible scenario, you provide a few examples and allow them to infer the rules.

Modern Large Language Models (LLMs) frequently use few-shot learning during prompting. By including a few examples in a prompt, users can often guide the model toward the desired behavior.

Together with Zero-Shot Learning, few-shot learning helps explain why modern AI systems can adapt to such a wide variety of tasks.

Why It Matters

Few-shot learning reduces the amount of data needed to perform new tasks effectively.

Real-World Example

A user may provide a language model with a few examples of a desired writing style before asking it to generate additional content.

Related Concepts

Related Articles