AI Glossary · Letter O

One-Shot Learning.

The ability of a machine learning model to recognize a new category or learn a new task from only one example, or from very few examples, by leveraging prior knowledge learned from related tasks. One-shot learning is important for applications where collecting large labeled datasets is impractical, such as recognizing a client’s new product variant from a single reference image or adapting a model to a new content category from minimal examples.

Also known as few-shot learning, zero-shot learning, low-data learning

What it is

A working definition of one-shot learning.

Standard machine learning requires many labeled examples to train a model for a new category. One-shot learning achieves recognition or classification from a single example by exploiting learned similarity metrics or shared representations from training across many related tasks. A one-shot image classifier trained across many object categories learns to compare new examples to stored reference images rather than learning category-specific features; when given a single reference image of a new category, it can recognize new instances of that category by measuring their similarity to the reference. The generalization comes from the learned comparison function, not from category-specific training.

Zero-shot learning extends the concept further: recognizing categories from which no examples have been seen during training, by using semantic descriptions or attribute vectors that relate new categories to known ones. A zero-shot image classifier trained on visual attributes might recognize a “zebra” without having seen any zebra images in training, if it has learned what “striped,” “horse-shaped,” and “black and white” look like and the zebra is described by these attributes. Large language models exhibit zero-shot and few-shot generalization on many text tasks: a model that has learned general language patterns can perform new tasks, such as classifying text into a new category, from a description of the task in the prompt without any task-specific fine-tuning.

Few-shot prompting with large language models is the most practically accessible form of few-shot learning for agency applications. Providing a language model with 3 to 10 examples of the desired input-output mapping in the prompt, called in-context learning, significantly improves performance on the target task without any model parameter updates. This enables rapid adaptation to new classification tasks, writing styles, or extraction formats by changing the prompt examples rather than fine-tuning the model. The limitation is that in-context examples must fit within the model’s context window, limiting the number of examples that can be provided.

Why ad agencies care

Why one-shot and few-shot capabilities enable faster AI deployment for new clients and new content categories.

A working ad agency that deploys AI tools for new clients regularly encounters the cold-start problem: the models it relies on were trained on data from other clients or general datasets and do not immediately perform well on the new client’s specific content, audience, and conversion patterns. One-shot and few-shot learning capabilities reduce the data collection burden for adapting models to new clients, enabling faster time to value for AI-powered capabilities in new client engagements. Understanding which AI capabilities exhibit useful few-shot generalization and which require substantial client-specific training data is essential for setting accurate timelines and expectations.

Large language model prompting with few-shot examples adapts AI writing tools to new brand voices quickly. A language model used for AI-assisted copywriting can be adapted to a new client’s brand voice without fine-tuning by providing 5 to 10 examples of on-brand copy in the prompt. The model uses these examples to infer the stylistic patterns of the brand voice and applies them to new generation requests. This few-shot adaptation is immediate and requires no training data collection, enabling an agency to deploy AI writing assistance for a new client from the first week of the engagement. The quality of few-shot prompting is typically lower than fine-tuning on a larger example set, but it provides a working baseline while the agency accumulates sufficient data for more robust adaptation.

Product image recognition from single reference images enables rapid catalog expansion for visual search. A one-shot visual search system that can recognize a product from a single reference image enables an agency to add new products to a visual search catalog by uploading one reference image per product rather than collecting hundreds of labeled training examples per product. Siamese network-based one-shot recognizers and CLIP-based semantic similarity approaches both support this use case, with different tradeoffs in accuracy and sensitivity to image quality. One-shot visual search is particularly valuable for fashion and home goods clients with rapidly changing product catalogs where collecting labeled examples for every SKU would create an ongoing production bottleneck.

Few-shot content classification enables rapid deployment of custom classifiers without large annotation projects. When an agency needs a custom content classifier for a new client, such as a brand safety classifier that reflects the client’s specific content standards, few-shot in-context learning with a large language model can produce a working classifier from 10 to 20 labeled examples in the prompt. This falls short of the accuracy achievable with a fine-tuned model trained on 1,000 labeled examples, but it enables a working classifier to be operational within hours rather than weeks, supporting the early stages of a client engagement while more substantial annotation work proceeds in parallel.

In practice

What one-shot learning looks like inside a working ad agency.

An agency is onboarding a specialty outdoor equipment retailer client and needs to deploy an AI visual search capability that allows customers to upload a photo of an outdoor item they own and find compatible accessories and complementary products from the client’s catalog. The client has 4,200 active SKUs, adding 300 to 400 new products per season. Building a traditional image classification model with sufficient examples per SKU would require collecting hundreds of images per product, which is impractical for the catalog size and update frequency. The agency implements a one-shot retrieval architecture using CLIP embeddings. Each product in the catalog is represented by its product photography embedded into CLIP’s shared image-text space. When a customer uploads a query image, the system finds the catalog products with the most similar CLIP embeddings to the query image. Because CLIP’s embedding space captures semantic similarity, a photo of a customer’s existing hiking boots reliably retrieves compatible hiking socks, gaiters, and trekking poles based on semantic similarity rather than pixel similarity. New products are added to the search index by embedding their single product photo, with no additional annotation or training required. A validation study measuring precision at 5 for 200 test queries shows 68% precision, meaning that 3.4 of the top 5 retrieved results per query are rated as highly relevant by the client’s merchandising team. This is sufficient for the agency to launch the feature and improve it iteratively as additional product imagery and customer interaction data accumulates.

Build the few-shot learning foundations that accelerate AI capability deployment for new clients through The Creative Cadence Workshop.

The generative AI foundations module covers one-shot and few-shot learning including in-context prompting, similarity-based retrieval, and the meta-learning principles that enable rapid adaptation to new tasks with minimal labeled data.