One-Shot Learning

One-Shot Learning


One-shot learning is a model recognising a new class or task from a single example. Conventional training expects hundreds of examples per class. Here there is one, and the model is supposed to identify further instances from it.

What makes that possible is that the model learned similarity rather than the classes themselves. Face recognition is the clearest case. During training the model sees millions of faces, but its goal is not to memorise people, it is to build a representation that tells whether two faces belong to the same person. When a new employee is enrolled, one photograph is enough, because the comparison happens in vector space.

With language models the term means something slightly different. The single example never enters the training data, it goes into the prompt. You place one input and its expected output in the prompt, and the model reads the pattern and applies it to the new input.

A concrete case: a support team sorts incoming tickets into categories and a new category is opened. One example ticket and its label go into the prompt. The model starts using that category on subsequent tickets with no retraining involved.

The risk of working from one example is how representative it is. If the chosen example is unusual, the model generalises the wrong pattern, which is why teams normally supply a few and move into few-shot territory.

From generative AI strategy to custom agent development and retrieval architectures, we help you scale AI responsibly.
Discuss your AI project