The documentation is divided into the following sections:
- Getting Started
- Examples
- User Guide
- Evaluation Tools
- Architecture Guide
- Security Guidelines
- API Reference
The getting started section covers two topics:
- Installation Guide: This guide walks you through the process of setting up an environment to run Guardrails. It also showcases the various ways in which you can interact with the bot.
- The "Hello World" example: This example walks you through setting up basic rails along with peeling some layers for the Guardrail runtime to explain how the rails work.
Five reference examples are provided as a general demonstration for building different types of rails:
- Topical Rail: Making the bot stick to a specific topic of conversation.
- Moderation Rail: Moderating a bot's response.
- Fact Checking and Hallucination Rail: Ensuring factual answers.
- Secure Execution Rail: Executing a third-party service with LLMs.
- Jailbreaking Rail: Ensuring safe answers despite malicious intent from the user.
Note: These examples are meant to showcase the process of building rails, not as out-of-the-box safety features. Customization and strengthening of the rails is highly recommended.
The user guide covers the core details of the Guardrails toolkit and how to configure and use different features to make your own rails.
- Colang Language Guide: Learn about Colang, the language at the heart of NeMo Guardrails.
- Colang Syntax Reference Guide: General keyword ledger.
- Guardrails Configuration Guide: Learn how to do general configurations such as adding a system prompt.
- Python API: Explore the Python API for Guardrails!
- Integration with LangChain: Integrate Guardrails in your existing LangChain-powered app or bring your preferred Chains to Guardrails.
- Server Guide: General explanation for the Guardrails Servers.
- Interface Guide: Learn the different ways in which to interact with the bot.
The following guides explain in more details various specific topics:
- Extract User Provided Values: Learn how to extract user-provided values like a name, a date or a query.
We provide a set of CLI evaluation tools and experimental results for topical and execution rails. There are also detailed guides on how to reproduce results and create datasets for the evaluation of each type of rail.
- Evaluation Tools and Results: General explanation for the CLI evaluation tools and experimental results.
- Topical Rail Evaluation - Dataset Tools: Dataset tools and details to run experiments for topical rails.
- Fact-checking Rail Evaluation - Dataset Tools: Dataset tools and details to run experiments for fact-checking execution rail.
- Moderation Rail Evaluation - Dataset Tools: Dataset tools and details to run experiments for moderation execution rail.
This guide sheds more light on the infrastructure details and the execution flow for a query when the runtime is used:
-
The Guardrails Process: Learn how the Guardrails runtime works under the hood.
-
Server Architecture: Understand the architecture of the Guardrails server.