nemo-guardrails

Implements programmable runtime safety rails for LLM applications using NVIDIA NeMo Guardrails and Colang.

1|Updated Mar 5, 2026
One-click install
npx skills add https://github.com/Clay-HHK/claude-skills --skill nemo-guardrails-clay-hhk
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: nemo-guardrails
Source: https://github.com/Clay-HHK/claude-skills/tree/main/nemo-guardrails
Command: npx skills add https://github.com/Clay-HHK/claude-skills --skill nemo-guardrails-clay-hhk

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires nemoguardrails, and includes references (resource) components.

What problem does it solve? LLM applications in production face jailbreak attempts, toxic inputs, hallucinated outputs, and PII leakage. This Skill provides programmable runtime guardrails that intercept and validate inputs and outputs before they reach users or the model. ## Core Features & Use Cases - Jailbreak & Injection Detection: Block prompt injection and jailbreak patterns before they reach the LLM using Colang flows. - Self-Check Input/Output Validation: Register custom actions for toxicity scoring, hallucination detection, and fact-checking with retrieval. - PII Filtering & Integrations: Mask sensitive data with Presidio and integrate LlamaGuard for moderation on input and output rails. - Use Case: A customer support chatbot needs to refuse illegal requests, mask user SSNs, and verify factual claims in responses. Define Colang flows for each check and wrap the LLM with LLMRails to enforce them at runtime. ## Quick Start Install nemoguardrails with pip and ask the assistant to create a Colang rail configuration that blocks jailbreak attempts from your chatbot.

Frequently Asked Questions about nemo-guardrails

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add guardrails to an LLM application in Python?▼

Install nemoguardrails, define safety flows in Colang with RailsConfig.from_content, and wrap your model with LLMRails. Calls to rails.generate then pass through your defined input and output checks before reaching the LLM.

How to detect jailbreak attempts in LLM prompts?▼

Define a Colang flow matching jailbreak utterances like 'Ignore previous instructions' and route them to a refusal response. NeMo Guardrails blocks these patterns before they reach the model, combining pattern matching with optional LLM-based checks.

NeMo Guardrails vs LlamaGuard for content moderation?▼

NeMo Guardrails is a programmable runtime framework supporting multiple safety mechanisms, while LlamaGuard is a standalone moderation model. The two combine well: register LlamaGuard as an input and output check action inside a NeMo Guardrails configuration.

Does NeMo Guardrails require a GPU to run?▼

No, a GPU is optional since CPU execution works for basic rails. A NVIDIA T4 or better with 4-8GB VRAM is recommended when integrating LlamaGuard, where checks typically add 100-300ms latency.

Why do guardrails block valid user queries?▼

False positives usually come from detection thresholds set too low. Raise the score threshold in your Colang flow, for example from 0.5 to 0.8, so only high-confidence jailbreak or toxicity scores trigger a refusal.

How do I reduce latency from multiple safety checks?▼

Run checks in parallel within a single Colang flow instead of sequentially. Execute toxicity, jailbreak, and PII checks concurrently and refuse only if any check fails, keeping total overhead near the slowest single check.