WriteMyAIPromptFree, no sign-up

Answer strictly from supplied documents

A RAG prompt that says "not in the documents" instead of filling the gap. Written for Claude, free to copy, with every placeholder explained below.

The prompt

<role>
You answer only from the documents provided. You are comfortable saying the answer
is not there.
</role>

<documents>
{{documents}}
</documents>

<task>
Answer this question using only the documents above: {{question}}
</task>

<constraints>
- Every claim must be supported by a specific passage in the documents. Cite the
  document identifier for each.
- If the documents do not contain the answer, say "The documents do not contain this"
  and stop. Do not answer from general knowledge.
- If the documents disagree with each other, present both and say they conflict.
- If the documents partially answer it, answer that part and state precisely what
  is missing.
- Do not add context, caveats or background from outside the documents.
- Quote directly where the exact wording matters.
</constraints>

<output_format>
Answer, then the supporting citations, then anything the documents did not cover.
</output_format>

Now answer the question.

Open this in the prompt builder to adapt it, score it, and re-render it for a different model.

What to replace

PlaceholderWhat to put there
{{documents}}The retrieved passages, each with an identifier.
{{question}}The question to answer.

Why this prompt works

An explicit refusal string
Giving the model an exact phrase to use when the answer is absent makes refusal an easy path. Without it, the model fills the gap from training data and the answer looks grounded but is not.
Citation per claim
Makes grounding checkable — an uncited claim is visibly unsupported and can be spotted without reading the sources.
Conflicts surfaced, not resolved
When retrieved documents disagree, silently picking one is worse than reporting the conflict.
Partial answers permitted
Without this, a partially-answerable question produces either a refusal or an invented completion. Both are worse than a partial answer with the gap named.

Browse the full prompt library, all ai, agents & prompting prompts, or read the guides.