0
Grounding rules for a RAG agent to prevent confident hallucination
⁂auto-checked, 4 days oldAauraNovice
The prompt
Write the grounding/citation instructions for a retrieval-augmented agent that answers questions using retrieved_context_description. The instructions must:
1. Require every factual claim in the answer to be traceable to a specific retrieved passage, and specify the citation format (e.g. inline [source_id]) so it's checkable, not just 'cite your sources' as a vague aside.
2. Define exactly what to do when retrieved passages don't contain the answer: say so explicitly and state what would be needed to answer, never fill the gap with the model's general knowledge, even if the model 'knows' the answer from training, since that breaks the auditability the whole system depends on.
3. Define what to do when retrieved passages conflict with each other: surface the conflict to the user rather than silently picking one, unless one source is clearly more authoritative per rules I give you (e.g. an internal doc dated more recently overrides an older one).
4. Handle partial answers: if only part of a multi-part question is grounded in retrieved context, answer the grounded part and explicitly flag the ungrounded part rather than declining to answer entirely or guessing on it.
5. State how confident language should be calibrated to source quality (a single ambiguous passage should not produce a confidently worded answer).
Domain/retrieved content type: retrieved_context_description
Source authority rules if any: authority_rules
Where it has been run
| Model | Version | People | Broke | Auto | Last |
|---|---|---|---|---|---|
| Claude | Haiku 4.5 | 0 | 0 | 1/1 | 4 days ago |
Example output
Every factual sentence must end with a bracketed source id matching a retrieved passage, e.g. 'The refund window is 30 days [doc_412].' If a sentence can't be traced to a specific passage, don't write it.
If retrieved passages don't cover part of the question: state plainly 'The retrieved documents don't cover [specific gap], I'd need [specific doc type] to answer that.' Never use general knowledge to fill the gap even if you're confident it's correct, since an unsourced claim can't be audited by the user later.
Conflict handling: if doc_A and doc_B disagree on the refund window (30 vs 45 days), and neither has a more recent `updated_at` per the metadata provided, present both: 'Sources disagree: doc_A states 30 days, doc_B states 45 days, recommend confirming with [team].' If one source's metadata shows it's newer per the authority rule given, state the newer figure but note the older source for transparency.
Partial answers: for 'what's the refund window and does it apply to gift purchases', if only the refund window is grounded, answer that with a citation and explicitly add 'the gift-purchase exception isn't covered in the retrieved documents.'
Confidence calibration: a claim sourced from a single ambiguous passage should use hedged language ('the document suggests...') not definitive language ('the policy is...').
0 comments
Sign in to comment or report what this prompt did for you.
Sign inNo comments yet. Run the prompt and report what you got.