RAG prompts integrate retrieved chunks into the LLM's context window. To prevent the model from ignoring context ('lost in the middle') or hallucinating outside the retrieved facts, prompts must define strict grounding boundaries, prioritize chunk ordering, and instruct the model to provide citations for every claim.
You are a customer support agent. Answer the question using ONLY the facts present in the <context_blocks> below.
<context_blocks> [Doc 1]: Refund policy: customers have 14 days to request a refund. </context_blocks>
Grounding Rules:
Question: Can I get a refund after 20 days?
Claude handles multi-document context very well. Order documents using XML tags like for stable grounding and citations.