Answer a question from your own documents only
Makes the model answer strictly from documents you provide, cite which one each fact came from, and admit when the answer is not there.
Answer the question using only the documents below.
<documents>
{{DOCUMENTS}}
</documents>
Question: {{QUESTION}}
Rules:
- Every factual sentence must end with a citation like [Doc 1] or [Doc 2, section 3].
- If the documents do not contain the answer, say "The documents do not say" and stop. Do not use outside knowledge.
- If documents conflict, show both and cite each.
- Quote exact wording for numbers, dates and rules.
Answer in under 150 words, then list anything related that the documents leave unclear.Example output
Answer: Staff get 25 days of leave plus bank holidays [Doc 2]. Unused days up to 5 can carry over to March [Doc 2, section 4]. Not found: the policy for part-time staff.
How to use
Label each document (Doc 1, Doc 2) before pasting. This is the same pattern a RAG system uses; for large collections, a vector database finds the right passages and this prompt answers from them.
Why it works
Mandatory citations make every claim traceable, and permission to say "the documents do not say" removes the pressure to make something up. This is retrieval-augmented generation done by hand.