Claude is uniquely fine-tuned to respect XML hierarchies. Unlike other models that may get confused by complex paragraph breaks, Claude treats content inside <tags> as distinct logical blocks. This is particularly powerful for RAG (Retrieval Augmented Generation) where you might pass dozens of documents; wrapping each in a <document> tag allows Claude to differentiate their contents without cross-contamination.
When passing multiple data sources, using indexed tags like <doc id="1"> is scientifically proven to improve Claude's "Needle In A Haystack" performance. It allows the model's attention mechanism to 'anchor' its reasoning to specific structural markers, leading to much higher retrieval accuracy in large contexts (200k+ tokens).