Prompt Engineering Fundamentals
Last reviewed
Correct answer: C. Vary the product areas and lengths across the eight, keeping the layout identical
Explanation
The principle — A model generalises from what the examples share. Anything common to all of them becomes part of the taught pattern, whether or not you intended to teach it — and with eight examples the signal is strong.
Why the key is correct — Two requirements are in play and they pull in different directions, which is what makes this worth thinking about. Anthropic asks that examples be diverse: cover edge cases and vary enough that the model does not pick up unintended patterns. Google asks the opposite for presentation, saying to make sure the structure and formatting of examples are the same to avoid responses with undesired formats, because showing the response format is one of their primary objectives. The resolution is that the two rules govern different axes. Content should vary — different product areas, different lengths, the awkward cases included — because that is what stops "billing" from being the pattern. Layout should not vary, because that is what keeps the output shape stable. Changing product areas across the eight removes the skew without spending the count you were told to hold fixed.
Why the others are wrong — Varying layout inverts Google's rule and would introduce an output-shape problem alongside the tagging one. Replacing examples with descriptions is a defensible experiment, but it gives up the demonstrated format that the examples are also supplying, when a narrower change fixes the actual fault. And adding an instruction that contradicts eight demonstrations is precisely the instruction-versus-example mismatch Google's checklist tells you to audit for: the prompt would then say one thing in prose and another eight times by demonstration.
Remember this — Diversity applies to what your examples say. Consistency applies to how they look.
Sources — Anthropic, Prompting best practices; Google, Prompt design strategies.
Sources
“Diverse: Cover edge cases and vary enough that Claude doesn't pick up unintended patterns.”
“Make sure that the structure and formatting of few-shot examples are the same to avoid responses with undesired formats.”
Practise 10 questions on this topic
Take Prompt Engineering Fundamentals — Timed Test 1 (10 questions) — scored instantly, explanation for every question, no login.