nemo-guardrails

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

13.0k|930|Updated Nov 3, 2025
One-click install
npx skills add https://github.com/Orchestra-Research/AI-research-SKILLs --skill nemo-guardrails-orchestra-research
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: nemo-guardrails
Source: https://github.com/Orchestra-Research/AI-research-SKILLs/tree/main/07-safety-alignment/nemo-guardrails
Command: npx skills add https://github.com/Orchestra-Research/AI-research-SKILLs --skill nemo-guardrails-orchestra-research

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 and Prompt Injection Detection: Block adversarial prompts using pattern matching and LLM-based checks defined in Colang flows. - Self-Check Input/Output Validation: Register custom actions to verify toxicity, factuality, and hallucination on both user input and bot output. - PII Filtering and Moderation Integrations: Mask sensitive data with Presidio and run Meta's LlamaGuard model for input/output moderation. - Use Case: A customer support chatbot receives a message containing a Social Security number and a jailbreak attempt. The rails mask the PII, refuse the injection, and let legitimate queries through with under 500ms overhead. ## Quick Start Add NeMo Guardrails to my chatbot so it blocks jailbreak attempts and masks PII in user messages.

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, then wrap your LLM with LLMRails and call rails.generate on user messages. The rails intercept unsafe input before it reaches the model.

How to detect jailbreak attempts with NeMo Guardrails?▼

Define a Colang flow matching jailbreak phrases like "Ignore previous instructions" and route them to a refusal response. You can also add LLM-based scoring and tune the threshold to reduce false positives.

NeMo Guardrails vs LlamaGuard for content moderation?▼

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

Does NeMo Guardrails support PII detection and masking?▼

Yes, it integrates with Presidio to detect and mask PII entities such as SSNs and email addresses in user messages. Define a mask pii subflow and enable the Presidio action parameter before processing.

Why do guardrails block valid user queries?▼

False positives usually come from an overly sensitive detection threshold. Raise the jailbreak score cutoff (for example from 0.5 to 0.8) in your flow, and parallelize checks to keep latency low while tuning accuracy.

What hardware is needed to run NeMo Guardrails?▼

It runs on CPU, but a GPU such as an NVIDIA T4 with 4-8GB VRAM is recommended when integrating LlamaGuard. Typical overhead is 100-500ms depending on how many LLM-based checks are enabled.