Few-shot prompting is one of the simplest, most reliable ways to get consistent output in a specific format, and it works by showing rather than describing what you want.
Rather than describing the format you want in words, few-shot prompting includes a small number of concrete examples of the input-output pattern directly in your prompt, then asks the model to continue that pattern on new input.
Our collection of prompt examples covers the same principle: a concrete example of the tone or format you want consistently outperforms an adjective-based description, since “professional” means something different to every reader.
Consistent data extraction or classification needing a very specific structure. Matching a particular tone hard to describe precisely in words. Batch processing many similar items where consistency matters more than any single result. You don’t need dozens of examples, two or three well-chosen ones typically get the job done.
When you need consistent, specific output, show a couple of examples rather than describing what you want. See Anthropic’s own documentation for more depth.




