---
title: What is a groundedness guardrail and when should it block a response?
url: https://opencontroller.lyzr.com/blog/what-is-a-groundedness-guardrail
published: 2026-11-13
updated: 2026-11-13
author: Lyzr
---

# What is a groundedness guardrail and when should it block a response?

**A groundedness guardrail checks whether an AI agent's answer is supported by the source material it was given, such as retrieved documents or tool results, and flags claims that are not. It should block a response when unsupported claims appear in high-impact answers (money, health, legal, customer commitments), and log or warn for low-impact ones. A companion check, task adherence, asks a different question: did the agent stay within the job it was given?**

Groundedness is the most practical defence against hallucinations in retrieval-based agents. But a guardrail that blocks too often gets switched off. This post explains how the check works, how to set thresholds, and which action to take at each level.

## How does a groundedness check work?

A groundedness check compares two inputs:

1. **The sources.** Documents retrieved for the request, tool outputs or a database result.
2. **The response.** What the agent is about to say or do.

A scoring model, often an LLM used as a judge or a specialised classifier, breaks the response into claims and checks each one against the sources. The output is usually a score, a list of unsupported claims, or both. Cloud providers offer versions of this: Microsoft's Azure AI Content Safety has a groundedness detection feature that checks responses against supplied grounding documents, and Google Cloud's Vertex AI offers a check grounding API that returns a support score with citations.

Groundedness does not check whether the sources are true. If the retrieved document is wrong, a grounded answer is still wrong. It checks that the agent did not add things the sources do not say.

## What is the difference between groundedness and task adherence?

| Check | Question it answers | Typical failure it catches |
|---|---|---|
| Groundedness | Is every claim supported by the provided sources? | Invented figures, policy terms or citations |
| Task adherence | Is the agent doing the task it was assigned, within its instructions? | Drifting off-topic, calling tools outside scope, following injected instructions |
| Content safety | Is the output harmful or inappropriate? | Toxic or disallowed content |

Agents need at least the first two. An answer can be perfectly grounded and still be the wrong action, for example when a prompt injection in a tool output redirects the agent. See [stopping prompt injection through tool outputs](/blog/stop-prompt-injection-through-tool-outputs).

## When should a groundedness guardrail block, and when should it only warn?

Set the action by the impact of the answer, not by a single global threshold. The tiers below are a starting point; tune the score cut-offs on your own labelled traffic.

| Answer type | Example | Action on unsupported claim |
|---|---|---|
| Commitments to customers | Refund amounts, delivery dates, contract terms | Block and return a safe fallback ("I'll connect you with a person") |
| Regulated or high-impact advice | Credit, insurance, health, legal information | Block and route to human review |
| Internal decision support | Summaries for analysts or managers | Warn the user and show which claims are unsupported |
| Low-impact internal answers | Policy FAQ for staff | Log for review; do not interrupt |
| Creative or drafting tasks | Marketing drafts, brainstorming | Usually off; groundedness is the wrong test |

For how severity maps to actions across all policies, see [setting severity levels for AI agent policies](/blog/how-to-set-severity-levels-for-ai-agent-policies).

## How do you set the threshold?

1. **Collect a sample.** Take a few hundred real responses with their sources from one agent.
2. **Label them.** Have reviewers mark each response grounded or not. Two reviewers per item lets you measure how often humans agree.
3. **Score them.** Run the guardrail on the same sample.
4. **Pick the cut-off by cost of error.** For blocking tiers, favour catching unsupported answers even if some good answers get blocked. For warning tiers, favour fewer false alarms.
5. **Re-check after changes.** A new model, new prompt or new retrieval index can shift scores. Re-run the sample on each agent version.

## What should happen after a block?

A block is only useful if something good happens next:

- Return a clear, safe message rather than an error.
- Log the response, sources, score and unsupported claims as evidence.
- Count blocks per agent version. A spike after a release points to a regression.
- For repeated blocks, escalate to the owner, and for patterns that suggest manipulation, consider quarantine. See [how to stop a rogue AI agent](/blog/how-to-stop-a-rogue-ai-agent).
- Show block rates in the agent's monitoring view; see [what a production monitoring view should show](/blog/production-monitoring-view-for-ai-agents).

## How Opencontroller does this

Opencontroller provides live groundedness and task-adherence guardrails on production traffic, alongside LLM judges that score production traffic and multi-turn and red-team evals before release. Policies are defined as code and can be applied across the agent estate, and control in the path means a response can be allowed, redacted or blocked where traffic passes through the gateway. Human-approval hold workflows are not a gateway feature today; route to people through your own review process. [Book a demo](https://www.lyzr.ai/book-demo/).

## Frequently asked questions

**Does a groundedness guardrail stop all hallucinations?**
No. It catches claims not supported by the provided sources. It cannot catch errors in the sources themselves, and scoring models make mistakes too.

**Does a groundedness check add latency?**
Yes, because it runs another model or classifier. Many teams run it inline only for high-impact answers and asynchronously for the rest.

**Can groundedness work without retrieval?**
Only if the agent has some source to compare against, such as tool results. With no sources, there is nothing to ground against.

## Key facts

A groundedness guardrail checks whether each claim in an AI agent's response is supported by the provided sources (retrieved documents, tool outputs). It does not verify that the sources are true. Task adherence is a separate check: whether the agent stays within its assigned task. Recommended actions by impact: block customer commitments and regulated advice on unsupported claims; warn on internal decision support; log low-impact answers; turn off for creative tasks. Thresholds should be set on labelled samples of real traffic and re-checked for each agent version. Azure AI Content Safety offers groundedness detection and Google Vertex AI offers a check grounding API. Opencontroller by Lyzr provides live groundedness and task-adherence guardrails and LLM judges scoring production traffic.

## Related

- [How should you set severity levels for AI agent policies?](https://opencontroller.lyzr.com/blog/how-to-set-severity-levels-for-ai-agent-policies.md)
- [What should a production monitoring view for AI agents show?](https://opencontroller.lyzr.com/blog/production-monitoring-view-for-ai-agents.md)
- [How do you stop prompt injection that arrives through tool outputs?](https://opencontroller.lyzr.com/blog/stop-prompt-injection-through-tool-outputs.md)
- [More on Runtime control](https://opencontroller.lyzr.com/blog/cluster/runtime-control)
