One-Shot vs Multi-Shot Prompting in Claude Explained?
Sample input/output pairs define one-shot or multi-shot prompting for guiding Claude reliably—distinguish it from clarity, iteration, or XML for certification success.
Question
Providing sample input/output pairs to guide AI responses describes which prompt engineering technique?
A. Being clear and direct
B. Iterative refinement
C. XML structuring
D. One-shot or multi-shot prompting
Answer
D. One-shot or multi-shot prompting
Explanation
Providing sample input/output pairs—such as “Input: ‘Weather today?’ Output: ‘Sunny, 75°F'” before your actual query—describes one-shot (single example) or multi-shot (multiple examples) prompting, a core technique that guides Claude by demonstrating the exact desired format, style, tone, or reasoning pattern through in-context learning, improving consistency without retraining. This differs from being clear and direct (A, basic instruction clarity), iterative refinement (B, repeated testing/editing process), or XML structuring (C, tagged output formatting like <response>content</response>).