Debugging Colang flows in NeMo Guardrails

A practical guide to finding why a Colang dialog flow did not fire or fired too often in NeMo Guardrails, and how to keep those fixes from regressing.

On this page

Why debugging Colang flows in NeMo Guardrails takes a method

When a bot ignores a flow or fires it on the wrong turn, the fix starts with finding which stage failed, not with editing the flow. The cause usually sits in one of three places: intent matching, which decides which canonical form a user message maps to; flow logic, which decides which flows are eligible once that form is known; or the LLM calls the runtime makes to interpret and generate each turn. Each stage can look correct on its own while the combined behavior is wrong, so reading only the final bot reply tells you where the conversation ended, not where it went off course.

The NeMo Guardrails documentation describes the tools for working through those stages: verbose mode for the runtime's step-by-step activity, explain() for the reasoning behind a response, structured logs for the events the runtime records, and the chat CLI for replaying a conversation turn by turn against a configuration. Confirm the exact flags, output fields and log format for the version you run, because debugging output can change between releases. The current release is 0.25.0, published on 19 November 2026 under the Apache 2.0 license, so teams can inspect and modify the library code in their own environment when a tool's output does not explain a failure.

Teams usually need this work in three situations: after converting a project from Colang 1.0 to 2.x, which NVIDIA says still needs manual review, when new flows overlap with existing intents, and when a bot starts refusing legitimate requests or running a flow on small talk. Before changing a flow, record the failing conversation, identify the stage that misbehaved, and save the exchange as a regression test. Ask your team to confirm which Colang version the configuration uses, since Colang 1.0 is the default, and to keep those tests running on every change to the dialog configuration.

Which debugging tool to use for which symptom

This table maps four common Colang symptoms to the debugging tool that isolates each one, along with what each tool shows and what it costs in noise or setup. Read it by finding your symptom in the first column, then checking the tool you would reach for first. Confirm exact output formats in your installed NeMo Guardrails version before building log parsers or runbooks around them.

SymptomTool that isolates itWhat it showsCost in noise or setup
Flow did not fireVerbose modePer-turn trace of which user intent was matched and which flows were considered, so you can see whether the expected flow was a candidate at allHigh output volume per turn; enable on a test configuration rather than shared production logs
Flow fired too oftenexplain()The flow, utterance or rail responsible for the response in the last generation, useful for tracing an unexpected match back to its example utterancesNeeds a call in code after a generation; you must keep the object or history it refers to
Wrong intent matchedVerbose mode with explain()The canonical form chosen for the user message and the matching step behind it, to compare against the intended flowMatching detail varies with Colang version and configuration; confirm the fields in your version
Unexpected LLM callStructured logsRecorded LLM invocations and task names per request, so you can count extra calls that a dialog change addedRequires logging configuration and a log pipeline; volume grows with every rail that runs
Behavior differs between chat and appChat CLIInteractive replay of a conversation against the same config folder, useful to reproduce a single failing sequence quicklyLow setup cost, but it reflects only the config you point it at and not the full application stack

How to triage a flow that did not fire

This sequence narrows a missed Colang flow to one cause, whether the intent was never matched, the trigger conditions failed, or the LLM tasks behaved differently than expected, so the fix targets the right file.

  1. Freeze the failing transcript

    Record the exact user messages and any prior bot turns that led to the miss, then replay them in the chat CLI from a clean session with the same configuration folder. Confirm the bot fails the same way on the same turn. If it passes on replay, the difference is in session state, configuration version or model settings, so compare those before going further. If the miss reproduces, save the transcript as a fixed test input so every later change is checked against it.

  2. Confirm the matched user intent

    Identify which user intent the engine assigned to the failing message and which example utterances it was compared against. Check whether the intent you expected is defined in the Colang files, whether its examples are spelled as you think, and whether another intent scored closer. If the expected intent never appears among the candidates, the problem is in the intent definition or its examples, so stop here and fix the definition. If the right intent was matched, proceed to the trigger conditions.

  3. Check the flow's trigger conditions

    Open the flow that should have fired and read its first lines, which define the events it waits for and any when or guard expressions it depends on. Confirm that the intent name in the trigger is the same one the engine matched, and that no earlier flow consumed the event first. A correct intent with a failing condition, such as a context variable that was never set, means the flow is waiting on state that the conversation did not produce. Proceed only once the trigger and the matched intent agree.

  4. Inspect verbose output for the turn

    Run the same transcript with verbose logging enabled and read the output for that single turn. Look for the LLM tasks that ran, such as intent generation or the flow decision, the prompts they received, and the raw completions they returned. Use explain() on the last response to see which flows and intents contributed to the reply. If a task returned an unexpected label or an empty result, the cause is in that task's prompt or model, not the Colang flow. If every task returned what the flow needs, return to step three and recheck the conditions.

  5. Record the cause and the fix target

    Write down the single cause you found: missing or weak example utterances, a trigger that never matches the intent, state the flow depends on, or an LLM task response that did not fit the flow. Name the file and line you will change. Confirm that the fix is limited to that cause by rerunning the saved transcript after the change and checking that the earlier steps now pass. Keep the log output with the change record so reviewers can see what the engine did before and after the edit.

Diagnosing a flow that fires too often

Over-matching usually comes from the training data of the match, not from the flow body. In NeMo Guardrails, a user message is matched to a user intent by comparing it against the example utterances you wrote for that intent. When an example is short, generic, or shares wording with another intent ("can you help me with my account" is a typical case), the match can win for requests the flow was never meant to handle. Overlapping intents are the second common cause: two flows that both define "cancel" style phrasing will compete, and the one with closer example utterances wins. The third cause is conversational state. A flow whose trigger depends on an earlier turn can fire on a later message that looks harmless on its own, because the dialog context, not the message text, satisfied the condition. Check each of these three before rewriting any bot response.

To find the winning match, start by running the failing conversation with verbose output enabled and reading which intent was recognized and which flow was selected for each turn. Then compare the user message against the example utterances of the winning intent and of the intent that should have won. The logs and the explain() output show the decision path for the most recent response, which lets you see whether the flow was chosen by direct intent matching or by a condition over earlier turns. Your team should confirm the exact verbose and logging options for your installed version in the NeMo Guardrails documentation, because they differ between Colang versions.

The Colang version changes where you look. In Colang 1.0 (the default), you inspect the define user and define flow blocks and their example utterances in the .co files, with the trace showing which of them matched. In Colang 2.0, flows are written as sequences of statements with explicit await and matching, so an over-firing flow often traces back to a broader match or a missing condition on prior turns. The NeMo Guardrails Colang 2 migration guide says converted configurations still need manual review, so do not assume a converted bot fires the same way as the original. Keep a list of conversations that must and must not trigger each flow, and rerun it after every change.

Common causes of Colang flow failures

Most Colang flow problems fall into a small set of causes, and each leaves a different trace in logs and CLI output. Checking them in a fixed order usually narrows a failure to one file or one line within a few runs.

Misnamed intents and flows

A flow that references an intent name that does not match the define user or define flow name will never trigger, and the engine gives no error for the mismatch in every case. Compare each intent name in your flow files against its definition, character for character, including case and underscores. In the chat CLI, check whether the intent appears in the matched output when you type the phrase. A name mismatch is the most common silent failure.

Example utterances that drift

Intent matching depends on the example utterances you wrote, so a flow fires only when a user's wording sits close to them. Real users write shorter, misspelled or differently ordered phrasing, and examples written by the team often miss it. Collect the messages that failed from your logs and add them as examples, then confirm they match the intended intent in the CLI before you change anything else.

Flow ordering and overlap

When two flows can match the same message, the one the engine selects depends on how the flows are defined and ordered, not on which one you meant to win. A broad flow placed ahead of a specific one can absorb every match and make the specific flow look broken. Review flows that share intents or example phrasing, and use verbose output to see which flow was selected for a given turn.

Missing bot responses

A flow that matches but has no bot line or action to run produces an empty or unexpected reply, and the conversation appears to skip the rule entirely. Check that each bot message referenced in a flow is defined, and that its name matches exactly. Trace logs show which bot message was chosen, so an unexpected message there points to the missing or misnamed response.

Colang 1.0 and 2.x syntax mix

Files written in Colang 1.0 do not run under Colang 2.x, and a project that mixes both can load partially or fail in ways that look like matching problems. Confirm the Colang version declared in your configuration, and check that every file in the folder uses that version's syntax. The NVIDIA migration guide says converted configurations still need manual review, so treat converted flows as unverified until you test them.

Colang 2 migration guide

Configuration not reloaded

Changes to flow or configuration files take effect only after the rails are reloaded, so a server or notebook that still holds the old configuration keeps showing the old behavior. This can look like a fix that did not work. Restart the chat CLI or the guardrails server after each change, and confirm in the startup output that the expected files were loaded from the folder you edited.

Building regression tests for dialog changes

This sequence turns the Colang conversations that matter most into repeatable tests, so every change to flows, intents or configuration is checked against known behavior before it reaches users. The output is a fixture set and a suite the team reruns before each config change.

  1. Collect representative conversations as fixtures

    The conversation owner and a developer pull real or realistic dialogs from the team's test logs, support transcripts and the flow designs, then keep the turns that exercised each flow, each refusal and each known edge case. Each conversation is saved as a fixture file in the repository, with the user turns, the expected bot turns and the flow or intent that should fire. Done means every flow in the configuration has at least one positive fixture and one negative fixture that should not trigger it.

  2. Label expected flow activation and refusals

    For each fixture, the developer records which flows should activate, which should stay silent, and whether the bot should refuse or answer. Labels are written against the intended design in the Colang files, not against whatever the bot currently does, so a failing test reveals a real gap. The output is a labeled fixture set that a reviewer has checked for ambiguous cases, such as messages that could match two intents.

  3. Write a harness that replays fixtures

    A developer writes a small harness that loads the configuration folder and sends each fixture's user turns through either the Python API or a locally running guardrails server over HTTP. The harness records the bot responses and the flow activation information the runtime exposes, such as the verbose output or logs from the debugging steps. Done means one command replays every fixture and writes a readable result for each turn.

  4. Assert on activation and refusal outcomes

    The harness compares each recorded turn with the labels from the previous step. It asserts that expected flows fired, that unexpected flows stayed silent, and that refusals and answers match the expected outcome. Assertions should check behavior and flow names rather than exact wording of model-generated text, because generated wording can vary between runs. The output is a pass or fail result per fixture, with the first mismatched turn shown.

  5. Choose the test framework and run it in CI

    The team decides which test framework runs the harness, such as pytest or another runner already in use, and how results are reported. The team also decides whether the suite runs on every commit, on merge requests, or before release. Confirm with your own engineering standards which option fits. Done means the suite runs automatically and a failing fixture blocks the change.

  6. Set the threshold for accepting matching changes

    The product owner and the engineering lead agree in writing which failures block a change and which can be accepted, for example whether a borderline fixture may change outcome after a labeled review. They also decide who signs off on updating a label and what evidence is required. The output is a short written rule attached to the test suite, so reviewers apply the same standard to every change.

  7. Rerun the suite before each config change

    Before any change to config.yml, Colang files, actions or model settings is merged, the developer reruns the full suite and compares the results with the last accepted run. Any new failure is investigated with the debugging steps before the change proceeds. Done means the suite result is attached to the change record and each new or updated fixture is reviewed with the rest of the diff.

  8. Keep fixtures current as conversations change

    Each time a production issue or support ticket shows a dialog that the suite did not cover, the team adds it as a new fixture with its expected outcome and reruns the suite. Over time, the fixture set reflects how users actually talk to the assistant. Confirm how often your team reviews the fixture set, since that schedule is an internal decision rather than a product requirement.

How a user turn moves through intent matching and flows

A user message enters the NeMo Guardrails runtime, where intent matching compares it against canonical forms and example utterances. The matched flow then runs and produces a bot response. Debugging tools observe this path at different points: verbose mode and explain() show the matching and flow decisions, while structured logs and the chat CLI show what each stage produced. When a flow did not fire, check the match stage first, then the flow that was chosen.

Where debugging tools observe a single turn in NeMo Guardrails.

Security and operational considerations for debugging

Debugging tools make Colang flows easier to trace, and that same visibility can expose user messages, personal data and internal dialog design. The cards below cover the controls to set before debug output, configuration changes and test data leave a development environment.

Treat debug logs as sensitive data

Verbose output and structured logs can record user messages, matched intents and bot responses, and those messages may contain personal data or account details. Decide who can read these logs, where they are stored and how long they are kept before anyone turns debugging on. Confirm in your installed version which log fields include message content, because this varies by release and by logging settings.

NeMo Guardrails docs

Keep debug settings out of production

Verbose mode and detailed tracing are meant for investigating a specific flow, not for steady operation. Leaving them on in production increases the volume of personal data written to logs and can slow responses. Make debug options a per-environment setting in your deployment configuration, and confirm that the production server starts with them disabled.

Version and review every flow change

Colang files, config.yml and Python actions define how the assistant behaves, so a change to one flow can alter which requests are refused or allowed. Store these files in version control, require a review for changes to flows and intents, and tie each release to the NeMo Guardrails version it was tested against. Record the reason for each change next to the diff so later audits can trace it.

Control who can change dialog rules

Dialog flows are executable policy, so an unreviewed edit can weaken an existing rail without any code failure. Limit write access to the repository and deployment pipeline to named maintainers, and separate the people who write example utterances from those who approve releases. Ask your team how the review process handles changes to shared intent libraries that several flows depend on.

Build regression tests on synthetic dialogs

Regression tests for dialog changes should use invented conversations that exercise each flow, including borderline phrasings, rather than copies of production transcripts. Replaying real customer messages in a test environment moves personal data into a system with weaker access controls and longer retention. Keep a small set of reviewed synthetic cases in the repository and store any real-world examples only in an approved, access-limited location.

Confirm retention and access for test data

Test runs, captured fixtures and CI logs often persist longer than the people running them expect. Check where test output is written, which CI systems can read it, and how fixtures are deleted after use. Ask the team to document these settings for each environment so that the evidence trail for a debugging session can be shown during a review without exposing customer content.

Questions teams ask before debugging Colang flows

How much effort does debugging Colang flows usually take?

Effort depends on how many flows interact, how long the conversations are, and how much the LLM's behavior varies between runs. A small configuration with a few intents and one flow can be traced in a short session. A配置 with many flows that share user intents, and with several turns of state, takes longer because each failure has to be reproduced, traced to the flow that matched, and then checked against every other flow it could affect. The main drivers are:

  • Number of flows and shared canonical forms, since one example utterance can trigger several flows
  • Conversation length and how much state carries across turns
  • LLM variability, which makes some failures intermittent and harder to reproduce
  • Team familiarity with Colang syntax and the engine's matching behavior

Ask any partner to scope the work from your config repository and a sample of failing transcripts before agreeing on effort.

Can an internal team debug Colang flows without outside help?

Yes, many internal teams can do this themselves once they have the verbose logs, a stable test environment and someone who owns the Colang files. The work is mostly systematic: reproduce the failing turn, read the logs to see which intent and flow matched, adjust the flow or examples, and rerun the conversation. Teams usually find it harder when the configuration mixes Colang 1.0 and 2.0 patterns, when the model used for intent matching changes between environments, or when no one has written regression tests for earlier dialog behavior. Confirm internally that you have at least one engineer who can read the NeMo Guardrails documentation and an owner who can approve changes to flows that affect policy.

What do we need to provide before debugging starts?

A productive engagement starts with the materials that show the failure. Prepare the following:

  • Sample transcripts of the failing and passing conversations, with timestamps and the exact user wording
  • The configuration repository, including config.yml, Colang files and any Python actions
  • A test environment that runs the same NeMo Guardrails version as production, so results can be compared
  • Access to the model endpoints used for intent matching and generation, with credentials handled through your normal secrets process
  • Expected behavior written down for each case that should or should not fire a flow

If the environment cannot reach your model endpoints, confirm how the team will reproduce results before work begins.

How long does a fix cycle take, and what sets its length?

The length of a fix cycle depends on how quickly a failure can be reproduced, how many flows the change touches, and how long the regression suite takes to run against the model endpoints you use. A single flow adjustment with a clear reproduction is usually short to verify. A change to shared intents or to a multi-turn flow needs wider testing because it can alter behavior elsewhere. Ask for the fix cycle to be described as steps: reproduction, diagnosis, change, regression run and review. Your own test environment and model access will strongly influence how quickly each step completes.

What does a partner add compared with internal staff?

A partner brings a fixed-scope method for finding and fixing dialog failures, plus experience with the common failure patterns that appear across NeMo Guardrails projects. DeployOpen plans, implements, tests and documents self-hosted open-source platforms in your own infrastructure, so the debugging work can happen against your real environment and be written up for your team to maintain. Internal staff usually know your business rules better, while a partner can add systematic reproduction, regression test design and handover documentation. Most engagements are fixed-scope, with scope, deliverables and timelines agreed in writing before work starts.

How do we check whether a flow fired too often or not at all?

Start with verbose mode, which shows the flow and intent decisions made for each turn. Compare the logged decisions with the expected behavior for the transcript. If a flow did not fire, check whether the user phrasing matched any example utterances for the intended canonical form. If it fired too often, check whether its examples are too broad or overlap with another flow. Use the explain() output and the chat CLI to rerun the exact turn with small changes. Record each case in a regression test so the fix does not reverse later.

How do regression tests protect dialog changes over time?

Regression tests store representative conversations with expected flow outcomes and run them after every change to the configuration. They catch cases where a fix for one intent breaks another flow. Keep tests for both refusals and allowed requests, because tuning matching to stop false positives can cause false negatives. Run the suite against the same NeMo Guardrails version and model endpoints as production. Confirm with your team which conversations are business-critical, since those should be checked before any release.

Official NeMo Guardrails documentation to read first

Start debugging with the official NeMo Guardrails documentation at the NeMo Guardrails documentation site, because it is the reference for the behavior you are trying to explain. Read it against the version you actually run. The current library release is 0.25.0, published on 19 November 2026, and the previous release was 0.24.1 on 16 September 2026, so confirm the installed version with your package manager before you trust any example you copy. Pin that version in your debugging notes, since logging output, flow matching and configuration handling can change between releases. Check the release notes in the NeMo Guardrails GitHub releases for anything touching dialog rails or logging before you change a pinned version.

The documentation is where you confirm which Colang version your project uses. Colang 1.0 is the default and Colang 2.0 is also supported, and the two behave differently when a flow is evaluated. Before you read the debugging sections, confirm that your config.yml and Colang files match the version the page describes. If your project is on Colang 1.0 and you plan to move, read the Colang 2 migration guide first. It covers how Colang 1.0 constructs map to Colang 2.x and states that the nemoguardrails convert tool output still needs manual review. Treat a converted project as new code: a flow that fired before conversion may not fire the same way afterward, so repeat your regression checks on the converted files.

How DeployOpen scopes and supports Colang debugging

This sequence turns a vague report that a flow misfires into an agreed scope, reproduced failures, tested fixes and a regression suite the client keeps. DeployOpen implements and tests the work inside your own infrastructure, and the output is engineering evidence, not an audit report or certification.

  1. Agree a written scope before work starts

    DeployOpen and your team agree in writing which assistant, Colang version, flows, rails and environments are in scope, along with the failure reports to investigate and the deliverables. Your team confirms the NeMo Guardrails version in use, the Python version it runs on, and where the configuration lives, such as a repository or a server configuration folder. The step closes when the scope document is signed off and the fixed deliverables are listed. Quotes follow from this written scope, so the more precise the list of reported failures, the more precise the quote.

  2. Collect the failing conversations and configuration

    Your team provides the config.yml, the Colang files, any Python actions, and a set of transcripts or logs for each reported failure, including the model settings and the approximate time of each report. DeployOpen checks that the files load in the same version used in production. The step closes when every reported failure has a transcript and a matching configuration snapshot, so each case can be replayed rather than described from memory.

  3. Reproduce each failure in a sandbox

    DeployOpen replays each transcript in an isolated environment inside your infrastructure, using verbose mode, the explain() output and structured logs to see which user intent matched, which flow was selected and where the bot response came from. Each finding is classified as a flow that did not fire, a flow that fired too often, or a model or configuration issue. The step closes with a reproduction record per case that names the trigger, the matched element and the log evidence.

  4. Deliver fixes with the reasoning recorded

    DeployOpen changes the Colang flows, example utterances, or actions needed to correct each reproduced failure, and records why each change addresses its cause. Changes are kept small so your team can review each one against the original transcript. Where a fix depends on a model or setting choice, the options and their trade-offs are written down for your decision rather than applied silently. The step closes when every reproduced failure has a documented change and a before and after result from the sandbox.

  5. Build regression tests for dialog changes

    DeployOpen adds tests that replay the reported conversations and a set of nearby legitimate and borderline turns, so that a later edit to the flows that breaks a working path is caught. The tests are stored with the configuration in your version control system and can run in your existing pipeline. The step closes when the test suite passes on the fixed configuration and fails on the original configuration for each reproduced case, which shows the tests detect the fault they were written for.

  6. Hand over and verify in your environment

    DeployOpen walks your engineers through the changes, the test suite and the logging settings, and your team runs the tests and a chat CLI session in its own environment. Your team confirms the results match the sandbox. The step closes when your engineers have run the suite themselves and the handover notes list open items and any settings to confirm with the NeMo Guardrails documentation for your version.

  7. Support ongoing dialog changes under a retainer

    If your assistant keeps changing, DeployOpen can support new flow edits, regression runs and reviews of pull requests under an optional retainer agreed in writing. Retainer scope, response expectations and the upgrade work for later NeMo Guardrails releases are set out in that agreement, not assumed. The step is complete when the retainer terms are signed and the first review cycle is recorded against the regression suite.

  8. Understand what the work does not certify

    DeployOpen implements, tests and documents the platform inside your infrastructure and prepares the evidence your team can show a reviewer, such as test results and change records. DeployOpen does not issue audit reports, attestations or certifications, and independent auditors or certification bodies perform those assessments. Your compliance team should confirm with them which evidence they will accept before the scope is signed. The step closes when that question is answered and recorded in the scope document.

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.