Hallucination protection
Updated on 3 November 2026.
Score model responses for hallucinations and monitor or block them above a confidence threshold. Runs at the response stage.
Configure this control
Choose the mode used by your gateway. When the Policy Engine is on, published rules govern this control; classic values saved through Edit anyway apply only after the engine is disabled. See What happens to classic settings.
- Classic settings
- Policy Engine
Classic hallucination check
Open Settings > AI Gateway > LLM Gateway > your app > Configure > Guardrails, then use Hallucination check. This app setting uses a fixed threshold of 0.8. For a tunable threshold or scoped exceptions, use the Policy Engine.
Where it is configured
Open Govern > Policy Engine > LLM Gateway > Controls > Hallucination Protection. Start from a recipe or a section's add menu, choose Applies to, set protection or a tag rule, then Save to draft. Test the rules before Review & publish. The policy sections and settings are described below.
Sections
Applies on bedrock, chat, responses and vertex, and only to non-streaming responses. Streaming responses cannot be blocked, so they are not checked.
Settings
Open a recipe or the add menu in Protection to set:
Follow-up rules
Open the add menu in Tag findings to set a follow-up rule. When is one of: a hallucination is detected, the score is at least (0 to 1), or the risk level is (Low, Medium, High). The rule then tags a severity. The highest severity among matching rules is reported.
Scoping and advanced scenarios
- Applies to: Everyone, People, Smart group, Application, App tag, Requested model, Provider, API surface, Environment, Tool, Source network, or Except....
- Threshold: the lowest positive matching threshold applies, whatever its priority. A narrower scope cannot raise that threshold; a value of zero is treated as no threshold.
- Action and risk level follow the highest-priority matching configuration.
- On/Off, action and rating use highest priority; On, Block and the higher rating win equal-priority ties. An Off exception must outrank the On rule.
- Need to key protection off attachment types, streaming or a metadata field? Use Add configuration.
For example, block likely hallucinations for one customer-facing app while the rest of the tenant only monitors, or set a lower (stricter) threshold for one Smart group. Start at Monitor, then move the action or the threshold:
runs on responsepriority 500
Related
- Security guardrails - the basic per-app hallucination check.
- Policy Engine overview