Groundedness
An evaluation metric measuring whether an LLM's answer is supported by the retrieved context rather than the model's parametric memory.
What is Groundedness?
Groundedness is an LLM evaluation metric that checks whether an answer is supported by the retrieved context, rather than by the model's parametric memory. In RAG systems, it helps teams catch responses that sound correct but are not actually backed by the source material. (learn.microsoft.com)
Understanding Groundedness
In practice, groundedness asks a simple question: can we point to the retrieved passages that justify each claim in the answer? If the model adds details that are not present in the context, the response can be marked ungrounded even when it is plausible or factually true in the real world. That makes groundedness especially useful for retrieval-augmented generation, support assistants, and tool-using agents. (learn.microsoft.com)
Teams usually evaluate groundedness after retrieval and generation, because the score reflects how well the final response stays inside the evidence window. It is often paired with relevance and completeness, since an answer can be grounded but incomplete, or complete but weakly supported. The PromptLayer team treats groundedness as a practical guardrail for shipping answers that are both useful and source-aware. (learn.microsoft.com)
Key aspects of groundedness include:
- Source support: each major claim should be traceable to the retrieved context.
- Hallucination detection: unsupported additions lower the score, even if they sound reasonable.
- RAG fit: it is most useful when answers are expected to come from retrieved documents or tool output.
- Precision focus: groundedness emphasizes staying within evidence, not covering every possible detail.
- Judge-based scoring: many workflows use an LLM judge or rubric to score alignment with context. (learn.microsoft.com)
Advantages of Groundedness
- Reduces hallucinations: it flags answers that drift beyond the provided evidence.
- Improves trust: users are more confident when outputs stay tied to source material.
- Supports debugging: low scores can reveal retrieval gaps or answer synthesis issues.
- Fits production RAG: it gives teams a concrete quality check for knowledge-grounded assistants.
- Works with human review: it can complement manual spot checks and annotation workflows.
Challenges in Groundedness
- Judge variability: LLM-based scoring can differ across models and rubrics.
- Ambiguous context: weak or incomplete retrieval makes scoring harder and less stable.
- Edge cases: a response may be factually right but still ungrounded if the source set does not support it.
- Granularity issues: long answers can mix grounded and ungrounded claims in the same response.
- Pipeline dependency: poor retrieval upstream often leads to poor groundedness downstream.
Example of Groundedness in Action
Scenario: a customer support bot answers questions using an internal help center as its retrieved context.
If the context says returns are allowed within 30 days with a receipt, and the model answers, "You can return items within 30 days with your receipt," the response is grounded. If it adds, "and store credit is available for all orders," without that detail appearing in the retrieved passages, the groundedness score should drop.
That distinction is useful because the answer may still sound polished, but the unsupported clause can create policy errors or user confusion. Groundedness evaluation helps teams catch that before deployment. (learn.microsoft.com)
How PromptLayer Helps with Groundedness
PromptLayer helps teams track prompts, responses, and evaluation results in one place, so groundedness checks can be reviewed alongside the exact inputs that produced each answer. That makes it easier to compare prompt versions, inspect retrieval context, and iterate on RAG quality without losing the audit trail.
Ready to try it yourself? Sign up for PromptLayer and start managing your prompts in minutes.