
One-Shot Task
A one-shot task is a task in which an AI system receives exactly a single example and is supposed to infer from it what to do. The term thus describes how sparingly a system can manage with instructions – in contrast to methods that need hundreds of examples.
When a computer program is supposed to learn something new, it usually receives a great many examples. For a task like “recognize cats in photos,” that can amount to hundreds of thousands of images. A one-shot task works differently: the system sees exactly a single example and is then expected to deliver the appropriate solution. In other words, you show it once what the result should look like, and expect it to transfer the pattern. The name comes from English and literally means “one shot,” in the sense of “a single attempt.” There are also the related terms zero-shot (no example at all, just a description) and few-shot (a handful of examples).
Why a single example is worth so much
Collecting examples costs time and money. Anyone who wants to train a system to assess X-ray images needs doctors to manually label thousands of images. For rare diseases, that quantity of images simply doesn’t exist. That’s precisely where it becomes interesting whether a system can already deliver usable results with just one example.
For humans, incidentally, this is normal. A child who is shown a zebra once will recognize every zebra afterward. It has already learned beforehand what animals look like, what stripes look like, how proportions work. The single example only needs to add the new piece. This very prior knowledge is the reason why one-shot works at all in modern AI systems.
In practice, this ability also serves as a quality benchmark. If a language model solves a task with one example, it is considered more flexible than one that needs twenty. Companies therefore explicitly advertise their models' one-shot and zero-shot results.
Prior knowledge plus a pattern: the mechanism behind it
The crucial point: in a one-shot task, the model doesn’t actually learn anew. Its internal values, the so-called parameters, remain unchanged. The example is simply included in the input, i.e., in the text that is sent to the model. The model recognizes a pattern there and continues it.
A concrete case: you write “Berlin – Germany” and then ask about “Rome –”. The model answers “Italy,” even though no one has ever stated the rule “name the country for the capital.” The single example made the task unambiguous. Without the example, the model could just as well have named the population or the language.
A common misconception is confusing one-shot with fine-tuning. In fine-tuning, a model is retrained with additional data and permanently retains what it has learned. With one-shot, the effect disappears as soon as the conversation ends. The ability is entirely contained in the pre-training; the example is merely the hint as to which of these abilities is currently being asked for.
One-shot in the chat window and in product announcements
Anyone using a chatbot often applies this technique unknowingly. If you write “Summarize this like so” and place a finished example next to it, that is a one-shot task. The responses become noticeably more consistent as a result, especially in terms of format and tone. Programmers use this to enforce clean tables or datasets.
The term also appears outside of text. Facial recognition on a phone is a classic one-shot case: one photo is enough, and every further image is then compared against it. Voice-cloning services work similarly, recreating a voice from just a few seconds of recording.
In news about new models, one-shot figures are usually found in comparison tables, alongside zero-shot and few-shot. Such figures should be read with caution. A model can excel at one task and fail at another with the very same single example, because the example was ambiguous.