Sefism is free for learners. We are here to help you grow, one step at a time.Join for free
Sefism.
Tool · AI & Machine LearningFree

NeMo Guardrails

NVIDIA's open source toolkit for adding programmable guardrails to LLM apps: input, dialog, retrieval, execution and output rails, with built-in checks such as jailbreak detection and content safety. A hands-on way to learn where guards sit in an app and why each one is only a layer.

GitHub stars

7.3k

GitHub · Oct 2026

Licence

Apache 2.0

GitHub · Oct 2026

Latest version

0.24.1

GitHub · Oct 2026

Format

Tool

Topic

AI & Machine Learning

Provider

NVIDIA

Time needed

A weekend to wire into a small app

Level

Intermediate

Access

Free

What NeMo Guardrails does

NeMo Guardrails is an open source Python toolkit from NVIDIA for adding guardrails to applications built on large language models. A guardrail, or rail, is a check or rule that runs around the model to control what goes in, what comes out and what the app is allowed to do.

The toolkit groups rails into five kinds:

  • Input rails run on the user's message and can reject or change it.
  • Dialog rails shape how the conversation flows and how the model is prompted.
  • Retrieval rails filter or change the chunks a RAG app retrieves before the model sees them.
  • Execution rails check the inputs and outputs of tools and actions.
  • Output rails check the model's answer before it reaches the user.

Rails are configured in YAML and in Colang, a small Python-like language for describing dialog flows and guardrail logic. The project ships integrations for jailbreak detection, content safety, topic control and NVIDIA's own safety models, plus self-check rails that ask a model to review an input or output.

Is it worth your time?

Yes, if you are building or defending LLM apps. Wiring a few rails into your own practice app teaches the guard layer better than reading about it: you see where each check runs, what it costs in latency and how often it blocks harmless requests.

It also teaches the main lesson about guardrails. Most model-based rails are probabilistic and can be bypassed, so they sit on top of design controls such as least-privilege tools, permission-aware retrieval and output encoding, never in place of them. The execution rails are a good bridge to that idea, because checks on tool arguments in code are harder to talk round.

Prerequisites

Python, a working LLM app (a local model through Ollama is enough), and a clear idea of what your app should and should not do.

How to use it well

  • Start with one input rail and one output rail, then add execution rails on your riskiest tool.
  • Measure false blocks on normal requests as well as what the rails catch.
  • Write a test for each rail in your eval suite so a config change cannot silently remove it.
  • Check the project page for current Python support and version before you start.

Free or paid?

Free and open source under the Apache 2.0 licence.

aillmpythonopen source

Ready to start?

Opens on NVIDIA in a new tab.

Open resource
Link broken or out of date?

Report a problem

With "NeMo Guardrails". Only Tauseef reads this.

Work with me

Stuck on something specific?

Writing only gets you so far. If you want an answer to your situation rather than the general case, book a session and we will work through it together. Sessions are free for approved Sefism members, and a few slots open each week.