# How should I organize a Claude prompt that includes long source documents?

Exam: CCAR-F — Claude Certified Architect - Foundations (CCAR-F)
Knowledge domain: Prompt Engineering & Structured Output
Updated: 2026-11-25T09:22:58.965184+00:00
HTML: https://learningpathx.com/faq/CCAR-F/ccarf-long-document-prompt-layout.html

## Also asked as

- Where should I put the documents and question in a long Claude prompt?
- How do I use XML tags and source identifiers when giving Claude several documents?

For long-document work, place the supplied documents before the task query and task-specific instructions in the prompt. Give each document a visible boundary and a stable source identifier so Claude can refer to evidence that the application can look up. Keep trusted system policy at its designated instruction boundary.

For example, place each excerpt inside a `<document>` element with `<source>` and `<document_content>` children. Keep examples and variable inputs in separately named sections. Ask for the source ID alongside each finding and verify that it resolves to the supplied material. Label retrieved text and user-supplied excerpts as data. When an API client is returning a tool’s response, keep it in its `tool_result` block. XML tags help Claude understand the layout. Enforce access and action permissions in the application that retrieves evidence and executes tools.

[Anthropic’s prompting best practices](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/claude-prompting-best-practices) · [Handling untrusted tool results](https://platform.claude.com/docs/en/agents-and-tools/tool-use/handle-tool-calls#handling-results-from-client-tools)

Source: [Prompt Contracts, Examples, and Multi-Stage Claude Workflows](https://learningpathx.com/news/prompt-contracts-examples-and-multi-stage-claude-workflows.html)
