Glossary

Few-shot learning

Few-shot learning teaches a model a task from just a handful of labelled examples, either shown in the request or used for a small amount of extra training.

Swiss-hosted inference. Nothing you send is ever stored.Swiss data residency

What Few-shot learning means

Few-shot learning sits between zero-shot and full fine-tuning: the model sees a small number of labelled examples per class, often between one and a few dozen. There are two broad mechanisms:

  • In-context few-shot: examples are placed in an LLM's prompt and the model generalises from them without any weight update. This is how GPT-3 popularised the term. It costs extra input tokens on every call and is sensitive to example order and formatting.
  • Parameter-efficient few-shot training: the examples are used to update a small model or adapter, as in SetFit, PET or light fine-tuning of an encoder head. It costs a short training run and nothing per call afterwards.

Few-shot and Laya

Laya's request format has no slot for demonstration examples: a call is a state plus typed questions, and the model reads only those. You can improve a question without training by rewriting its instructions and option descriptions, which is a form of prompt engineering rather than few-shot learning.

The route to learning from examples is training. The open-weights model ships with a published fine-tuning notebook, and the model card shows what that buys on its typed-decisions benchmark: base checkpoints near chance (0.362), fine-tuned checkpoint 0.766, above the 0.735 teacher self-agreement ceiling. That fine-tune used the benchmark's own training split rather than a handful of examples, so treat it as evidence for fine-tuning in general, not for a specific few-shot count.

Few-shot examples are still useful as an evaluation set: a few hundred labelled cases from your traffic are enough to measure accuracy, fit temperatures and set thresholds. See zero-shot vs fine-tuned and Laya vs fine-tuned BERT.

How Few-shot learning connects to the rest of the vocabulary.