OpenPrompts
← Back to catalog
NVIDIAGuardrailsSafety & Moderation

Hf Classifier (NeMo Guardrail)

flow hf classifier check input $classifier $allowed = await HfClassifierCheckInputAction(classifier=$classifier) if not $allowed if $system.config.ena

flow hf classifier check input $classifier
  $allowed = await HfClassifierCheckInputAction(classifier=$classifier)

  if not $allowed
    if $system.config.enable_rails_exceptions
      send InputRailException(message="Input blocked by 'hf classifier check input' (classifier='{$classifier}').")
    else
      bot refuse to respond
    abort

flow hf classifier check output $classifier
  $allowed = await HfClassifierCheckOutputAction(classifier=$classifier)

  if not $allowed
    if $system.config.enable_rails_exceptions
      send OutputRailException(message="Output blocked by 'hf classifier check output' (classifier='{$classifier}').")
    else
      bot refuse to respond
    abort

flow hf classifier check retrieval $classifier
  $allowed = await HfClassifierCheckRetrievalAction(classifier=$classifier)

  if not $allowed
    $relevant_chunks = ""
Automated safety scan: no suspicious patterns found.

Heuristic text scan aligned to the OWASP Agentic Skills Top 10. How we scan

Provider
NVIDIA
Origin
Official
Type
Guardrails
License
Apache-2.0
Language
English
Added
2026-01-09
#guardrail#nemo#rails#colang