The documentation is divided into the following sections:
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!
This guide sheds more light on the infrastructure details and the execution flow for a query when the runtime is used:
-
Via an API (Server-less): Learn how the Guardrails runtime works under the hood!
-
Request is sent to a Colang server (Server Arch): Understand the architecture of the Guardrails server!