Structured prompt templates for privacy-safe work
A good prompt separates what you want from what you're giving the model. Long, unstructured prompts are where instructions get lost — the model can't tell where your request ends and the pasted email begins. Wrapping each part in a labeled block fixes that, and it pairs naturally with masked text: the placeholders live inside the document block, and a separate rule tells the model to leave them alone.
Try it here: the tool runs in an isolated frame and never sends your text anywhere. Open the full-size tool
Why XML tags?
Anthropic's documentation recommends XML-style tags for Claude prompts, and they work well with other models too. The tag names aren't magic keywords — any clear, consistent name works. What helps is:
- Clear boundaries.
<document>…</document>can't be confused with an instruction, even if the document itself contains imperative sentences. - Easy references. "Using the contract in <contract> tags…" is unambiguous.
- Parseable output. Ask for the answer inside
<answer>tags and you can extract it reliably.
When JSON is better
Use JSON when the input or output feeds into code: API calls, automation tools, spreadsheets. Ask for a specific schema and say "Return only valid JSON, no commentary." JSON is stricter but costs a few more tokens because of quotes and escaping.
The placeholder rule (add to every masked prompt)
<placeholder_rules>
Placeholders such as [PERSON_1] or [EMAIL_2] replace confidential data.
Keep every placeholder exactly as written in your answer; do not guess
or invent the real values.
</placeholder_rules>The Get Quiet Kit tool adds this automatically when "Tell the AI to keep placeholders" is checked.
1. Reply to a client email
<instructions>
Draft a reply to the email in <email>. Goals:
- Acknowledge the delay and give the new date: [DATE_1].
- Keep it under 150 words, warm but professional.
- Do not promise discounts.
Return only the reply text.
</instructions>
<placeholder_rules>
Keep all placeholders like [PERSON_1] unchanged.
</placeholder_rules>
<email>
{{paste masked email here}}
</email>2. Contract clause review
<role>
You are assisting an in-house lawyer. You are not giving legal advice;
you are flagging items for human review.
</role>
<instructions>
Review the clauses in <contract> from the perspective of [COMPANY_1]
(the customer). For each clause that is unusual, one-sided, or ambiguous:
1. Quote the clause number.
2. Explain the risk in one or two sentences.
3. Suggest alternative wording.
Put your findings in <findings> tags, highest risk first.
</instructions>
<contract>
{{paste masked contract text}}
</contract>3. Meeting notes → action items (JSON)
{
"instructions": "Extract action items from the transcript. Return only valid JSON matching the schema. Keep placeholders like [PERSON_1] unchanged.",
"schema": {
"summary": "string, max 3 sentences",
"decisions": ["string"],
"action_items": [
{ "owner": "placeholder or 'unassigned'", "task": "string", "due": "string or null" }
],
"open_questions": ["string"]
},
"transcript": "{{paste masked transcript}}"
}4. Debug a log or stack trace
Mask keys, tokens and passwords first. The API keys & secrets guide has a tool preset for logs.
<context>
Service: Node.js 20 API behind nginx. The error started after
yesterday's deploy. Hostnames and IPs are masked.
</context>
<logs>
{{paste masked logs}}
</logs>
<instructions>
1. Identify the most likely root cause.
2. List the evidence from <logs> that supports it.
3. Propose the smallest fix, then one way to verify it.
If the logs are insufficient, say what else you need.
</instructions>5. Summarize a long thread for an executive
<instructions>
Summarize the thread in <thread> for a busy executive.
Format:
- One-line bottom line.
- Up to 5 bullets: what happened, who owns what, what's blocked.
- One line: the decision needed from them, if any.
Keep placeholders unchanged.
</instructions>
<thread>
{{paste masked thread}}
</thread>6. Extract structured data from documents
<instructions>
From each invoice in <invoices>, extract: vendor, invoice_number,
issue_date, total, currency. Return a JSON array only.
If a field is missing, use null — never guess.
</instructions>
<invoices>
<invoice id="1">{{masked invoice 1}}</invoice>
<invoice id="2">{{masked invoice 2}}</invoice>
</invoices>7. Rewrite for tone without changing facts
<instructions>
Rewrite <draft> to sound calmer and more collaborative.
Do not add, remove or change any facts, numbers, dates or placeholders.
Return the rewrite in <rewrite> tags, then list any sentence you
weren't sure how to soften in <notes> tags.
</instructions>
<draft>
{{paste masked draft}}
</draft>Tips that make any template better
- Put long documents first, the question last when the input is very long — models tend to follow instructions placed near the end more reliably on long inputs.
- Say what "done" looks like: length, format, audience.
- Give permission to say "I don't know." It cuts down on invented details.
- Watch the token budget. The estimator in the tool shows how much of a typical context window your prompt uses; leave room for the reply.