An architect is designing a system prompt for a technical writing assistant that must produce output in a strict XML schema for downstream XML parsing. The schema requires <title>, <summary>, <steps>, and <caveats> elements. During evaluation, Claude occasionally omits the <caveats> element when no obvious caveats exist. What prompt engineering technique most reliably prevents this omission?
Select an answer to reveal the explanation.
Short Explanation and Infographic
Here's the deal — b is correct because the omission occurs when the model reasons that an empty or inapplicable element should be excluded. Providing an explicit instruction with a specified placeholder value ('<caveat>None identified</caveat>') closes this reasoning gap — the model now has a defined valid output for the null case and no longer needs to decide whether to omit the element.
Full explanation below image
Full Explanation
B is correct because the omission occurs when the model reasons that an empty or inapplicable element should be excluded. Providing an explicit instruction with a specified placeholder value ('<caveat>None identified</caveat>') closes this reasoning gap — the model now has a defined valid output for the null case and no longer needs to decide whether to omit the element. This makes schema compliance deterministic. C is wrong because all-caps emphasis is not a reliable mechanism; it draws attention but does not provide the model with a resolution for the null-content case that causes the omission. A is wrong because switching to JSON does not inherently produce more reliable schema adherence; Claude can omit required JSON keys just as easily as XML elements, and changing the format adds a migration cost. B is wrong because few-shot examples with non-trivial caveats reinforce the model's tendency to only include caveats when meaningful content exists; they do not teach the placeholder pattern for the zero-caveat case.