OpenPrompts
← Back to catalog
NVIDIAGuardrailsSafety & Moderation

Sensitive Data Detection (NeMo Guardrail)

INPUT RAILS flow detect sensitive data on input """Check if the user input has any sensitive data.""" $has_sensitive_data = await DetectSensitiveDataA

# INPUT RAILS

flow detect sensitive data on input
  """Check if the user input has any sensitive data."""
  $has_sensitive_data = await DetectSensitiveDataAction(source="input", text=$user_message)

  if $has_sensitive_data
    bot inform answer unknown
    abort


flow mask sensitive data on input
  """Mask any sensitive data found in the user input."""
  global $user_message
  $user_message = await MaskSensitiveDataAction(source="input", text=$user_message)


# OUTPUT RAILS


flow detect sensitive data on output
  """Check if the bot output has any sensitive data."""
  $has_sensitive_data = await DetectSensitiveDataAction(source="output", text=$bot_message)

  if $has_sensitive_data
    bot inform answer unknown
    abort


flow mask sensitive data on output
  """Mask any sensitive data found in the bot output."""
  global $bot_message
  $bot_message = await MaskSensitiveDataAction(source="output", text=$bot_message)


# RETRIEVAL RAILS


flow detect sensitive data on retrieval
  """Check if the relevant chunks from the knowledge base have any sensitive data."""
  $has_sensitive_data = await DetectSensitiveDataAction(source="retrieval", text=$relevant_chunks)

  if $has_sensitive_data
    bot inform answer unknown
    abort


flow mask sensitive data on retrieval
  """Mask any sensitive data found in the relevant chunks from the knowledge base."""
  global $relevant_chunks
  $relevant_chunks = await MaskSensitiveDataAction(source="retrieval", text=$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-04-08
#guardrail#nemo#rails#colang