nemo-guardrails

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

2|Updated Aug 15, 2026
One-click install
npx skills add https://github.com/Jensen-Yao/agents-skills --skill nemo-guardrails-jensen-yao
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: nemo-guardrails
Source: https://github.com/Jensen-Yao/agents-skills/tree/main/skills/nemo-guardrails
Command: npx skills add https://github.com/Jensen-Yao/agents-skills --skill nemo-guardrails-jensen-yao

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve? LLM applications in production face jailbreak attempts, hallucinated outputs, PII leakage, and toxic content. 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 patterns like "ignore previous instructions" before they reach the LLM. - Self-Check Input/Output: Validate user input toxicity and verify bot output for hallucinations using custom actions. - PII Filtering & Fact-Checking: Mask sensitive data with Presidio integration and verify factual claims against retrieval sources. - Use Case: A customer support chatbot needs to refuse illegal requests, mask user SSNs, and fact-check its answers. Define Colang flows for each rail and wrap the LLM with LLMRails to enforce all checks at runtime. ## Quick Start Install nemoguardrails with pip, then ask the agent to create a RailsConfig with input and output validation flows and wrap your LLM calls with LLMRails.

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 a RailsConfig using Colang syntax, then wrap your LLM with LLMRails. Calls to rails.generate() automatically apply input and output rails before and after model invocation.

How to detect jailbreak attempts with NeMo Guardrails?▼

Define user message patterns matching injection attempts like "ignore previous instructions" in a Colang flow, then map them to a refusal response. The rail blocks matching prompts before they reach the LLM.

NeMo Guardrails vs LlamaGuard for content moderation?▼

NeMo Guardrails is a programmable framework supporting multiple safety mechanisms including jailbreak detection, PII filtering, and fact-checking. LlamaGuard is a standalone moderation model that can be integrated as one rail within NeMo Guardrails.

Does NeMo Guardrails require a GPU to run?▼

No, NeMo Guardrails runs on CPU, though a GPU improves latency. An NVIDIA T4 with 4-8GB VRAM is recommended when integrating LlamaGuard; pattern-matching rails add under 1ms overhead.

Why do guardrails block valid user queries?▼

False positives occur when detection thresholds are too strict. Raise the jailbreak score threshold (for example from 0.5 to 0.8) in your Colang flow, or refine the user intent patterns to reduce overly broad matches.

How do I reduce latency from multiple safety checks?▼

Run checks in parallel using Colang's parallel block so toxicity, jailbreak, and PII checks execute concurrently. Typical total overhead is 100-500ms, with LLM-based checks taking 50-200ms each when serialized.