Zero-Shot / Few-Shot Learning
FoundationsPrompting methods that ask a model to perform a task with no worked examples or with only a small set of examples, without updating the model’s weights.
Zero-shot supplies the contract; few-shot adds test cases. The model must infer the rule from either the instruction alone or the miniature sample.
Zero-shot learning gives a model an instruction and the task input, but no worked example. If asked to classify sentiment, the prompt might describe the labels and provide a sentence to classify. The model must infer the task from its pretrained capabilities and the wording of the instruction.
Few-shot learning adds a small set of input-output demonstrations to the prompt. These examples show the expected decision rule, format, tone, or edge-case behavior. They do not change the model’s parameters; the adaptation happens inside the current context window. This is why the technique is also called in-context learning.
The methods are useful when collecting a training set or running a fine-tuning job would be too expensive. Their weakness is sensitivity to example choice, ordering, formatting, and context length. A strong few-shot prompt can make a general model behave like a narrow task specialist, but it does not give the model knowledge that is absent from its parameters or the supplied context.
Related Terms
Last updated: March 1, 2026