Finding which NeMo Guardrails rail blocked a request
A user receives a refusal or a canned response, and the team cannot tell which rail produced it. The blocking rail and the reason can usually be found with the library's own debugging tools, which work in both the Python library and the guardrails server. NeMo Guardrails provides five rail types: input rails check the user message before the model sees it, dialog rails control how the conversation flows, retrieval rails check RAG chunks, execution rails guard custom actions and tools, and output rails check the model's response before the user sees it. One request can pass through several of these. A refusal from an output rail can look much like one from an input rail unless the logs record which step made the decision, so without that record teams often tune the wrong rail.
Teams need this trail in three situations: legitimate users are blocked (false positives), a rail needs tuning in its prompts or thresholds, or a security reviewer asks for evidence of why a request was stopped. The output depends on the engine. Colang 1.0 is the default, and Colang 2.0 is also supported, so the same block may appear with different structure in verbose output and logs. Confirm the exact output for your engine and library version in the NeMo Guardrails documentation before you write parsers or alerts against it. Record the engine, the configuration folder version and a request identifier for every blocked case, so each block can be reproduced against the same configuration.
How the debugging output differs by Colang engine
Colang 1.0 is the default engine, so many existing configurations use it unless someone chose 2.0 explicitly. Its debugging output is organized around the flows defined in your Colang files and the rails listed in config.yml, so the first question is which flow matched and which action or check returned the block. Confirm the exact output format against the Colang 1.0 pages of the documentation for your installed version, which is 0.25.0 if you are on the current release.
- Verbose output: Turn on verbose logging only while you reproduce the blocked request, then match each logged step to a flow or rail name in your configuration.
- Explain information: Review the explain() output described in the documentation for the calls you make, and check its fields in your version before you write any parser or dashboard against them.
- Logged block reasons: Find out whether the block reason is recorded against a flow or action name, and note which configuration folder and version produced the entry.
- Input and output positions: Determine whether the block happened on the way in or the way out by checking which rail list the triggering flow belongs to in
config.yml. - Flow visibility: Flow order comes from the Colang 1.0 files and the rail lists, so keep a copy of the exact files deployed when the block occurred.
Before relying on any of these signals, reproduce a known block in a test environment and confirm each field against the 0.25.0 documentation.
Colang 2.0 is supported alongside 1.0, but it is not the default, and its flow model differs enough that you should not expect the same log lines or explain() structure. Debugging starts from the sequence of events and the flows that reacted to them, so the trace is organized around event handling rather than the rail lists alone. The Colang 2 migration guide is the natural starting point for the differences that affect debugging.
- Verbose output: Expect verbose output to describe event and flow activity; confirm the exact entries your version emits before building alerts on them.
- Explain information: Check what explain() reports for 2.0 flows, since the documented fields for 2.0 may differ from 1.0.
- Logged block reasons: Confirm whether the block reason names the flow that refused the request, the action it called or both, and record the value in your incident notes.
- Event sequence: Reconstruct the order of events that led to the block, because the outcome often depends on which flow reacted first.
- Mixed deployments: If one server runs both engines, record which engine handled each request so you read the output with the correct model.
Finish each investigation by checking the flow names and event order against the 2.0 documentation for the version you run, and keep a reproducible test prompt for each block you analyze.
Configurations moved from Colang 1.0 to 2.x with the nemoguardrails convert tool need manual review, according to NVIDIA's migration documentation. A request that was blocked clearly under 1.0 may be blocked by a differently named or differently ordered flow after conversion, so debugging should compare the original and converted configurations side by side. Keep both versions in version control so each investigation has a fixed reference.
- Renamed flows: Compare flow names across the 1.0 and 2.0 files, because a block entry may cite the converted name rather than the original one.
- Ordering changes: Confirm that the order of rails in the converted configuration still matches the intent of the original, and test a prompt that exercises each rail.
- Reproduction cases: Rerun the blocked prompt against both the original and converted configurations and record whether the outcome and the reported reason match.
- Version records: Record the nemoguardrails version with each investigation, since the current release is 0.25.0 and output details can change between versions.
- Migration notes: Keep the review notes from the conversion so you can explain any change in behavior to the security team.
Before you close a migration ticket, confirm that the blocked prompts from your test set produce the same reasons under the converted configuration as under the original.
Debugging options and when each fits
This table compares four ways to find out why a NeMo Guardrails request was blocked: verbose mode, explain(), structured logs and trace-based block reasons. Read each row for what it shows, where it runs and what it costs in log volume or sensitive content. Use the in-process options while you build a configuration, then rely on logs and traces once the guardrails server runs in production.
| Option | What it shows and when it fits | Where it runs | Trade-off |
|---|---|---|---|
| Verbose mode | Engine-level detail for a single run, so you can see which rails and model calls ran. Fits first local reproduction of a block. | Python API or a local run of the library, and the guardrails server if your version supports it | Output can be long and may include prompt and response text. Confirm what it prints before enabling it on live traffic. |
| explain() | Summary of the most recent call, including the LLM calls made and the path that produced the response. Fits interactive debugging of one blocked message in a notebook or test. | Python API, in the same process as the call | Covers only the calls made in that process. Confirm the method signature and returned fields for your version. |
| Structured logs | Machine-readable records of guardrail events that you can search, filter and alert on. Fits triage across many users and security review of blocks over time. | Library logging configuration, or the guardrails server log output | Volume grows with traffic. Confirm which fields are logged and whether message content is included. |
| Trace-based block reasons | Spans for each rail and LLM call within one request, so a block appears alongside latency and upstream calls. Fits production debugging tied to a specific request ID. | OpenTelemetry adapter exporting to a collector and a trace backend | Needs a collector and backend to run. Spans can carry prompt and response content unless content capture is limited. |
How to trace a blocked request step by step
This sequence takes one blocked request from a fixed reproduction to a named rail, a stated reason and a confirmed result on the guardrails server path. It gives your team a repeatable record of which rail fired and why, for each Colang version you run.
Reproduce the block with a fixed input
An engineer sends one exact input to the configuration that blocked it, using the Python API or the same prompt in a test script. Record the Python version, which must be 3.11, 3.12 or 3.13 for NeMo Guardrails 0.25.0, the library version, the configuration folder and the exact input text. Run it twice. The block is reproduced when both runs return the same refusal or fallback response. Save the input, output and environment details in the incident notes before changing anything, so later comparisons use the same starting point.
Enable verbose output on a copy of the configuration
The engineer copies the configuration folder to a non-production location and turns on verbose output using the setting described in the NeMo Guardrails documentation for your version. Verbose output can include user prompts and model responses, so keep the copy on a restricted machine and do not attach raw logs to tickets. Confirm the setting took effect by rerunning the fixed input. The check is passed when the log shows the input entering the rails and a line for each rail that ran, not only the final refusal.
Identify the rail that fired
The engineer finds the rail in the verbose log and classifies it as an input rail, dialog rail, retrieval rail, execution rail or output rail. Then matches the rail or flow name against the entries in config.yml and the flow definitions in the Colang files. Confirm the names match exactly. A name that appears in the log but not in the current files usually means the team is reading an older configuration or a copy that has drifted from the source. Fix the copy before continuing.
Read the block reason from the log
The engineer reads the reason the rail recorded, such as a moderation or safety model verdict, a self-check prompt answer, a jailbreak or injection detection result, a topic flow match or a custom action return value. The engineer also notes whether a model call happened before the block, since that affects latency and cost. Confirm the reason points to one configured prompt, model or action. If the log gives only a generic refusal without a rail-level reason, record that gap and continue to the next step with the rail name as the anchor.
Confirm the decision with explain()
Where your version exposes explain() for the engine in use, the engineer calls it on the same input and compares its output with the verbose log. Check the documentation for your version to confirm the method is available for both Colang 1.0, the default, and Colang 2.x, because support can differ between engines. Configurations converted with the nemoguardrails convert tool still need manual review, so confirm the flow that explain() reports is the one in the converted files. The check is passed when explain() names the same rail as the log.
Repeat the request on the guardrails server path
The engineer starts the guardrails server with the folder that contains config.yml and the Colang files, then sends the same fixed input through its HTTP API. Use the server start options listed in the documentation for your release. The check is passed when the server returns the same block and names the same rail. A different result usually points to a configuration folder that differs from the one tested, a different model setting or a request that reaches the server with different options than the Python test used.
Record the finding and add a regression test
The engineer writes down the rail name, the block reason, the config folder version, the Python version and the library version, then turns the fixed input into an automated test that asserts the expected block. Remove the verbose setting from the copy and confirm that production configuration was not changed. The check is complete when the test fails on the broken behavior and passes after the fix, and the finding is stored where the platform team can search it.
Where a blocked request leaves a trace
The request starts in the application, which calls the guardrails runtime through the Python API or the guardrails server. It then passes through input rails, dialog rails, retrieval rails, execution rails and output rails before reaching the LLM. Verbose output and logs are written as the request moves through the runtime, and a block returns a reason to the caller. Check the block reason first, then the rail that produced it, before changing any configuration.
Request path through the rails, with where logs and block reasons appear.
Telling a correct block from a false positive
The first decision after finding the blocking rail is whether the block was intended. A block is correct when the rail's reason matches a policy your organization has approved, and a false positive is a block where the input was legitimate but the rail fired anyway. Start by writing down the policy the rail is meant to enforce, such as a restricted topic, a PII category or a jailbreak pattern, and compare it with the reason the trace or log records for that rail. If the reason names a category your policy does not cover, or the rail fired on text that contains no matching content, treat the block as a candidate false positive. Keep the policy statement next to the blocked input so the reviewer does not have to reconstruct intent later.
Next, check the input against what the rail was built to recognize. For self-check rails, read the prompt the rail sends to the model and ask whether the blocked message would reasonably fall under it. For model-based rails, such as the safety or topic models your configuration loads, confirm which model and version produced the decision and review the examples or category definitions that model documents, using the NeMo Guardrails documentation as your starting point. For Colang flows, confirm which user intent the flow matched and whether the example utterances for that intent are too broad. Record each decision in a tuning log with the input, the rail, the reason, the verdict (intended, false positive or unclear), and the change you plan to make. This record is what lets a later reviewer see why a rule exists.
Before changing anything, understand that a change to one rail can move the behavior of other rails. Lowering the sensitivity of an input check, editing a shared prompt, or altering a flow that other flows depend on can let previously blocked content through or block new content. Build a fixed regression set that includes the false positives you found, known intended blocks, and ordinary traffic, then run the same set against the configuration before and after each change. Store the set and its expected outcomes under version control with the configuration, and treat any change in an unrelated rail's result as a finding to explain. Confirm with your own test process how often you will repeat this run, since that depends on how often your configuration changes.
Protecting user content in debug output and logs
Block diagnostics are useful because they show what the rails saw, and that is exactly why they can expose user data. The cards below cover the risks to check before you turn on verbose output, share logs or keep them for review, and they point to where each control belongs in your logging setup.
User prompts and retrieved content in logs
Verbose output and traces can carry the user's prompt, the model's draft response and the retrieved documents that a retrieval rail evaluated. A blocked request is often the one containing the most sensitive text, so the diagnostic record can hold more personal data than the normal request path. Check which fields your logging setup writes for each rail outcome before you enable anything beyond the default.
Debug settings left on in production
Verbose mode and detailed tracing are set per process or per deployment, and a setting enabled during an incident can persist long after the incident closes. Treat debug configuration as a change that needs an owner, an approval and a planned rollback. Review your deployment manifests and environment variables for debug flags on every release.
Access to log and trace backends
Anyone who can query the log or trace store can read the content that the rails recorded, which may be broader than the access granted to the application itself. Confirm which roles can search, export and download diagnostic data, and whether that access is logged. Compare the backend's access model with the access model of the application that produced the data.
Retention of block reasons
Block reasons are valuable for investigation but they are still records of user activity, and each backend applies its own retention rules. Decide how long block records are kept, separately from general application logs, and document the reason for that period. Ask your compliance team which retention requirements apply to the data your assistant handles.
Content capture is a separate decision
Recording full prompts and responses in traces is a distinct setting from recording block reasons, and it needs its own review. The DeployOpen content capture page covers which spans record content and how to control that risk. Keep block-reason logging and content capture on separate approvals so that enabling one does not quietly enable the other.
Redaction before sharing logs
Logs sent to a vendor for support or shared with an auditor should be redacted first. Remove or mask user identifiers, personal data, credentials and document excerpts, and keep a record of what was removed. Ask vendors which fields they need before you export anything, because a smaller export usually answers the support question as well as a full one.
Questions teams ask before debugging blocked requests
How much effort does a debugging pass on a blocked request take?
The effort depends mainly on how many rails are involved and how much of the trace and log trail already exists. Each input, dialog, retrieval, execution and output rail is a possible blocker, so a configuration with many rails means more candidates to check for each request. The Colang runtime also matters: Colang 1.0 is the default and Colang 2.0 is supported, and a configuration converted with the migration tooling still needs manual review. Log access sets the pace. If verbose output and structured logs already reach a store your team can search, most of the work is reading and reproducing. If they do not, turning them on is the first task. Ask any partner to split the quote into reproduction, root-cause analysis and fix phases, and to list the access needed on day one. DeployOpen engagements are fixed-scope, so the scope and deliverables are agreed in writing before work starts.
Can our internal engineers debug blocked requests without a partner?
Most teams can handle a first pass alone if at least one engineer can read the configuration files and Python actions and can search the logs. The skills are ordinary application debugging plus a working model of the five rail types: input, dialog, retrieval, execution and output. Teams usually struggle with the flow layer. Colang flows control dialog and rail order in ways that are not obvious from the Python code that calls the library, so the investigation can stall there. Check whether anyone has written or reviewed Colang flows, and confirm that the runtime matches the Python version the library requires, which is 3.11, 3.12 or 3.13 for the 0.25.0 release. A short internal pilot on one class of blocked request will show quickly whether the team can trace a block from input to rail to reason. If the pilot stalls on flow logic, a partner can take over that step using the same inputs.
What do we need to give a team debugging NeMo Guardrails blocks?
The team needs a reproducible input set and read access to everything that shaped the decision. For each blocked request, collect the exact user input, the preceding conversation turns, the timestamp, the model and endpoint used, and the rail or flow that returned the block if your logs show it. Then provide the configuration that was live at that time: the config.yml file, Colang files, Python actions and any prompts, ideally from version control so the exact state can be recovered. Access should include the server logs, traces that cover the request, and the environment variables used by the deployment. A non-production environment where the team can replay inputs is also important, because reproducing a block in production is risky. If your organization does not store prompts, say so in advance, since the team will then depend on you to supply replay inputs by hand.
Is a partner worth it for tuning false positives?
A partner is worth considering when the tuning work is large, time-sensitive or likely to be repeated. False-positive tuning changes thresholds, prompts, flows or actions, and each change can reopen an attack path that was previously blocked, so the work needs a labeled set of allowed and blocked examples and a regression run after every change. Building that set is often the largest cost, and it recurs whenever the models, rails or business rules change. An outside team can bring a test method and run the regression cycles, while your staff keep ownership of the policy decisions about what should be allowed. When you request a quote, ask for the labeled example set, the number of tuning cycles assumed, the regression run and the handover of artifacts as separate lines. DeployOpen runs security testing of AI systems and can retest fixes, and ongoing testing is available as a retainer.
Is debugging output safe to keep in logs and tickets?
Debugging output is often sensitive, and it should be treated as data in its own right. A blocked request can carry user prompts, personal data, system prompt text, retrieved documents, tool results and internal identifiers, and those can end up in traces, logs and support tickets. Before collecting anything, decide which fields are captured, who can read them, how long they are kept and where they are stored. Redact or hash personal data where the investigation does not need it, and restrict access to the people who handle incidents. Store debugging artifacts in the same access-controlled systems as the rest of your sensitive operational data, not in general chat or shared drives. Confirm the retention period and access rules with your compliance and privacy teams, since those decisions depend on your data obligations and the jurisdictions you operate in. Content capture settings should be documented as part of the configuration.
Which NeMo Guardrails version should we test our debugging against?
Test against the exact version running in production, and keep the version recorded with every blocked-request investigation. The current release is 0.25.0, published on 19 November 2026, and the previous release is 0.24.1, published on 16 September 2026, according to the NeMo Guardrails releases page. Version 0.25.0 deprecates the LLMRails class in favor of Guardrails, with removal planned no earlier than 0.27.0, so code that inspects blocks through the older class should be checked during the upgrade. If your deployment uses the NeMo Guardrails microservice container, note that NVIDIA has sunset that microservice as of 1 October 2026, so debugging work on that path should start with the support position confirmed with NVIDIA. Ask whether the trace and log fields you rely on are stable across the versions you run, and retest your reproduction inputs after each upgrade.
Why the debugging setup should match your NeMo Guardrails version
Pin your debugging code to the NeMo Guardrails version you run. NeMo Guardrails 0.25.0 deprecates the LLMRails class in favor of Guardrails, and removal is planned no earlier than 0.27.0. Any script, wrapper or helper that calls LLMRails directly, or that reads the objects and fields returned by the older class, may change shape when you move to a newer release. Before you rely on a verbose-mode dump, an explain() call or a log parser you wrote, check which class your application imports and confirm that the same fields appear in your version. Keep a small test that runs a known blocked prompt through the pipeline and asserts on the block reason, so a version change shows up in CI rather than during an incident.
If your configurations use Colang 2.x, or you are converting them from Colang 1.0, treat the output of the nemoguardrails convert tool as a draft. NVIDIA says converted configurations still need manual review. Flow names, intent matches and rail ordering can change meaning during conversion, and a rail that used to fire at one point may fire at another. Compare block reasons for a fixed set of test prompts before and after conversion, and record which rail produced each result. Log lines and trace attributes that name a flow may also differ between Colang versions, so update your parsers together with the configuration.
Confirm any change in output format, field names or deprecation timing against the release notes for your exact version before you change production tooling. The NeMo Guardrails releases page lists what changed in each release, and the Colang migration guide covers the conversion steps. Record the version, Colang mode and configuration revision alongside every debugging session so that a block reason can be reproduced later.
Where DeployOpen fits in a debugging engagement
A blocked-request investigation starts with a written scope, not with log hunting. DeployOpen agrees the scope in writing before work begins: which NeMo Guardrails version and Colang engine are in use, which configuration folders and Python actions are included, which block reports are in question, and what the client needs at the end. The scope also fixes who supplies what, usually sample requests with their configuration, the log and trace backend access, and a named engineer on the client side who can confirm whether a block was expected. Because most engagements are fixed-scope, the quote follows from this written scope rather than from a price list. Ask for the scope to name the reproduction environment explicitly.
Reproduction comes first. DeployOpen rebuilds each reported block in a non-production copy of the client's setup, pinned to the same library version, and records which rail fired, the block reason returned, and whether the same input is blocked on a repeat run. The findings report then covers rail behavior: which input, dialog, retrieval, execution or output rail made the decision, which configuration lines or prompts drove it, and which false positives or gaps were found. Each finding comes with a proposed fix, such as a changed flow, a threshold, or an action that now returns a clearer reason, and the fix is retested against the same reproduction set before the engagement closes.
DeployOpen plans and supports self-hosted deployments inside the client's own infrastructure, so the investigation runs where the traces, logs and configurations already live. Confirm before signing whether your security policy allows the investigators to access production logs, whether prompts and responses may be copied into a test environment, and who approves changes to the configuration folder once the fixes are delivered. Those answers decide how the reproduction is built and how the retest is evidenced for your own reviewers.
How DeployOpen scopes and supports NeMo Guardrails debugging
DeployOpen approaches debugging blocked requests as a scoped piece of work on your own NeMo Guardrails setup. We start from the configurations, engine and deployment you run, then identify which rail blocked a request and why, and hand the team a repeatable way to do the same next time.
How we scope
- Confirm which engine, Colang version and deployment form (Python API or guardrails server) your application uses before any tracing work starts.
- List the blocked-request scenarios to investigate, with example inputs, expected outcomes and the rails you believe should have fired.
- Agree in writing which logs, traces and configuration files DeployOpen may access, and where captured content is stored and who can read it.
How we build
- Enable verbose output and block-reason capture in a non-production copy of your configuration, then reproduce each blocked case under controlled inputs.
- Map each block to the rail that fired, the action or model call behind it, and the configuration line responsible, documenting false positives separately.
- Propose configuration or prompt changes for confirmed false positives and retest them against the same reproduction set before anything reaches production.
How we hand over
- A written findings report listing each investigated block, the rail responsible, the cause and the evidence used to reach that conclusion.
- A short runbook for your engineers covering how to turn on verbose mode, read explain output and find block reasons in structured logs.
- A retest record showing which fixes were verified, with any open items and their owners named in the report.
How we support
- Ongoing support, upgrades and continuous testing are available as retainers, so new rails or configuration changes can be checked for unexpected blocks.
- Re-run the reproduction set after NeMo Guardrails version changes, since the configuration and Python API behavior may shift between releases.
- Confirm with your team the support boundary, response expectations and who approves configuration changes before a retainer begins.

