One-Shotting

One-Shotting

One-shotting refers to a method in which an AI model is shown exactly one single example before it is asked to solve a task. The model is supposed to infer what is expected of it from this one example — without explicit rules or lengthy retraining.

When you give an AI model a task, you can simply write out the question — or you can show the model a finished example beforehand of what the answer should look like. The latter is called one-shotting: exactly one example, then the actual question. The model is supposed to recognize the pattern from this one example and apply it to the new situation. This technique belongs to so-called prompting, i.e. the deliberate formulation of requests to a language model. It sits between two extremes: zero-shotting, where no example at all is given, and few-shotting, where several are given.

One-shot as a middle ground between effort and precision

Addressing a model without an example is quick — but imprecise. The model then interprets the task according to its own judgment, which is often enough, but sometimes goes in the wrong direction. With a single example, the goal can be pinned down much more sharply, without spending a lot of time compiling many examples.

This is especially valuable when a specific format is needed. If, for example, the model is supposed to always write product descriptions in three sentences with a certain structure, a single demonstrated pattern is often enough to make the outputs consistent. Many of the adjustments that would otherwise result from lengthy trial and error can be avoided this way.

In addition, one-shotting saves computing time and costs. The model has to process every word in the prompt. Anyone who sends just one example instead of five reduces the amount of text the model has to work through before every answer. Across millions of requests, this adds up.

How a single example steers the model

Large language models were trained on huge amounts of text. In the process, they learned to continue patterns. If you show them one input-output pair, they treat it as the beginning of a pattern and continue it. The example does not change the model permanently — it merely gives the model a cue, in the moment of the request, as to which direction to think in.

A typical one-shot prompt looks like this: First comes an example with an input and the corresponding desired output. Right after that follows the real question, without an output — the model is now supposed to supply that itself. The model reads the entire text from top to bottom and completes it in a meaningful way.

An important difference from real learning: the model does not “remember” the example for later conversations. As soon as the conversation ends, the context is gone. One-shotting is a technique for the moment, not permanent training. Anyone who wants to permanently change the model’s behavior would actually have to retrain it — a significantly more elaborate process.

One-shotting in practice: products and expert discussions

When working with AI tools like ChatGPT, Claude, or similar systems, many users apply one-shotting intuitively, without knowing the term. You write: “Here is an example of how I want it: … Now do the same for: …” — that is one-shotting.

In companies that are building AI into their processes, the method is a fixed part of so-called prompt engineering — i.e. the discipline of steering models as reliably as possible through skillful formulations. Anyone who wants to automatically generate customer service responses, summaries, or code snippets typically tests various prompts against each other, including zero-, one-, and few-shot variants.

In research, the term mainly appears in benchmarks. There, one tests how well a model copes with minimal context — one-shot benchmarks thus measure how quickly a model “grasps” what is being asked. This is considered a yardstick for a model’s flexibility and generality: a strong model needs few hints. A weak one needs many.

Related Products

Latest News

Subscribe free. Unsubscribe the second it sucks.

High-signal news across AI, business, UX, and tech. Every morning.