Promptea

Prompts for Claude: XML tags, extended context, and structured reasoning

How to write prompts that take advantage of Claude's XML tag support, large context window, and careful, citation-aware reasoning.

What makes Claude different
  • Claude responds well to XML tags for structure: <instructions>, <context>, <output>, <rules>.
  • Large context window: you can paste long documents and ask questions at the end without truncation.
  • Tends to be careful about uncertainty — it flags when something is unclear rather than guessing.
  • Follows nuanced instructions well: numbered lists of rules, precedence between rules, exceptions.
Patterns that work well with Claude
  • Use XML tags to separate context from instructions — this reduces confusion on long prompts.
  • Put the task at the end, after all context — Claude processes what it has before answering.
  • Number your rules (1, 2, 3...) and state which takes priority if they conflict.
  • Ask Claude to think step by step before giving a final answer on complex tasks.
  • Request citations or quotes from the pasted document to ground answers in the source.
Templates
Document Q&A with citations
<instructions>
Answer questions about the document below. Follow these rules:
1. Base every answer strictly on the document — do not add outside knowledge.
2. Quote the relevant passage (max 2 sentences) before each answer.
3. If the answer is not in the document, say "Not found in document."
4. If the question is ambiguous, ask one clarifying question before answering.
</instructions>

<document>
[paste document here]
</document>

<question>
[your question]
</question>
Opens on home with the prompt prefilled.
Open in Promptea
Structured analysis with competing viewpoints
<instructions>
Analyze the topic below from two opposing perspectives.
Rules:
1. Steel-man both sides — represent each as its best advocate would.
2. Do not express a personal preference.
3. End with: the single most important fact a decision-maker needs.
Output format: use the XML tags below.
</instructions>

<topic>
[describe the decision, question, or situation]
</topic>

<output_format>
<perspective_a>
[strongest case for position A]
</perspective_a>
<perspective_b>
[strongest case for position B]
</perspective_b>
<key_fact>
[the one thing that matters most]
</key_fact>
</output_format>
Opens on home with the prompt prefilled.
Open in Promptea
FAQ
Do I need to use XML tags with Claude?
No, but they help on longer prompts. When context and instructions are mixed in plain text, Claude may blend them. XML tags create clear boundaries the model respects reliably.
How long a document can I paste into a Claude prompt?
Claude's context window supports hundreds of pages. For practical accuracy on Q&A, shorter focused documents work better than dumping an entire book. If you have a large document, extract the relevant sections first.