Claude Prompting Best Practices
Last reviewed
Correct answer: C. Providing one or two examples of the desired output to shape the response
Explanation
Few-shot prompting means showing the model worked examples of what you want instead of only describing it. You include one or two input-and-output pairs in the style you are after, then give the real input; the examples set the pattern and the model continues it. One example is often called one-shot and several few-shot or multishot, but the mechanism is the same.
It earns its place when the target is easier to show than to state. Tone, a house summary style, a particular row layout, the level of detail you consider sufficient — each takes a clumsy paragraph to describe and one example to convey exactly.
How many examples is a real question, and the answer depends on where you are working. Anthropic's consumer guidance is to start with one and add more only if the output still misses; its developer documentation suggests three to five for best results in a production prompt. Either way, make the examples resemble your actual case and vary them enough that the model copies the pattern rather than an accident in your sample.
Sources
“Examples are one of the most reliable ways to steer Claude's output format, tone, and structure.”
Practise 5 questions on this topic
Take Claude Prompting Best Practices — Timed Test (5 questions) — scored instantly, explanation for every question, no login.