AI 101

In-context learning

Also known as: few-shot learning · in context

Basics

In-context learning (a.k.a. few-shot) is when a model picks up a new task from examples in the prompt itself, without any training.

You show it 2–5 examples of the pattern, then it follows:

Translate to French:
"hello" → "bonjour"
"thank you" → "merci"
"goodbye" → ???

The model fills in “au revoir” — it learned the task from the examples, on the fly.

The power move: in-context learning is why good prompting works at all. You don't retrain the model — you *teach it the task* right there in the prompt.