A developer has a prompt with five components: instructions, background context, three retrieved documents, user query, and output format specification. Which approach structures this prompt most effectively?
Answer: Use XML tags for each component: <instructions>, <context>, <documents>, <user_query>, <output_format>
XML tags create explicit semantic boundaries between components that Claude's training has associated with specific roles in a prompt. With five distinct components, XML structure prevents the model from misattributing content from one section (e.g., treating retrieved document content as instructions). Dividers with headers (A) provide some structure but weaker semantic boundaries than XML. Continuous prose (B) creates maximum ambiguity — the model must infer where instructions end and context begins. System/user split (D) is a valid technique for some cases but doesn't address the structuring of multiple components within each turn.