Skip to content

In-Context Learning

The ability of a model to perform a new task simply by seeing examples in the prompt — without fine-tuning and changing weights.

How It Works

You show the model several pairs of «input → output» directly in the message, and it continues in the same vein:

Translate to Spanish:
cat → gato
dog → perro
elephant →

The model responds with "elefante", even though it was not explicitly trained on these pairs.

Relation to Few-Shot

Few-shot prompting is a practical application of in-context learning: the more high-quality examples in the context, the better the model grasps the task.

Why It Matters

  • No training data needed — examples in the prompt are sufficient;
  • The task is defined «on the fly»;
  • Basis for rapid prototyping.

See Also

← All Terms