About Guardrails¶
Use NeMo Guardrails to apply safety checks and content moderation to large language model (LLM) applications. Guardrails runs as an Inference Gateway (IGW) middleware plugin that evaluates user inputs and model outputs against configurable guardrail policies. It supports dedicated task models (such as content safety or topic control) and integrates directly into the inference pipeline through VirtualModels.
Guardrail configurations define which checks run, which models perform the checks, and how blocked content is handled. You wire a guardrail configuration onto a VirtualModel, and every inference request to that VirtualModel flows through the safety checks automatically — using the standard IGW OpenAI-compatible endpoint.
Concepts¶
- Architecture — How guardrails fits into the inference pipeline as IGW middleware.
- Guardrail Configurations — Define rails, models, and prompts.
- Running Inference — Make inference calls through a guarded VirtualModel.
- Running Checks — Evaluate messages against rails without running inference.
Tutorials¶
These tutorials walk you through common guardrail tasks using NeMo Guardrails.
- Deploy NemoGuard NIMs — Deploy NemoGuard NIMs in your environment.
- Content Safety — Detect and block harmful content with NemoGuard NIMs.
- Parallel Rails — Run input and output rails in parallel.
- Multimodal Data — Safety checks for multimodal data.
- Injection Detection — Detect SQL, XSS, and code injection.