Guardrail Tutorials

View as Markdown

Use the following tutorials to learn how to accomplish common guardrail tasks using the NeMo Guardrails API.

Before starting a tutorial, complete Setup to configure a ModelProvider and discover models. The tutorials assume you have models available in the default workspace.

Once a ModelProvider is configured, use Model Entity references (workspace/name format) as the model in your guardrail configurations. The guardrails plugin resolves task model endpoints through IGW’s route table. Refer to Model Routing for more details.

guardrails_config = {
"models": [
{
"type": "content_safety",
"engine": "nim",
"model": "default/nvidia-llama-3-1-nemotron-safety-guard-8b-v3",
}
],
# ... rest of config
}