AI Agents Evaluation RAG

Groundedness Check Prompt

Verify a RAG answer is actually from its retrieved context — every claim traced to a retrieved passage, and any answer that outran its sources flagged.

Overview

RAG's whole promise is grounded answers, but a model will happily blend retrieved context with its own training and present the mix as sourced. This prompt checks groundedness specifically: it maps each part of the answer to the retrieved passage that supports it, flags claims with no supporting passage, and catches the case the system should have handled — answering confidently when the retrieved context didn't actually contain the answer.

How to use this resource

  1. Assemble the answer and its context

    Gather the RAG answer and the exact passages that were retrieved for it. Groundedness is judged only against the retrieved context, so include all of it.

  2. Open this resource in AI Output Validator

    Load the prompt into AI Output Validator and paste in the answer and the passages. The tool maps each claim to its supporting passage without you checking by hand.

  3. Review the per-claim mapping

    Read which parts of the answer trace to a passage and which have no support, including the case where it answered confidently without the context backing it.

  4. Feed the ungrounded claims back

    Use the unsupported claims to tighten the prompt or the retrieval, then re-run the check to confirm the answer stays within its sources.

Why This Works

  • Attributing each claim to a passage is the only real test of grounding
  • Catching confident-answer-without-context targets RAG's signature failure
  • Distinguishing 'wrong' from 'unsupported-but-right' isolates the retrieval problem

Best for

  • RAG systems and knowledge-grounded agents
  • Domains where an unsourced answer is dangerous
  • Evaluating retrieval quality and answer faithfulness together

Not for

  • Checking output against an arbitrary source — use the Hallucination Detection Prompt
  • Non-RAG generation with no retrieved context

Use cases

  • Verifying RAG answers are sourced, not invented
  • Catching answers that outran the retrieved context
  • Evaluating retrieval-augmented agents for grounding

FAQ

Why does the groundedness check mark a correct answer as NOT GROUNDED?

The RULES section treats answering when the retrieved context lacks the answer as a failure even if the answer is correct, and 'generally true but not in the context' as not grounded. So a claim the model pulled from its own training scores NOT GROUNDED under the OVER-REACH check regardless of factual accuracy, because groundedness measures sourcing, not truth.

How is the groundedness check prompt different from the hallucination detection prompt?

This one judges the answer only against the pasted RETRIEVED CONTEXT and runs the OVER-REACH check for RAG's signature failure — answering confidently when the passages didn't cover the question. The Hallucination Detection Prompt checks output against an arbitrary source. Reach for that one when there are no retrieved chunks to attribute claims to.

What do I need to paste in besides the answer for the groundedness check to work?

Paste all three INPUT blocks: RETRIEVED CONTEXT (the exact passages given to the model), ANSWER, and QUESTION. Without the full retrieved chunks, the ATTRIBUTION check has no passage to cite per claim and marks it NO-SUPPORT, giving you a false NOT GROUNDED. In AI Output Validator, the mapping is only as good as the context you supply.

More resources from AI Output Validator

Resources that pair well

Related tools

Projects that use this resource

Guides for this resource

Tip: Save time by exploring related resources and tools that integrate with this resource.