An e-commerce team writes product descriptions with a prompt that includes three example descriptions, all for one brand's running shoes. New descriptions for kettles and sofas now mention "breathable mesh", "30-day free returns" and the example brand's name. What is the best fix?
Show the answer and explanation
Correct answer: C, Use examples from varied categories with placeholder details, because when all three share one brand and category, the model treats their specific facts as part of the task.
Explanation Prompt Engineering
Few-shot examples teach format and tone, but the model cannot tell which parts are style and which are content unless you make it obvious. When all examples share one product type, brand and policy, the most likely continuation reuses those details: content leakage. Here it is also a factual risk, because "30-day free returns" may not be true for kettles or sofas.
The core fix is in the examples themselves; labelling and output checks add defence in depth:
- Diversify the examples: different categories, brands, lengths and selling points, so no detail looks like a constant of the task.
- Neutralise content: use clearly fictional names or placeholders such as
[BRAND]and[MATERIAL], so any copying is obvious and harmless. - Label them: wrap the examples in tags and state that they illustrate structure and tone only; every fact must come from the product data.
- Check outputs: flag descriptions that contain distinctive example phrases (n-gram overlap) or claims absent from the product data.
Why the other fixes fail: greedy decoding always picks the most likely continuation, and copying is often exactly that. More examples of the same product strengthen the pattern instead of breaking it. Position does not stop copying: the model attends to the whole context, and examples placed right before the output can be copied even more (recency bias).
Interview tip: test few-shot prompts on inputs that look unlike the examples (other categories, edge cases); leakage only shows up when the inputs differ from the demonstrations.