#1★ TOP PICK
NVIDIA NeMo Guardrails
Write your policy as rails, in a language built for it.
92
OPEN SOURCEApache-2.0SELF-HOSTLOCAL-FIRST
NeMo Guardrails lets you define conversational policy in Colang, a purpose-built language for expressing what a bot may and may not do — topics it must refuse, flows it must follow, checks that run before a response reaches the user. That is a different and more useful primitive than a content classifier: your policy is usually about your domain, not about universal categories. It supports input, output, dialogue, retrieval and execution rails, runs entirely on your infrastructure, and is Apache-2.0.
Strengths
- +Express domain-specific policy directly, not via fixed categories
- +Rails at every stage: input, dialogue, retrieval, execution, output
- +Runs fully on your infrastructure — nothing leaves the network
- +Apache-2.0, backed by NVIDIA
Trade-offs
- −Colang is a new language to learn
- −Rails that call a model add latency of their own
- −Weaker out-of-the-box classification than a trained moderation model
Free and Apache-2.0. Runs wherever you run it. #2
Microsoft Presidio
Find and redact personal data before it reaches the model — or the logs.
94
OPEN SOURCEMITSELF-HOSTLOCAL-FIRST
Presidio is Microsoft's open-source PII detection and anonymisation toolkit, and it solves the guardrail problem most teams discover last: personal data flowing into prompts, and from there into a provider's logs and possibly their training data. It detects a wide range of entity types across text and images, supports custom recognisers for your own identifier formats, and offers redaction, masking and reversible pseudonymisation. MIT licensed, and it runs entirely locally — which is the only sane place to do this work.
Strengths
- +Purpose-built for the PII problem, and best in class at it
- +Custom recognisers for your own identifier formats
- +Reversible pseudonymisation as well as redaction
- +MIT and fully local — the data never has to move
Trade-offs
- −PII only — not a general safety or injection layer
- −Detection needs tuning per domain to avoid over-redaction
- −Adds a processing step before every model call
Free, MIT, from Microsoft's open-source organisation. #3
LLM Guard
A scanner suite for input and output. The fastest thing to put in front of an app.
93
OPEN SOURCEMITSELF-HOSTLOCAL-FIRST
LLM Guard from Protect AI is a collection of composable scanners covering the practical threat surface: prompt injection, jailbreak attempts, personal data, toxicity, secrets in prompts, code detection, relevance and refusal detection on output. You choose which scanners to run and in what order, and it sits as a layer in front of and behind the model. MIT licensed, self-hosted, and the quickest of these to add to something already running.
Strengths
- +Broad scanner set covering both input and output threats
- +Compose only the checks you need — each is independent
- +Straightforward to insert into an existing application
- +MIT, fully self-hosted
Trade-offs
- −Model-based scanners need their own compute
- −Every added scanner adds latency
- −Thresholds require real tuning to avoid false positives
#4
Guardrails AI
Validate and repair model output against a specification you define.
91
OPEN SOURCEApache-2.0SELF-HOSTLOCAL-FIRST
Guardrails AI approaches the problem from the output-correctness side: you declare what a valid response looks like — structure, types, value ranges, custom validators — and it verifies output against that specification, re-asking the model when validation fails. Its Hub carries a library of shareable validators, from PII detection to toxicity to domain-specific rules. Apache-2.0. Where NeMo governs conversation, this governs output shape.
Strengths
- +Declarative output specification with automatic re-asking on failure
- +Validator Hub — many checks are already written
- +Strong fit for structured-output pipelines
- +Apache-2.0
Trade-offs
- −Re-asking on failure costs extra tokens and latency
- −Less suited to conversational safety than NeMo
- −Validator quality on the Hub varies
Free and Apache-2.0; an optional hosted service exists. #5
Llama Guard
The strongest classifier here — but read the licence before you ship it.
72
SOURCE-AVAILABLELlama Community License (source-available)SELF-HOSTLOCAL-FIRST
Llama Guard is Meta's safety-classification model family, fine-tuned to classify prompts and responses against a configurable taxonomy — and unusually, the taxonomy is a parameter you can edit rather than a fixed list, so your categories can be your own. As a purpose-trained model it outperforms rule-based scanners on nuanced content. The caveat we will not bury: it ships under Meta's Llama Community License, not an OSI-approved open-source licence. It is free for most use but carries acceptable-use terms and a scale threshold, so it is not open source in the sense the rest of this list is.
Strengths
- +Best classification quality of the options here
- +Editable taxonomy — your safety categories, not a vendor's
- +Runs entirely on your own hardware
- +Classifies both prompts and responses
Trade-offs
- −Not open source — Llama Community Licence with acceptable-use terms
- −Licence carries a monthly-active-user threshold; check it applies to you
- −Needs GPU capacity alongside your main model
Free to download and run under Meta's community licence terms.