Universal RAG Prompt Template
# INSTRUCTIONS
Answer the user's question using ONLY the
provided context documents. Follow these
rules strictly:
1. Base every claim on the provided context
2. Cite sources using [Source ID] after
each claim
3. If the context doesn't contain the
answer, say "Not found in provided
context"
4. Never combine context with outside
knowledge
5. Flag any ambiguities or contradictions
between sources
# CONTEXT DOCUMENTS
[A] {source_name} ({date}):
"{chunk_text}"
[B] {source_name} ({date}):
"{chunk_text}"
[C] {source_name} ({date}):
"{chunk_text}"
# USER QUESTION
{question}
RAG Prompt Checklist
□ Grounding constraint
"ONLY the provided context"
□ Citation requirement
"Cite using [Source ID]"
□ Fallback instruction
"If not found, say so"
□ Anti-hallucination
"Never use outside knowledge"
□ Labeled chunks
[A], [B], [C] with source metadata
□ Chunk ordering
Most relevant first and last
□ Conflict resolution
Priority rules if multi-source
□ 3-5 chunks maximum
Quality over quantity
Key insight: RAG prompt engineering is about trust engineering. Every technique in this chapter — labeling, citations, grounding constraints, conflict resolution — exists to make the answer verifiable and trustworthy. An uncited RAG answer is no better than a guess. A cited, grounded, conflict-flagged answer is a reliable tool.