The short version

Long-context prompts need information architecture. Put the documents before the final task, label each source clearly, and ask Claude to identify relevant support before drawing conclusions.

Why placement matters

In a short prompt, the boundary between source and instruction may be obvious. With large or multiple documents, interleaving questions and evidence creates ambiguity. Anthropic's guidance recommends placing long-form inputs near the top and the query after them; its tests found that end-positioned queries can improve quality for complex multi-document work.

Preserve document identity

Do not merge several sources into one anonymous wall of text. Use a consistent structure such as:

```xml

<documents>

<document index="1">

<source>Policy</source>

<document_content>...</document_content>

</document>

</documents>

<instructions>Compare the evidence and answer the question.</instructions>

`

Source labels make it easier to attribute claims and distinguish disagreement between documents.

Evidence before synthesis

For evidence-heavy work, ask Claude to locate the relevant supporting passages or findings first. The goal is not to reproduce large extracts in the final answer. It is to focus analysis on the right parts of the supplied material and retain traceability.

A reliable sequence

  1. Provide the complete source bundle.
  2. Give each document a boundary and source label.
  3. Place the task and decision criteria after the bundle.
  4. Identify relevant support by source.
  5. Synthesize the answer and distinguish facts from unresolved questions.

Common failure mode

A weak prompt inserts new instructions between documents, asks several questions before all evidence is present, and provides no source metadata. Claude must reconstruct both the document boundaries and the task.

Practical checklist

  • Put large inputs before the query.
  • Keep instructions outside the source containers.
  • Label every document.
  • Retrieve relevant support before synthesis.
  • Request source attribution in the output.
  • Separate confirmed findings from uncertainty.

Try it

Take a four-document review and design its prompt as a source bundle followed by one instruction block. Test whether every conclusion can be traced to a named document.