LLM fundamentals

One-shot prompting

Also known as One-shot prompting concept, LLM One-shot prompting

By WeavePublished 2 min read

Definition

One-shot prompting is a language-model concept about representation and similarity. It names a mechanism, representation, prompting pattern, decoding control, or context behavior that can change how an AI system processes input and produces output.

What One-shot prompting means

One-shot prompting is a language-model concept about representation and similarity. It names a mechanism, representation, prompting pattern, decoding control, or context behavior that can change how an AI system processes input and produces output. The important distinction is between a model setting or interface label and the behavior a user can observe. The same concept can have different effects across model families, tokenizers, prompts, datasets, and serving interfaces. A useful explanation states what the concept changes, which inputs it depends on, and what evidence would support a claim about it.

How it appears in practice

Consider an engineering assistant that receives a repository question, selects context, and returns a proposed change. One-shot prompting may influence one stage of that interaction, while the final result also depends on model version, instructions, tools, stopping rules, and review. Preserve those conditions when comparing runs. If the concept is internal, use an external task or evaluation to test its practical effect instead of assuming that a score or setting has a simple meaning.

Example and measurement

A team could evaluate One-shot prompting with ordinary requests and boundary cases. Define expected behavior before running the comparison, then record completion quality, test results, latency, input and output tokens, retries, and correction effort. For example, a code workflow should include real repository context and a verification step rather than judging a fluent standalone answer. Inspect changed cases individually because aggregate averages can hide regressions in a critical task.

Limitations

One-shot prompting is not a substitute for testing, source review, or authorization. Results can shift after a model update, prompt change, data change, or provider change. The concept may explain one part of a request without proving that the answer is factual, safe, or useful. Document the exact implementation and evaluation conditions when using One-shot prompting to make quality, cost, or routing decisions.

How this relates to Weave

Weave Token Intelligence makes One-shot prompting measurable alongside model calls, prompt versions, token usage, latency, and engineering outcomes. Compare controlled changes on representative work and keep the evidence and uncertainty visible.

Explore Token intelligence

Sources and further reading

  1. OpenAI Prompt Engineering Guide