About Configuring Guardrails#
This section explains how to configure your guardrails system, from defining LLM models and guardrail flows in YAML to implementing advanced features like Colang flows and custom actions.
Before You Begin with Configuring Guardrails#
Before diving into configuring guardrails, ensure you have the required components ready and understand the overall structure of the guardrails system.
Prepare LLM endpoints, NemoGuard NIMs, and knowledge base documents before configuration.
Learn to write config.yml, Colang flows, and custom actions for guardrails.
Core Configuration#
Configure the essential components of your guardrails system.
Define models, guardrails, prompts, and tracing settings in the config.yml file.
Reference for all config.yml options including models, rails, prompts, and advanced settings.
Reference for pre-built guardrails including content safety, jailbreak detection, PII handling, and fact checking.
Learn Colang, the event-driven language for defining guardrails flows and bot behavior.
Advanced Configuration#
Optional configurations for extending and optimizing your guardrails system.
Create Python actions to extend guardrails with external APIs and validation logic.
Use config.py to register custom LLM providers, embedding providers, and shared resources at startup.
Additional configuration topics including knowledge base setup and exception handling.
Configure in-memory caching for LLM calls and KV cache reuse to improve performance and reduce latency.
Raise and handle exceptions in guardrails flows to control error behavior and custom responses.