AI GLOSSARY · AI CONCEPTS
Few-shot learning (FSL)
Definition
Few-shot learning is a machine learning setting in which a model must handle a new task or class after seeing only a few labelled examples, usually by relying on knowledge it already learned from other data.
Also called: FSL, few shot learning, few-shot, few shot.
In plain language
A person shown three photos of an unfamiliar bird can often spot the same bird later. Few-shot learning asks a computer to do something similar: learn a new category or task from a handful of labelled examples instead of thousands. It is useful when labelled data is scarce, such as rare medical images. The main limit is reliability. With so few examples a model can latch onto accidents in the sample, and the survey cited below says the core issue is that the empirical risk being minimised is unreliable, in the survey's words. Language-model prompting also uses the term for supplying demonstrations in the input; specify how the system adapts rather than assume all few-shot methods retrain weights.
Technical definition
IBM describes few-shot learning as a machine learning framework in which a model makes accurate predictions after training on a very small number of labelled examples, typically for classification when training data is scarce, and as part of n-shot learning alongside one-shot and zero-shot learning. A 2019 survey (arXiv 1904.05046) defines it as using prior knowledge to generalise rapidly to new tasks with only a few supervised samples, and says the core issue is that the empirical risk being minimised is unreliable. It groups methods by how prior knowledge is used: to augment the data, to shrink the hypothesis space, or to alter the search for the best hypothesis. The GPT-3 paper (arXiv 2005.14165) uses 'few-shot' for a language model given demonstrations in its text input with no gradient updates.
Worked examples in this catalogue
Catalogue examples point at a skill, guide or coding tool listed on this site, with what to run and what you see. An example marked illustrative describes the item from its own documentation; it was not executed for this page. Platform Scores are our assessment under a published method, not a safety guarantee.
Guide · Illustrative, not executed
Prompt Engineering for Agents vs Chat Models
- What you see
- The guide says an agent can copy a flaw from an example, so review every example against your constraints, and it cites Anthropic's advice to use 3 to 5 examples inside example tags.
- Why it exercises the concept
- This is the prompting sense of few-shot, where demonstrations sit in the input. It is related to, but not the same as, training a model on few labelled examples.
Skill by Skill Almanac · Illustrative, not executed
prompt-writing 57/100 · Provisional, not yet measuredScored · Method v0.2 · How we score
- What you see
- The skill writes and lints LLM prompts with a fixed structure, injection rules and a numeric test plan.
- Why it exercises the concept
- A prompt that includes a few worked examples is one place the few-shot idea shows up for agent users. The actual six-block contract includes an examples block and a policy that chooses zero or several examples by task. Its linter and test plan do not prove that a particular example set improves performance.
Skill by Skill Almanac · Illustrative, not executed
llm-eval-test-sets 57/100 · Provisional, not yet measuredScored · Method v0.2 · How we score
- What you see
- The skill builds and validates an eval dataset for any LLM feature, with a checker for duplicates, missing graders, imbalance and leakage.
- Why it exercises the concept
- When you judge a few-shot setup you need held-out cases that are not the examples you supplied. The leakage and duplicate checks address that. This inspected skill checks case structure and selected leakage signals; it does not train a few-shot model or score predictions.
How it shows up when you use agents
In day-to-day agent work, "few-shot" often means a prompt that contains a few worked examples. You paste two or three input and output pairs into the instructions, or into a skill, and the model follows the pattern. The GPT-3 paper describes this setting: tasks and few-shot demonstrations are given purely as text, and the model gets no gradient updates. The few-shot prompting entry covers the prompt-writing side.
The broader machine-learning setting concerns adaptation to a new task or class from few labelled examples, often using knowledge from earlier training. Some methods update parameters, but prototypical networks can classify new classes by distances to prototypes in a learned embedding space. New-task adaptation need not involve gradient updates. This links the setting to transfer learning and meta-learning; inspect what the actual workflow computes.
What goes wrong when the two meanings are mixed up: a team says "we did few-shot learning" and means a prompt, then expects its learned weights to have changed. Input demonstrations alone do not update those weights, although context and predictions can change. Another failure is copying a flaw. The prompt guide in the catalogue warns that an agent can copy a flaw from an example.
Next action: say which sense you mean, keep a held-out test set separate from the examples you show, and review each example against your rules before you reuse it.
Common confusions
- Few-shot learning versus few-shot prompting. The few-example setting includes different adaptation mechanisms. Prompting supplies demonstrations in the input with fixed weights, as GPT-3 describes; metric-based methods can instead build task-specific prototypes using a trained embedding.
- Few-shot versus zero-shot and one-shot. IBM places all three under n-shot learning. IBM also says zero-shot is a distinct learning problem. See Zero-shot learning.
- Few-shot learning versus fine-tuning. Fine-tuning continues training on a task dataset. Few-shot learning describes how little labelled data is available, and the two can overlap.
- Few examples versus no prior knowledge. The survey describes prior knowledge as what lets a model generalise from few samples. It is not learning from scratch.
- Myth. Adding more examples to a prompt improves the result. This entry makes no such claim, and the prompt guide in the catalogue suggests 3 to 5 examples as a recommendation, not a law.
Related terms
Terms that mention Few-shot learning (FSL)
More in AI concepts
Sources
- What is few-shot learning?, IBM (accessed 2026-11-24)
- Generalizing from a Few Examples: A Survey on Few-Shot Learning, arXiv (accessed 2026-11-24)
- Language Models are Few-Shot Learners, arXiv (accessed 2026-11-24)
- Prototypical Networks for Few-shot Learning, Snell, Swersky and Zemel (arXiv) (accessed 2026-11-25)
Definitions are written by Skill Almanac from these sources and were checked against them on 2026-11-25. Wikipedia is never the only source.
Review record
Last verified
Drafted by Claude (original draft); OpenAI Codex (bounded factual repairs); sources and example targets checked by Independent automated source review (OpenAI Codex); not human peer review on 2026-11-25. Last verified .
Change log (5)
- : Independent automated factual/example review completed. Cached US query estimate aligned to receipt; no traffic promise. Final technical gate recorded separately; publication disabled.
- : First version.
- : Verifier pass: applied verifier corrections to wording and claims.
- : Bounded source repairs: Replaced per-task training prerequisite with explicit adaptation mechanisms; distinguished fixed weights from contextual change and corrected examples-policy caption. Pending independent re-review.
- : Automated review completed; approved for the staged public release. Search indexing is controlled by the release configuration.