When working with large documents or multiple sources, the order of your prompt matters. Anthropic’s testing shows that placing your query at the end of the prompt, after the reference material, can improve response quality by up to 30%, especially with complex, multi-document inputs.
Structure your prompts like this:
<documents>
<document id="1">
{Full text of document 1}
</document>
<document id="2">
{Full text of document 2}
</document>
</documents>
<instructions>
Based on the documents above, summarize the key differences
in their approach to error handling.
</instructions>
Why: Claude processes tokens sequentially. When the reference material comes first, Claude has already “seen” all the relevant context by the time it reaches your question. Ask the question first with documents below, and performance drops because Claude has to hold the question in memory while processing everything else.
Avoid this anti-pattern:
Question: What are the key findings?
Here is the paper: {10,000 words of text}
This is the opposite of what you want.