Choosing a content safety model for NeMo Guardrails

Choosing a content safety model for NeMo Guardrails means weighing accuracy, latency, language coverage, GPU need and self-hosting options against your own policy and infrastructure. This page sets out how to decide.

On this page

Choosing a content safety model for NeMo Guardrails starts with your policy and infrastructure

Choosing a content safety model for NeMo Guardrails starts with two questions: what your policy says must be blocked, and where the judge model is allowed to run. NeMo Guardrails is the rail engine. It is an Apache 2.0 library, and the current release is 0.25.0, but the safety model is a separate choice. The rails call a judge, and the judge decides what counts as unsafe. Before comparing models on accuracy or latency, write down the categories you must enforce, the languages your users write in, the directions you must check (input, output, retrieval or tool results), and whether any request content may leave your network. Those answers narrow the field faster than any benchmark table.

A dedicated safety model is usually needed when the check must be consistent, fast and auditable across high request volumes. Self-check prompts, where the application LLM judges its own inputs and outputs, can be enough for simple policies on a capable model. They become weaker when the policy is detailed, when the application model is a reasoning model, or when you need stable results you can test and report. Verify this with your own evaluation set rather than assuming it. Also confirm how the NGC microservice sunset affects your hosting plan: NVIDIA's NeMo Microservices documentation says all new development has moved to NeMo Platform, so ask your NVIDIA account team which deployment path applies to you before you build around the container.

Treat the hosting constraint as the first filter. Ask each model vendor or your NVIDIA contact which license terms apply, whether weights can be downloaded for your GPUs or air-gapped sites, what GPU memory the chosen size needs, and which languages were evaluated. Then run a short test of your own prompts, including unsafe examples from your policy, on the two or three candidates that survive. Record accuracy, false positive rate and added latency per rail. That record becomes the evidence you need for a security review and for the decision to move to a dedicated model later.

What each candidate model is and where it fits

Each candidate below is a different way to make a safety decision inside NeMo Guardrails, from asking the application model to judge itself to running a dedicated classifier. The cards describe what each option is and what to confirm before you choose, because accuracy, language coverage and GPU needs vary by model and must be checked against each model's own documentation and your own test set.

Self-check prompts

Self-check rails ask the application's own LLM to judge an input or output against a written policy, using prompts you configure in NeMo Guardrails. No separate safety model needs to be served, which keeps the footprint small. The trade-off is that the same model that produces the answer also grades it, and the extra call adds latency to every request. Confirm how your chosen application model performs on your policy categories before relying on it for blocking decisions.

NeMo Guardrails docs

Nemotron Safety Guard

NVIDIA's multilingual safety model is a dedicated guard used for input and output content safety in NeMo Guardrails, with hosted and self-hosted options. Because it is purpose-built for classification, it avoids the self-judgment problem of self-check prompts. Confirm its language coverage, accuracy on your policy, and GPU sizing in NVIDIA's own model documentation, then test with your safe and unsafe prompt sets before you commit.

Llama Guard 3

Meta's Llama Guard 3 is an open safety classifier that you serve on your own GPUs and connect to input and output rails. Its policy categories and prompt format are part of the model's design, so review them against your acceptable use policy before production. Confirm the supported languages, the serving requirements and the license terms in Meta's model documentation, and measure its results on your own traffic.

ShieldGemma

Google's ShieldGemma is a safety classifier that answers a yes or no question about whether content violates a policy you define in the prompt. Its output parser and policy text determine most of its behavior, so the wording of your policy matters as much as the model choice. Confirm which model sizes exist, their hardware needs and their language support in Google's documentation, and check how it sits beside your other rails.

Reasoning guards

Reasoning safety models such as Nemotron Content Safety Reasoning and gpt-oss-safeguard produce a reasoning trace before a verdict, which can follow custom policies more closely but adds latency and token use. Their max_tokens budget must leave room for the trace, or every request can be blocked. Confirm reasoning modes, token budgets and GPU needs in each model's documentation, and measure the latency cost on your own workload.

Hugging Face classifiers

Prompt-free text classifiers from Hugging Face run as small models on input, output and retrieval rails without an instruction prompt. They are usually cheaper and faster per request than an LLM-based check, but they only cover the categories their training data supports. Confirm each model's labels, language coverage, license and hardware needs on its model card, and check whether its categories match your policy before you rely on it.

How the candidate models compare on the criteria that matter

This table compares six options for NeMo Guardrails on accuracy, latency, language coverage, GPU need and where each can be self-hosted. No measured figures are given here, so each cell names what to test on your own data and hardware or what to confirm in the model documentation. Use the last column to shortlist two or three options, then run them against your policy and traffic.

OptionAccuracy and latency to measureLanguage, GPU and hosting to confirmWhen it fits
Self-check promptsMeasure false positives on your benign traffic. Each check adds a call to the application LLM.Runs on the application LLM, so no separate guard GPU if that model is already served. Confirm its language support.Prototypes and simple policies where the application LLM already runs and a dedicated guard is not yet justified.
Nemotron Safety GuardMeasure recall on your unsafe prompts and latency on your serving stack, including NIM startup time.Confirm supported languages, GPU memory and hosted versus self-hosted NIM options in NVIDIA's documentation.Multilingual input and output checks where a dedicated safety model and GPU capacity are available.
Llama Guard 3Measure against your own policy categories, including refusals and borderline prompts.Confirm language coverage and GPU memory for the size you deploy in Meta's model documentation. Self-hosting is the usual path to test.Teams running guards on their own GPUs that want a widely used open guard model with published categories.
ShieldGemmaMeasure precision and recall at your chosen threshold. Keep the yes or no output parser under test.Confirm language coverage, GPU memory and hosting options for the size you deploy in Google's documentation.Teams that want a yes or no judge and will write and review their own policy text.
Reasoning guardsMeasure accuracy with reasoning on and off. Reasoning traces add latency, and the token budget can block every request if set too low.Expect a larger GPU need than classifiers. Confirm language coverage and deployment options for the exact checkpoint.Ambiguous or custom policies where explanations matter more than speed, after the token budget is tested.
Hugging Face classifiersMeasure precision, recall and latency on your labelled set and hardware. Small classifiers are often the fastest to test.Language coverage depends on the checkpoint. Confirm on the model card whether it runs on CPU or needs a GPU.High-volume checks with narrow categories where cost and latency matter most and labelled data exists.

How the decision path runs from policy to model choice

The path starts with a written content policy, since the policy defines what the model must catch. Next, the team asks whether the application LLM can judge its own inputs and outputs, or whether a dedicated safety model is needed. Language and modality needs then narrow the candidates, and GPU and hosting limits in your own infrastructure remove the rest. The last step is a labeled test set that every candidate must pass before any rail is enforced in production, with the results deciding the final model.

Decision path from a written policy to a tested model choice for NeMo Guardrails.

Which model fits a cloud, on-premises or air-gapped deployment

In a cloud GPU account, you control the virtual machines, storage, networking and identity, so the NeMo Guardrails server and any safety model you host stay inside your tenancy. The main question is whether each candidate model can be pulled into your account and served on GPUs under its license and container terms. NeMo Guardrails itself is Apache 2.0 licensed and can run as a Python library or as a server built from the Dockerfile it provides, so the rails layer can run on smaller instances while the safety model uses accelerators.

  • Library and server: The rails layer runs on Python 3.11, 3.12 or 3.13 and can sit on CPU instances, with GPU capacity reserved for the model.
  • Model hosting: Whether a given model can be served in your account depends on its license and container availability. Confirm both with the model owner before you size instances.
  • Managed moderation services: Third-party APIs send request content to the provider's network. Document that as an external data flow for your security review.
  • Microservice route: The NeMo Guardrails microservice container was sunset as of October 1, 2026, so new cloud builds should not depend on it.
  • Accelerator availability: Check GPU quotas and regional availability for the accelerator class each model needs before you commit to a region.

Before approval, confirm the model license terms for hosted use, the registry you pull images from, and whether your network policy allows model downloads at deploy time.

How to run a model bake-off before you commit

This sequence turns the choice of safety model into evidence from your own traffic, so you pick a model on measured false positives, false negatives and latency rather than on a vendor summary. Each candidate runs through the same labeled set and the same rail configuration, which makes the results comparable.

  1. Confirm the Python runtime and install the library

    Confirm the host runs Python 3.11, 3.12 or 3.13, since NeMo Guardrails 0.25.0 requires one of these versions. Install the nemoguardrails package from PyPI into an isolated environment and pin the version so every candidate is tested against the same library. The step is done when importing the package and printing its version succeeds on the test host. Your platform team owns this step, and the package is free under the Apache 2.0 license.

  2. Stand up the guardrails server or Python API

    Choose how the bake-off will call the rails: the Python API for scripted tests, or the guardrails server, which loads configurations from a folder and exposes an HTTP API. Create one shared configuration folder with a config.yml file, so every candidate uses the same application prompt, rail layout and refusal messages. The step is done when a request with a benign prompt returns a normal answer through the chosen interface.

  3. Deploy one candidate safety model

    Serve a single candidate model on hardware you control, such as Nemotron Safety Guard, Llama Guard 3, ShieldGemma or a Hugging Face classifier, and record its exact version, GPU type and inference backend. Do not run two candidates at once during this step, because shared GPU load distorts latency numbers. The step is done when the model endpoint answers a test request and you have written down its configuration in the bake-off log.

  4. Wire the candidate into an input rail

    Add the candidate to the input rail in config.yml and leave the application LLM and all other rails unchanged. Use the model's documented prompt and output parsing for the chosen rail type, and check the rail returns a clear block or allow decision for a known unsafe prompt and a known safe prompt. The step is done when both test prompts produce the expected decision and the rail's trace shows the safety model was called.

  5. Build a labeled set of safe and unsafe prompts

    Assemble prompts from your own traffic or red team work, covering each policy category your assistant must handle, plus borderline prompts that a reviewer would argue about. Have two reviewers label each prompt as safe or unsafe and resolve disagreements in writing, then hold out part of the set so you do not tune against the whole thing. The step is done when the set is versioned, every category has both safe and unsafe examples, and labels carry a reviewer note.

  6. Measure false positives, false negatives and latency

    Run the labeled set through the rail and record each decision, then calculate false positive and false negative rates per category, plus median and tail latency for the rail alone. Keep the request payload, concurrency and hardware identical across candidates so the numbers are comparable. The step is done when you have a results table per candidate that shows the misses and blocks a reviewer must inspect by hand.

  7. Repeat for the next candidate and compare

    Swap in the next candidate, keep the configuration and labeled set unchanged, and rerun the measurements. Compare the candidates side by side on accuracy by category, language coverage for the languages your users write in, GPU memory and where each model can be hosted under your constraints. The step is done when every candidate has the same results table and you can state which failures you would accept, and that decision is signed off by the owners of the risk.

  8. Record the decision and the evidence

    Write down the chosen model, its version and hosting setup, the labeled set version, the measured rates and latency, and the known misses with the mitigations you accepted. Keep this record with the configuration files so reviewers can trace why the model was chosen. The step is done when a colleague who did not run the tests can reproduce the chosen result from the record and the repository.

Security and data handling risks in the model choice

Each safety model option moves prompts, outputs and model artifacts differently, and the NeMo Guardrails microservice sunset changes who supports the path you pick. The cards below cover the questions to settle before a judge model touches production traffic: data flow, weight ownership, version pinning and support continuity.

Trace where prompts travel

A self-hosted judge keeps user prompts and model outputs inside your network, while a hosted or third-party check sends each request to an outside service. Map every rail that calls a model, including input, output and retrieval rails, and record the destination, retention terms and logging for each one. Confirm with the vendor where request payloads are stored and whether they are used for training.

NeMo Guardrails docs

Decide who holds the weights

Open-weight judges such as Llama Guard, ShieldGemma and Nemotron Safety Guard are downloaded and run by your team, so you own the artifact and its license terms. Hosted endpoints leave weight access and update timing with the provider. Write down who can download, store and replace each model file, and who signs off when a license or model card changes.

Pin and version the judge

A safety verdict can change when a model is replaced or re-quantized, so treat the judge as a versioned dependency. Pin the exact model revision, the NeMo Guardrails version and the prompt or policy text together, then rerun your safe and unsafe test set before every change. Keep the previous artifact available so you can roll back a judge that starts flagging too much or too little.

Current library release
0.25.0
NeMo Guardrails releases

Check the microservice sunset

NVIDIA has retired the NeMo Guardrails microservice container, and NVIDIA's archived documentation directs existing NeMo Microservices users to their account team. If your design relies on that container, plan a move to the open-source library or to the NeMo Platform path before you commit. Ask NVIDIA in writing what support, security fixes and upgrade paths apply to your deployment.

Microservice sunset date
October 1, 2026
NeMo Microservices archive

Follow the NeMo Platform change

NVIDIA states that new development has moved to NeMo Platform, and the repository named in the sunset notice now resolves to NeMo Helix, an open-source control plane that runs guardrails as an inference gateway plugin. That changes where guardrail configuration is applied and who operates the gateway. Before adopting it, confirm which components are covered by your support agreement and which you must run and patch yourself.

NeMo Helix guardrail docs

Confirm license and support terms

The NeMo Guardrails library is licensed under Apache 2.0, but each safety model carries its own license and acceptable use terms, and those can differ from the library. Read the license for every judge model you plan to host, and confirm which party is responsible for security advisories on the model and on the serving stack. Record the answers in your third-party software inventory.

NeMo Guardrails on GitHub

Questions buyers ask before choosing a safety model

What drives the cost of choosing a content safety model for NeMo Guardrails?

Cost is driven mostly by who does the evaluation work and what hardware the candidate models need to run. NeMo Guardrails itself is an Apache 2.0 library, so the software licence is not the main line item. The larger costs are GPU capacity to host each candidate model during testing, engineering time to wire each model into input and output rails, and the effort to build and label a test set that reflects your policy. Ask any partner to split the quote into these components, and to state which items are one-time (the bake-off) and which recur (hosting, model updates and re-testing after a version change).

Who pays for the GPUs needed during a safety model evaluation?

Whoever owns the infrastructure where the evaluation runs usually pays for the GPUs. If you run the bake-off in your own cloud account or data center, you pay the compute provider directly and the hardware cost depends on the model size and whether you use shared or dedicated accelerators. If a partner runs it in infrastructure you control, the compute still lands on your account, so the quote should show it as a separate line. Confirm whether any candidate model requires a hosted service or a licence agreement, because those terms can add cost that is unrelated to GPU hours.

Who pays for the evaluation work and the labeled test data?

Evaluation work is a services cost, and labeled data is usually a separate cost you must plan for. Engineering time to build prompts, run each candidate, score the results and document findings is typically priced as a fixed scope agreed in writing. Labeling is the expensive part when you need reviewers who understand your policy, and it recurs whenever your policy changes. Ask whether the quote includes labeling, who owns the resulting dataset, and whether it can be reused for regression tests after the model is chosen.

How long does a safety model bake-off take?

Length depends on how many candidate models you compare, how much labeled data you have, and how quickly your infrastructure can host each model. A narrow comparison of two models on an existing test set is far shorter than a comparison across several models, languages and input types with new labeling. Other drivers include GPU availability, the number of model integrations to build, security review of each candidate, and the number of rounds needed to tune thresholds. Ask for a timeline tied to a written scope with named milestones, and for the assumptions behind it.

What must our team supply before a safety model evaluation starts?

Three things determine whether the evaluation produces a useful answer: a written policy, labeled examples, and infrastructure to run the candidates. The policy should state which categories are blocked, which are allowed with review, and what the assistant should say when it refuses. Labeled data should include safe and unsafe prompts and responses drawn from real traffic patterns, in every language you serve. Infrastructure means GPU capacity or cloud accounts, network paths to the NeMo Guardrails runtime, and access for the security team to review logs. Missing any of these usually adds rounds of rework.

Can our own team run the safety model evaluation without a partner?

Yes, if you have engineers who can host models, configure NeMo Guardrails with config.yml and Colang files, and write an evaluation harness. Most of the work is repeatable: deploy each candidate, run the same labeled set, record accuracy, false positives and latency, then compare. The risk is in the details, such as using a prompt format a model was not trained for, or misreading results on languages you did not test. Compare your team's capacity against the scope before deciding, and ask a partner to review your method if you build it yourself.

Does NeMo Guardrails carry a license fee?

NeMo Guardrails is licensed under Apache 2.0, and the current release, 0.25.0, is published on PyPI under the Apache-2.0 license expression, so using the library does not require a licence fee from NVIDIA. Costs come from the infrastructure you run it on, the safety models you host, and the services you hire to build and test it. The NeMo Guardrails microservice was sunset as of October 1, 2026, so plan around the library or a successor platform rather than assuming a microservice licence. Confirm the terms of any model you choose, since model licences are separate from the library licence.

Limits to confirm in your own environment

The model comparison depends on conditions that change with your users, hardware, licenses and release plans. The cards below list the limits to verify with the vendor or in a test environment before you choose a guard model for production.

Language coverage for your users

Guard models do not judge every language equally well, and the language list is part of each model's documented scope. Build a test set from the languages your users actually write in, including slang, mixed-language prompts and the languages your retrieved documents use. Run safe and unsafe examples in each one before you rely on a model's verdict for that population.

Model licenses for commercial use

Each guard model ships under its own license terms, separate from the Apache 2.0 license that covers the NeMo Guardrails library. Ask your legal team to read the license of every model you plan to serve, including any acceptable use policy and redistribution rules that apply to your deployment. Confirm the terms with the model publisher where the text is unclear.

GPU sizing for your traffic

A guard model runs on every input and output, so its accelerator needs scale with request volume, prompt length and whether reasoning traces are generated. Measure latency and throughput on your own hardware with traffic shaped like production, including peak concurrency. Confirm memory requirements with the model publisher and your serving stack before you buy or reserve capacity.

LangChain opt-in behavior

LangChain integration in NeMo Guardrails is opt-in and turns on only when the NEMOGUARDRAILS_LLM_FRAMEWORK environment variable is set to langchain. If your application uses LangChain, confirm in a test environment that the variable is set in every deployment, including containers and workers, and that the expected framework is loaded. Document this setting so a later rollout does not change behavior silently.

Colang version choice

NeMo Guardrails supports Colang 1.0 and 2.0, and Colang 1.0 is the default. Decide which version your rails use before writing configurations, because flows, actions and safety rail definitions differ between them. If you plan to migrate later, NVIDIA's migration guide says converted configurations still need manual review, so budget test time for that review.

Colang 2 migration guide

Fit with your upgrade plan

The current release is 0.25.0, which requires Python 3.11, 3.12 or 3.13, and it deprecates the LLMRails class in favor of Guardrails. Check whether your Python and container base images match those requirements, and whether your code uses LLMRails. Confirm the removal timing with the release notes and test your configuration against the migration guide before you pin a version.

Release notes

How to measure accuracy on your own traffic

Published benchmarks do not tell you how a model will behave on your traffic. A safety model's reported scores come from datasets chosen by its authors, written in the languages and styles they picked, and labeled against policy categories that may not match yours. Your users ask different questions, your assistant produces different answers, and your policy draws its lines in different places. Before you commit to a model for NeMo Guardrails, run each candidate against a labeled sample drawn from your own prompts, retrieved content, model outputs and the languages your users actually write in. Include the self-check prompt approach as a candidate too, since it uses the application LLM you already run and gives you a baseline.

Start by building a labeled set. Pull a sample of real inputs and outputs from logs you are allowed to use, remove personal data, and have two reviewers label each item against the written policy, with a third reviewer resolving disagreements. Record the language, the rail where the text would be checked (input, output or retrieval), and whether the item is a clear case or a borderline one. Keep the borderline items in a separate group, because they show where a policy is unclear before any model is tested. Confirm with your legal and privacy team where the labeled set may be stored and who may view it, since it will contain sensitive text.

Decide in advance which error costs more. A false positive blocks a legitimate request and frustrates a customer or employee, while a false negative lets harmful content through to a user or a downstream system. The right balance depends on the rail and the audience, so set separate thresholds for input and output rails and document who approved them. Then rerun the same labeled set after every model change, prompt or parser change, policy edit and NeMo Guardrails upgrade, and compare the results by language and category, not only overall. Keep the results with the configuration version so an auditor or incident reviewer can see what was enforced at the time.

How DeployOpen scopes and delivers a content safety model decision

DeployOpen approaches the choice of a content safety model for NeMo Guardrails as a written, fixed-scope decision. We start from your traffic, languages, latency budget and hosting limits, then test candidate models in your own infrastructure before recommending one. The result is a model choice you can defend in a security review.

How we scope

  • Confirm the input and output directions, languages and content categories the guard must cover for your assistant
  • Record latency targets, GPU availability and whether models may run in your cloud, data center or air-gapped network
  • Agree in writing which candidates are compared, such as self-check prompts, Nemotron Safety Guard, Llama Guard 3, ShieldGemma and Hugging Face classifiers

How we build

  • Stand up each shortlisted model in a test environment and wire it into NeMo Guardrails input and output rails
  • Run the same labeled safe and unsafe prompt set against every candidate, recording accuracy, false positives and response time
  • Check each model's license terms, hosting options and GPU requirements against your environment before scoring it

How we hand over

  • Deliver a written comparison report with the test method, results, trade-offs and a recommended model for your use case
  • Provide the working configuration, prompts and parser settings for the selected model, with the setup steps documented
  • Include a list of items your security and compliance teams should review before the guard goes into production

How we support

  • Offer ongoing support, upgrades and continuous testing as a retainer when your models or NeMo Guardrails versions change
  • Retest the chosen model after NeMo Guardrails upgrades or model updates, and document any changes in behavior
  • Ask your team to confirm current model licenses, hosting rights and NVIDIA support status before final selection

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.