Skip to main content
← Back to techniques

One-shot prompting

Fundamentals

Level 1 · Foundations

Show the model exactly one worked example before asking it to repeat the pattern.

One-shot prompting sits between zero-shot and few-shot: a single input/output example demonstrates the exact pattern you want, which is often enough to remove ambiguity about format, style or scope that a plain instruction alone couldn't fully capture.

When to use it

Use it when the task is fairly simple but the output format, tone, or level of detail is hard to pin down in words alone — one good example usually resolves that ambiguity.

When to avoid it

Avoid it when the task has real variation across cases (multiple edge cases, several valid output styles): a single example can't represent that range and may even mislead the model toward matching it too literally.

Advantages

  • Removes format ambiguity with minimal extra tokens
  • Easier to write than a full few-shot set
  • Anchors tone and structure more reliably than an instruction alone

Disadvantages

  • A single example can bias the model toward that specific case — copying its facts or wording instead of just its pattern (the skeleton explicitly guards against this)
  • Doesn't capture edge cases or variation
  • Still less robust than few-shot for genuinely diverse inputs

Examples

Task: turn a product feature into a one-line marketing benefit.

Example:
Input: "512GB of storage"
Output: "Never worry about running out of space again."

Infer the underlying pattern from the example above — do not copy facts, wording, or details that are specific to the example itself.

Now apply the same pattern to:
"Battery lasts 3 days on a single charge"

Try it

Fill in the placeholders below and see the compiled prompt update live.

What you want to achieve.

The material to work from.

What the output should look like.

Who or what this is written for or about.

37
Words
243
Characters
0/4
Placeholders filled
1 min
Reading time
Quality score6
  • Completeness0
  • Clarity0
  • Context0
  • Specificity0
  • Constraints0
  • Format0
  • Output0
  • Constraints note0
  • Success criteria0
  • Scope focus100
  • Verification step0
  • Negative example0
  • Confidence0
  • Placeholder syntax100
  • Markdown structure0
Suggestions
  • Fill in the remaining placeholders.
  • Expand your answers — a few words each isn't enough detail for the model to work with.
  • Add background context so the model understands the situation.
Task: {{OBJECTIVE}} Example: Input: {{INPUT}} Output: {{OUTPUT}} Infer the underlying pattern from the example above — do not copy facts, wording, or details that are specific to the example itself. Now apply the same pattern to: {{TARGET}}
AI Assistant

Jump to a page…

Navigation