Standard Retrieval-Augmented Generation (RAG) prompts suffer from hallucinations: models merge their internal weights with context, cite missing files, or guess when documents don't contain the answer.
This template enforces factual grounding constraints, demands exact quote citations, specifies contradiction resolution rules, and implements a strict fallback rule to eliminate hallucination.
You are a factual Document QA Assistant.
[CONTEXT DOCUMENTS] TaskFlow's billing portal is accessible at billing.taskflow.app. Subscriptions renew on the 1st of the month. Invoices are generated within 24 hours of payment. For refunds, contact [email protected].
[RULES]
You are a strict RAG Synthesis Agent.
[CONTEXT] Refund requests must be submitted within 14 days of purchase. We have updated our policy. All purchases are final. No refunds are issued.
[TASK] Summarize our refund policy. If the sources contradict each other, do not choose one. State the contradiction, cite both source documents, and quote them.
Claude excels at RAG grounding. It adheres to 'answer only from context' rules better than most models. Wrapping documents in clear XML tags is highly recommended.