NeMo Guardrails RunnableRails wrapper blocks LangChain chain output on Colang policy violations
NVIDIA NeMo Guardrails integrates with LangChain via the RunnableRails wrapper, which wraps an LLM or chain in a guardrails pipeline; when a Colang policy rule fires for a LangChain-generated response, RunnableRails intercepts the response and enforces the configured rail (for example by replacing the output with a safe response or refusing to return it), preventing the policy-violating abstraction from reaching the caller.
Linked Evidence
Shows that NeMo Guardrails provides a LangChain-native RunnableRails wrapper which intercepts LangChain chain or runnable outputs and applies NeMo guardrail policies, ensuring that unsafe or policy-violating responses are blocked or transformed before being returned.
RunnableRails — NVIDIA NeMo Guardrails Library Developer GuideDemonstrates, in a practical LangChain template, that responses generated by a LangChain-based RAG application are passed through NeMo Guardrails configuration and rails before being sent back to the client, so that policy-violating outputs are intercepted and handled according to Colang rules.
This blog is the evidence artifact that more clearly describes the way that NeMo Guardrails can be used to block a data abstraction; the RunnableRails document is more generic about how to set it up.
