Benchmarking individual NeMo Guardrails rails on public datasets

Benchmarking each NeMo Guardrails rail on public datasets shows whether a topical, moderation, fact-checking or hallucination check works before you rely on it. This page covers how to run, read and repeat those benchmarks with your own models.

On this page

Why benchmark NeMo Guardrails rails on public datasets before production

A per-rail benchmark answers one question: does each rail you enable catch the behavior it is meant to catch, and how often does it fire on content it should let through? If your team is choosing rails for an LLM application, published benchmark numbers are the first evidence you can collect for each rail, before you spend time on your own traffic. NVIDIA's NeMo Guardrails library covers five rail types: input rails that screen user messages, dialog rails that steer multi-turn conversations, retrieval rails that check RAG chunks, execution rails that govern custom actions and tools, and output rails that check model responses. The library also ships the models and checks a benchmark would exercise: self-check input and output moderation, fact-checking, hallucination detection, and NVIDIA content safety and topic safety models.

A benchmark run on a public dataset measures each rail in isolation against labeled examples, so you can see its detection rate and its false positive rate separately. Those two numbers matter for different owners. Security and compliance teams care about what gets through, while product owners care about legitimate requests that are refused. Ask which rail, which model and which threshold produced each result, and whether the dataset labels match your definition of unsafe content. Confirm the exact model versions and rail settings used in NVIDIA's published results against the NeMo Guardrails documentation before you compare anything.

Treat NVIDIA's published results as a starting point, not as proof for your application. Public datasets rarely match your users, languages, document types or attack patterns, and a rail that scores well on a benchmark can behave differently on your prompts, your retrieved content and your model. Plan to repeat the benchmark with the models you will run in production, using the same datasets for comparability and a sample of your own labeled traffic for relevance. Record the rail configuration and library version with each run, since the current release line changes behavior between versions and the upgrade notes need to be checked against your results.

Which rails to benchmark and what each one claims

Topical control, moderation, fact-checking and hallucination detection each answer a different question about a response, and each sits at a different point in the request flow. Benchmark them separately so a weak score in one family is not hidden by a good score in another, and confirm in the docs exactly what each rail decides before you pick a dataset.

Topical control

Topical control decides whether a user message falls within the subjects your assistant is allowed to discuss. It usually runs as an input rail, so an off-topic request is refused before the main model answers. Public datasets for this family measure on-topic and off-topic classification, so your dataset must match your own topic list. Confirm which topic model the configuration uses, whether it is the NVIDIA topic safety model or a self-check prompt, and how the rail behaves when the topic is ambiguous. Check the topic definitions first, because a benchmark only measures the boundary you defined.

NeMo Guardrails docs

Content moderation

Moderation rails decide whether a user input or model output contains harmful content, such as abuse, violence or sexual material. They can run on input, output or both, and each direction needs its own benchmark because the text distribution differs. Confirm which moderation model or self-check prompt the configuration calls, which safety categories it covers, and whether the verdict is binary or graded. Published moderation scores describe NVIDIA's test sets, so repeat the run on prompts and responses your users actually send.

Fact-checking

Fact-checking rails compare a generated answer against supplied evidence, usually retrieved chunks in a RAG pipeline. They decide whether the answer is supported by that evidence, not whether it is true in general. Because the verdict depends on the evidence passed in, the benchmark dataset must include the context exactly as your retrieval layer returns it. Confirm which retrieval rail feeds the fact-check step, how the rail treats partial support, and whether the evidence is truncated before the check.

Hallucination detection

Hallucination detection flags answers that contain claims without grounding, including answers that are unsupported even when they sound plausible. It overlaps with fact-checking but is a separate rail, with its own model and threshold, so it can disagree with the fact-check verdict on the same response. Confirm which detection model the configuration loads, whether it needs the retrieved context or only the answer, and what action the rail takes on a flagged response. Report the two families separately so product owners see which failure they are trading away.

How the evaluation pipeline runs against your models

A per-rail evaluation answers one question: how well does a single rail separate the inputs it should block from the ones it should allow? The run has four steps. First, select the rail and the model it depends on, such as a self-check input prompt, a fact-checking prompt, or one of the NVIDIA safety or topic models. Second, load a public dataset whose examples carry labels. Third, map each dataset label to the outcome the rail produces, so that an item labeled as harmful counts as a true positive when the rail blocks it. Fourth, compute the metrics the NeMo Guardrails documentation defines for that evaluation, typically precision and recall, and store them with the configuration that produced them. Confirm the exact metric names, label values and dataset format in the NeMo Guardrails documentation before you write any mapping code.

A rail evaluation involves two model choices that are easy to conflate. The rail model makes the block or allow decision, for example a self-check model declared in the models section of config.yml or a dedicated safety model. The application model generates the answers that the output rails inspect. Changing either one changes the result: a different rail model shifts the decisions on the same dataset, and a different application model changes the outputs the rails see, along with latency and token use. Record both models, their versions and their endpoints in every run, and pin them for comparisons. Treat any published NVIDIA result as a reference point until you have repeated the run with your own rail models and your own application model.

How a benchmark request flows through a rail

A benchmark run starts with a labeled example from a public dataset, which is sent through your NeMo Guardrails configuration (config.yml, Colang files and actions) to the rail model. That model can be self-hosted or NVIDIA-hosted, and which one applies must be confirmed for each rail before you run. The rail returns a decision, which is compared with the dataset label to produce the scored output. Check that your own model endpoint and configuration files are the ones actually in the path.

Labeled examples pass through your configuration and rail model, then get scored against labels.

Choosing the benchmark setup for each rail

This table compares the three configuration choices that shape a rail benchmark: which models run the checks, which interface drives the rails, and which Colang version the configuration uses. Read each row as a decision: when the option fits and what you must confirm before you publish or compare numbers.

ChoiceOptionWhen it fitsWhat to confirm first
Model sourceNVIDIA published safety and topic modelsYou want results comparable with NVIDIA's published evaluations and your team can run the model weights in its environment.The model version and license terms you tested, and that the hardware you plan to use can host the model at the throughput your benchmark needs.
Model sourceYour own self-hosted modelsYour production assistant uses a model you control, or you must keep prompts and data inside your network.That your model's output format matches what the rail expects, and that you record the exact model build so results can be repeated.
InterfacePython APIBenchmarks run in a CI job or notebook where the harness calls the rails directly and you want full control over inputs and logging.That your Python version is 3.11, 3.12 or 3.13, and that the library version is pinned in the benchmark environment.
InterfaceGuardrails serverThe benchmark should exercise the same HTTP path your application uses, including authentication and request handling.Which Docker image or server build you run, the configuration folder it loads, and that the HTTP timeouts do not distort latency figures.
Colang versionColang 1.0 configurationYour existing configuration is written in Colang 1.0, which is the default, and you need results for the current setup.That the configuration you benchmark is the one you ship, since rail behavior depends on the exact flows and prompts.
Colang versionColang 2.x configurationYou are migrating or starting new flows in Colang 2.x and need to measure the converted rails before cutover.That converted configurations were manually reviewed, because NVIDIA states the conversion tool output still needs review, and that the benchmark covers the reviewed files.

Setting up a repeatable rail benchmark

This sequence pins the NeMo Guardrails version, the rails under test and the datasets so that a benchmark run can be repeated and compared later. The output is a stored result set tied to a specific configuration hash and dataset versions.

  1. Pin the NeMo Guardrails version

    Choose the exact NeMo Guardrails release you will benchmark and record it in your evaluation notes. The current release is 0.25.0, published on 19 November 2026, and it requires Python 3.11, 3.12 or 3.13, so create a virtual environment on one of those interpreters first. Confirm the interpreter version with the Python command you plan to use in CI. The step is done when the version and Python interpreter are written down in the benchmark record and a second engineer can reproduce them.

  2. Install the library from PyPI

    Install the nemoguardrails package from PyPI into the pinned environment, using a lock file or a constraints file so that transitive dependencies do not drift between runs. Install any optional model dependencies that the rails under test require, such as the packages for the self-check or hallucination models, and record which ones were added. Your platform engineer owns this step. It is complete when the installed package version matches the pin and a freeze output of the environment is saved next to the benchmark results.

  3. Create the config.yml with rails under test

    Build a configuration folder containing config.yml, any Colang files and any Python actions, and enable only the rails you intend to measure, such as topical control, self-check moderation, fact-checking or hallucination detection. Keep one configuration per benchmark arm so the effect of each rail is isolated. Record the model entries in config.yml, because they determine the results. The step is done when the folder loads without errors and a single test prompt returns the expected rail decision.

  4. Select and version the public datasets

    Choose the public datasets that match each rail, and record the exact dataset name, source, version or revision, and split used for every run. Check each dataset's license and terms of use before you redistribute results. Store a checksum of each file so later runs can prove they used the same data. Confirm the dataset versions with the maintainers or the hosting page, since NVIDIA's published results only apply to the datasets they used. The step is done when a manifest lists every dataset with its version and checksum.

  5. Run the evaluation with your own models

    Point the configuration at the models your organization will actually use, and run the benchmark script against the chosen datasets. Keep the model names, endpoints, decoding settings and any system prompts fixed for the whole run, and log them with the output. Running the same datasets with a different model is a new benchmark, not a repeat, so label it that way. The step is done when every dataset has produced a complete output file with no skipped or errored records.

  6. Store results with the configuration hash

    Compute a hash over the configuration folder, the Colang and action files, the model settings and the dataset manifest, and save it alongside the metrics, the library version and the run timestamp. Keep the raw per-record outputs so that reviewers can inspect disagreements rather than only the summary scores. Put the results in a versioned location under change control. The step is done when a rerun with the same hash reproduces the stored metrics within the tolerance you set, and any change to the hash is flagged as a new benchmark.

How to read NVIDIA's published rail results

A published accuracy or recall number for a rail is only meaningful when you can reproduce the conditions behind it. Four variables decide the result: the dataset, the model, the prompt and the threshold. Change any one of them and the number moves, sometimes more than the difference between two rails you are trying to choose between. Before you compare NVIDIA's figures with each other or with your own runs, write down all four for each row. If a result does not state its prompt template, the model version or the threshold, treat it as a starting hypothesis rather than a benchmark. Ask NVIDIA or the maintainers of the evaluation harness which exact configuration produced each figure, and confirm that the dataset split and labeling scheme match your own test plan.

The model variable needs particular care because NeMo Guardrails has two different model stories. The library ships self-check prompts, fact-checking, hallucination detection and NVIDIA content safety and topic safety models that you can run inside your own environment, and these are what the benchmarks in this topic exercise. The NeMo microservice that packaged guardrails for deployment has been sunset, with NVIDIA's NGC catalog stating that it is no longer supported. Results that were produced through the microservice do not automatically carry over to a library deployment, so confirm which runtime generated each number. Check the NeMo Guardrails documentation for the model and endpoint you plan to use before assuming parity.

The NeMo Helix documentation also mentions guardrails, but it describes them in a different role. In NeMo Helix guardrail models documentation, guardrails run as middleware in an inference gateway that applies configurations to model endpoints. That placement changes the inputs a rail sees, the latency it adds and who controls the threshold, so Helix behavior is not a substitute for a library benchmark. Before you repeat any published result with your own models, record the library version, the model endpoints, the prompt templates and the thresholds, then rerun the same dataset in your environment and report the gap between your numbers and the published ones.

Security and data handling in benchmark runs

Benchmark runs handle three kinds of material at once: harmful or sensitive test text, the model traffic that carries it, and the credentials and licenses that govern both. Each card names one risk and the check to confirm before the first evaluation run. Settle these questions in the test plan, before any scores are produced or shared.

Harmful text in benchmark datasets

Moderation and jailbreak benchmarks typically contain prompts that are deliberately toxic, abusive or unsafe, so the dataset itself is sensitive material. Decide where the files live, who can open them and how long copies persist before the first run starts. Store them in an access-controlled location under the same policy as other sensitive data, and keep working copies out of shared notebooks, chat threads and CI artifacts. Confirm with your security team how the dataset will be classified and how copies are destroyed when the study closes.

Evaluation traffic to third-party endpoints

Every benchmark item sent to a rail that calls a hosted model leaves your boundary, together with its labels and any personal or confidential text the dataset contains. Check which endpoints the config.yml models section points to, whether the provider's terms allow that content, and where requests are processed and logged. Where data must stay in your environment, run the safety models and the evaluated LLM on infrastructure you control, and record each endpoint in the run metadata so reviewers can verify it.

Credentials in configs and results

Rail configurations name model providers and read API keys, and a careless run can write those keys into logs, notebooks, saved results or a committed config.yml. Pass keys through environment variables or your secrets manager, and never place them inline in YAML. Scan the repository and output folders before anything is shared. Rotate any key that appeared in a shared artifact, and confirm that your CI system masks secrets in job logs and withholds them from pull requests opened from forks. The NeMo Guardrails documentation describes how each provider is configured.

Public dataset license terms

Public benchmark datasets carry their own licenses, and those terms can restrict commercial use, redistribution, derivative datasets or training other models. Read the license file that ships with each dataset, record the version you downloaded and any citation requirements, and do not copy examples into product prompts or Colang files without checking those terms. Ask legal to confirm whether publishing scores, sample outputs or a modified subset is permitted before results leave the team.

Questions teams ask before benchmarking NeMo Guardrails rails

Is NeMo Guardrails free to use under the Apache 2.0 license?

Yes, the NeMo Guardrails library is open-source software licensed under Apache 2.0, so the license cost of the library itself is zero. The license covers the code, not the compute you run it on. Your costs are the infrastructure for the guardrail models and LLM calls, the people who set up and interpret the benchmarks, and any commercial support you choose to buy. Check the NeMo Guardrails repository and its LICENSE file before you rely on this for your own distribution plans, and confirm with your legal team how the license applies to your deployment.

What drives the effort of benchmarking NeMo Guardrails rails?

Effort scales with four things: the number of rails under test, the number and size of the public datasets, the capacity of the self-hosted models you run, and whether your configuration uses Colang 1.0 or 2.0. Each rail type needs its own run, its own metric and its own review of results. Self-hosted safety models need enough accelerator capacity to finish evaluation runs in a reasonable window, so sizing must be checked before you commit to a timeline. A configuration still on Colang 1.0 that you plan to move to 2.x also needs a migration step first, and NVIDIA says converted configurations still need manual review.

How long does a rail benchmark project take?

The duration depends on scope, and no timeline can be given without a written scope. A project that runs one rail against one public dataset on a model you already host is much shorter than a project that covers topical, moderation, fact-checking and hallucination rails across several datasets and models. Ask for a plan that lists each rail, dataset, model and environment, and states the work for setup, runs, analysis and a written report. Ask for the assumptions behind each duration, including what happens if model capacity is not ready on the planned date.

What does the work need from our team?

Plan for a named technical owner who can provide access to the target environment, approve the models and datasets used, and review results with your product owners. Your platform team will need to supply the Python runtime, which NeMo Guardrails 0.25.0 requires as Python 3.11, 3.12 or 3.13, and the GPU or inference capacity for any self-hosted models. Someone from security or compliance should agree on which results count as evidence. Ask any implementation partner which of these tasks they will do and which they expect your staff to perform.

Can our own team run the benchmarks without outside help?

Yes, a capable engineering team can run the published evaluations with the open-source library, and the NeMo Guardrails documentation describes the rails and their configuration. The harder parts are usually keeping results reproducible when you swap in your own models, interpreting the scores against your risk tolerance, and keeping the setup working through library upgrades. If your team has no one who has run these evaluations before, an outside partner can shorten the learning curve. Decide early which parts you keep in-house and which you contract out, and write that split into the scope.

Do the published NVIDIA results carry over to our own models?

Not automatically. NVIDIA's published rail results were measured on the models and datasets NVIDIA chose, so the numbers describe those conditions. Repeating the benchmark with your own models, prompts and configuration gives you results for your system, and those results are the ones that matter for a release decision. Record the exact library version, such as 0.25.0 if that is the version you test, along with model versions and dataset versions, so another person can repeat the run. Auditors and internal reviewers will ask for that record.

Does NVIDIA's guardrail microservice still matter for a benchmark plan?

It matters for the planning decision, because NVIDIA's NGC catalog page says NeMo microservices has been sunset as of October 1, 2026, with no new releases and no continued support for the artifact. Benchmarks that depend on that container should be re-planned around the open-source library. NVIDIA's archived documentation asks existing microservice users to contact their account team, and the NeMo Helix documentation describes a different control plane. Confirm with NVIDIA which path applies to your contract before you fix the benchmark design.

What should we ask for in a quote for this work?

Ask for a written scope that names each rail, each public dataset, each model and each environment in scope, plus the deliverables, such as run logs, a results report and a repeatable setup. Ask the provider to separate one-time setup from any recurring work, such as rerunning benchmarks after a library upgrade or a model change. Ask how they handle Colang migration, how they size self-hosted model capacity, and what they need from your team to start. A quote that cannot explain these items in writing is not comparable with another.

How DeployOpen scopes and delivers rail benchmarks

DeployOpen treats rail benchmarking as a scoped engineering task: agree which rails, datasets and models are in play, build a repeatable harness in your environment, and hand over results you can rerun. Engagements are fixed-scope, with the scope agreed in writing before work starts.

How we scope

  • Confirm which rails (topical, moderation, fact-checking or hallucination) and which public datasets are in the written scope
  • Record the NeMo Guardrails version and Python version the benchmark will pin, such as 0.25.0 on Python 3.11 to 3.13
  • Agree which models, self-hosted or remote, serve as the judge and the rail backends for each run

How we build

  • Build a repeatable harness that loads your configuration, dataset splits and model endpoints from version-controlled files
  • Run each rail in isolation first, then in the combined configuration, so results can be traced to one rail
  • Capture the configuration, dataset version and model identifiers with every result so runs can be reproduced

How we hand over

  • Deliver a written report that compares your results against NVIDIA's published numbers and explains every difference
  • Document the exact steps to rerun each benchmark with your own models, including the harness and environment setup
  • Walk your engineers through reading false positive and false negative counts and the limits of each public dataset

How we support

  • Retest the benchmark after a NeMo Guardrails upgrade, a model change or a configuration change, within the agreed scope
  • Ongoing support, upgrades and continuous testing are available as a retainer after the initial engagement
  • Confirm with us which parts of the harness your own team will maintain and which remain with DeployOpen

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.