Definition
One-shot prompting provides a language model with exactly one worked example inside the prompt before asking it to handle the real input. It sits between zero-shot prompting, which supplies no examples, and few-shot prompting, which supplies several. The single demonstration shows the model the desired input-output pattern, anchoring its response in the right format and style.
How it works
A one-shot prompt typically pairs a natural-language description of the task with a single completed example, then presents the actual query. For instance, you might show one sentence rewritten in a formal tone, then ask the model to rewrite a second sentence the same way. Like all in-context approaches, the model learns the pattern at inference time without any change to its weights.
When to use it
One-shot prompting is a deliberate middle ground. A single example is often enough to lock in formatting or style while keeping the prompt short and the token cost low. It also reduces a subtle risk of multi-example prompts: that the model over-fits to incidental details of the examples rather than following the underlying instruction. A lone, well-chosen example gives guidance without over-constraining.
For simple tasks or highly capable models, one-shot prompting frequently matches the accuracy of larger few-shot prompts at a fraction of the context cost — a meaningful advantage for sovereign Bitcoiners running compact local models. It is one of the core shot-based methods within prompt engineering.
In Simple Terms
One-shot prompting provides a language model with exactly one worked example inside the prompt before asking it to handle the real input. It sits between…
