---
title: Hallucination (NeMo Guardrail)
type: guardrail
provider: nvidia
category: safety
source: 'https://github.com/NVIDIA-NeMo/Guardrails'
license: Apache-2.0
tags:
  - guardrail
  - nemo
  - rails
  - colang
dateAdded: '2025-09-06'
featured: false
origin: official
language: en
description: >-
  flow bot inform answer unknown bot say "I don't know the answer to that." flow
  hallucination warning """Warning rail for hallucination.""" bot said so
---

```coffee
flow bot inform answer unknown
  bot say "I don't know the answer to that."

flow hallucination warning
  """Warning rail for hallucination."""
  bot said something
  if $hallucination_warning == True
    $is_hallucination = await SelfCheckHallucinationAction()
    global $hallucination_warning
    $hallucination_warning = False

    if $is_hallucination
      bot inform answer prone to hallucination

flow bot inform answer prone to hallucination
  bot say "The previous answer is prone to hallucination and may not be accurate. Please double check the answer using additional sources."
  or bot say "The above response may have been hallucinated, and should be independently verified."


flow self check hallucination
  """Output rail for checking hallucinations."""
  if $check_hallucination == True
    $is_hallucination = await SelfCheckHallucinationAction()
    global $check_hallucination
    $check_hallucination = False

    if $is_hallucination
      if $system.config.enable_rails_exceptions
        send SelfCheckHallucinationRailException(message="Hallucination detected. The previous answer may not be accurate")
      else
        bot inform answer unknown
      abort
```
