The documentation is divided into the following sections:
This section will help you get started quickly with NeMo Guardrails.
- Installation guide: This guide walks you through the process of setting up your environment and installing NeMo Guardrails
- Getting Started guides: A series of guides that will help you understand the core concepts and build your first guardrails configurations. These guides include Jupyter notebooks that you can experiment with.
The examples folder contains multiple examples that showcase a particular aspect of using NeMo Guardrails.
- Bots: This section includes two example configurations.
- HelloWorldBot: This basic configuration instructs the bot to greet the user using "Hello World!" and to not talk about politics or the stock market.
- ABCBot: This more complex configuration includes topical rails, input and output moderation and retrieval augmented generation.
- Configs: These example configurations showcase specific NeMo Guardrails features, e.g., how to use various LLM providers, Retrieval Augmented Generation, streaming, red-teaming, authentication, etc.
- Scripts: These short scripts showcase various aspects of the main Python API.
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 guides cover the core details of the NeMo Guardrails toolkit and how to configure and use different features to make your own rails.
- Guardrails Configuration Guide: The complete guide to all the configuration options available in the
config.yml
file. - Guardrails Library: An overview of the starter built-in rails that NeMo Guardrails provide.
- Guardrails Process: A detailed description of the guardrails process, i.e., the categories of rails and how they are called.
- Colang Language Guide: Learn the syntax and core concepts of Colang.
- LLM Support for Guardrails: An easy to grasp summary of the current LLM support.
- Python API: Learn about the Python API, e.g., the
RailsConfig
andLLMRails
classes. - CLI: Learn about the NeMo Guardrails CLI that can help you use the Chat CLI or start a server.
- Server Guide: Learn how to use the NeMo Guardrails server.
- Integration with LangChain: Integrate guardrails in your existing LangChain-powered app.
- Detailed Logging: Learn how to get detailed logging information.
- Security Guidelines: Learn about some of the best practices for securely integrating an LLM into your application.
- Red-teaming: Learn how you can use the experimental NeMo Guardrails red-teaming interface.
NeMo Guardrails provides 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.
The following guides explain in more details various specific topics:
- Generation Options: Learn how to have to use advanced generation options.
- Prompt Customization: Learn how to customize the prompts for a new (or existing) type of LLM.
- Embedding Search Providers: Learn about the core embedding search interface that NeMo guardrails uses for some of the core features.
- Using Docker: Learn how to deploy NeMo Guardrails using Docker.
- Streaming: Learn about the streaming support in NeMo Guardrails.
- AlignScore deployment: Learn how to deploy an AlignScore server either directly or using Docker.
- Extract User-provided Values: Learn how to extract user-provided values like a name, a date or a query.
- Bot Message Instructions: Learn how to further tweak the bot messages with specific instructions at runtime.
- Event-based API: Learn about the generic event-based interface that you can use to process additional information in your guardrails configuration.
- Jailbreak Detection Heuristics Deployment: Learn how to deploy the jailbreak detection heuristics server.
- Llama Guard Deployment: Learn how to deploy Llama Guard using vLLM.
- Nested AsyncIO Loop: Understand some of the low level issues regarding
asyncio
and how they are handled in NeMo Guardrails. - Vertex AI Setup: Learn how to setup a Vertex AI account.
- Architecture: Learn how the Guardrails runtime works under the hood.
- Glossary
- FAQs