Few-shot prompting
Showing the model a few examples of what you want before asking it to do the same thing.
The fuller definition
Few-shot prompting includes a small number of examples showing the desired task behavior or output pattern.
- Example one
Proposal stays a proposal
- Example two
Agreement has support
- New input
Apply the demonstrated distinction
A simplified relationship, not a screenshot or a complete design.
A concrete example
Provide two fictional examples distinguishing a proposed date from an agreed date before asking for extraction.
The distinction that matters
Examples supplied as context do not ordinarily update model weights; their facts should not leak into the new answer.
Related terms
Prompt
What you give a model to guide its reply. This may include a question, rules, and source text.
Training & generationFine-tuning
More training on a chosen set of examples. It changes a model to suit a task or style.
FoundationsContext window
How much text the model can hold in mind at once: your question, the documents you added, and the conversation so far. Anything outside it is invisible to the model.
Where it is taught
Give AI a brief it can actually followSource and further reading
Anthropic · Context engineeringThe definition and example are written for this library. The link gives background, official documentation or legal authority as labelled. Legal scope depends on the jurisdiction and current text; product features depend on release and settings.