NVIDIA's NeMo Guardrails: Writing Conversational Rules with Colang

By Carlos Montiel | Enterprise AI Specialist
Leer en español →
Published: 2026-07-28 | By: Carlos Montiel | Reading time: ~4 minutes

Most guardrails decide whether to block or allow a single, isolated message. NeMo Guardrails goes further: it defines full conversational flows with its own language, Colang.

Colang: a language dedicated to defining guardrails

Colang defines conversational flows, guardrail logic, and event-driven behavior. Every policy you want to apply gets written as a Colang flow — flows define what happens on each conversational event, and support conditional branching, action calls, and multi-turn state tracking, not just evaluation of a single isolated message.

Five rail types, each with its own role

Input rails review or transform the prompt before it reaches the model. Dialog rails keep the bot focused on topic. Retrieval rails filter RAG chunks before they enter the context. Execution rails govern which actions the system is allowed to take. Output rails vet the model's final response before it reaches the user — five distinct intervention points across the whole flow, not just one.

The configuration structure

A guardrails configuration consists of YAML files that define models, prompts, rails, tracing, and runtime settings; Colang flows that define the conversational and guardrail logic; and Python functions, tools, or external APIs that extend the guardrails with application-specific validations. Files are organized in a config folder with config.yml, a rails directory with .co files, and actions.py for custom actions invoked from the Colang flows.

When NeMo Guardrails is the right choice

NeMo Guardrails shines specifically when you need complex, stateful conversational logic — not just “block if it contains X,” but “if the user mentioned Y in an earlier turn, apply a different rule now.” For simpler, isolated output-validation guardrails, Guardrails AI or each cloud's native solutions (Bedrock Guardrails, Azure Content Safety) tend to be faster to implement without the learning curve of a new language like Colang.

Still current as of 2026

The most recent 2026 documentation and guides confirm this configuration approach remains the current way to build safety and control logic around LLM applications — it's not an abandoned tool, it's still actively maintained by NVIDIA as part of its broader NeMo stack for enterprise AI.

Carlos Montiel
Enterprise AI Solutions Architect
Specialist in LLMs, Agents, and Orchestration
guatemalia.com/en/#contact · info@guatemalia.com

Need to implement AI at your company?

Carlos Montiel is an enterprise AI solutions architect. He implements LLMs, Agents, RAG, and orchestrators for companies across Guatemala and Latin America. Reach out for a consultation.

Contact Carlos Montiel

info@guatemalia.com