Few-shot prompting includes a handful of worked examples in the prompt so the model can infer the pattern. Zero-shot prompting provides none. Examples improve consistency and output format, but every example adds input tokens - so measure the quality gain against the added cost.

Why it matters

Examples communicate format and intent faster than prose instructions, often replacing several paragraphs of rules. The trade-off is input tokens: every example is billed on every request.

How it works

Few-shot prompting places input/output pairs in the prompt and lets the model infer the pattern, then applies it to the real input. Zero-shot provides no examples and relies on instructions alone.

Example

Provide three input-to-label pairs, then the real input; the model infers the classification pattern from the examples.

← Back to the full glossary

Put the platform behind the terms

Route, evaluate, and monitor every AI request from one OpenAI-compatible platform.

Start Free → Explore the Features