AI GitHub
NeMo Guardrails for policy around model conversations
Define checks and conversational flows around an application's model calls.
Key Takeaways
- Guardrails configuration can specify actions and input or output rails.
- Begin with a narrow policy and a fixture that shows the allowed behavior as well as blocked actions.
- Write one rule for a narrow disallowed action and build a test set with clear violations and borderline requests.
- Every rail has a cost and a failure mode.
How it works
Guardrails configuration can specify actions and input or output rails. These controls run at defined points in the conversation and can use rules or models depending on configuration.
What you need
Begin with a narrow policy and a fixture that shows the allowed behavior as well as blocked actions. Configure the app's response when a rail fails or cannot run.
What to try first
Write one rule for a narrow disallowed action and build a test set with clear violations and borderline requests. Compare decisions against the written policy.
Test a policy check when its model or external action is unavailable. The application should have a defined response when the check cannot reach a decision.
Where to look for failures
Every rail has a cost and a failure mode. Treat policy checks as a separate layer from authentication and authorization in the application.
Related Franklin pages
Separate policy checks, structured output validation and data redaction. Apply a narrowly defined test to each layer before measuring the combined application behavior.
- Apply validators to model outputs before downstream code consumes them. Guardrails AI for validating generated output
- Identify likely personal information in text and apply redaction or replacement rules. Presidio for detecting and transforming personal data
For broader questions about the risks of deploying AI systems, see Franklin’s glossary. AI safety
Project documentation
Try it for your workflow
Explore the project’s documentation for setup and usage, or save this page to a collection for later.
Read the project documentation ↗