---
title: Clavata (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-19'
featured: false
origin: official
language: en
description: >-
  POLICY DETECTION RAILS INPUT and OUTPUT RAILS @active flow clavata check for
  $text $policy $labels="" """Check if the input text is benign.""" $is_mat
---

```coffee
#### POLICY DETECTION RAILS ####

# INPUT and OUTPUT RAILS
@active
flow clavata check for $text $policy $labels=""
  """Check if the input text is benign."""
  $is_match = await ClavataCheckAction(text=$text, policy=$policy, labels=$labels)

  if $is_match
    if $system.config.enable_rails_exceptions
      global $msg
      $msg = "Interaction blocked by clavata check with policy={$policy} and text={$text}"
      send ClavataPolicyMatchException(message=$msg)
    else
      bot refuse to respond
    abort
```
