@@ -54,6 +56,8 @@ Key benefits of adding *programmable guardrails* include:
- **Controllable dialog**: you can steer the LLM to follow pre-defined conversational paths, allowing you to design the interaction following conversation design best practices and enforce standard operating procedures (e.g., authentication, support).
+
+
### Protecting against LLM Vulnerabilities
NeMo Guardrails provides several mechanisms for protecting an LLM-powered chat application against common LLM vulnerabilities, such as jailbreaks and prompt injections. Below is a sample overview of the protection offered by different guardrails configuration for the example [ABC Bot](./examples/bots/abc) included in this repository. For more details, please refer to the [LLM Vulnerability Scanning](https://docs.nvidia.com/nemo/guardrails/evaluation/llm-vulnerability-scanning.html) page.
diff --git a/docs/Dockerfile b/docs/Dockerfile
new file mode 100644
index 000000000..3d2a80d3f
--- /dev/null
+++ b/docs/Dockerfile
@@ -0,0 +1,33 @@
+# Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+FROM python:3.10
+
+ARG UID=1000
+
+ENV POETRY_VERSION=1.8.2
+ENV POETRY_HOME=/opt/poetry
+ENV PATH="${PATH}:${POETRY_HOME}/bin"
+
+RUN apt-get update && DEBIAN_FRONTEND=noninteractive \
+ && apt-get install --no-install-recommends -y \
+ curl \
+ python3-pip \
+ jq \
+ lsb-release
+
+RUN curl -sSL https://install.python-poetry.org | POETRY_VERSION="${POETRY_VERSION}" POETRY_HOME="${POETRY_HOME}" python -
+
+RUN useradd -u "${UID}" -ms /bin/bash nvs
+RUN --mount=type=bind,target=/work poetry config virtualenvs.create false && poetry install -C /work --with docs --no-interaction --no-ansi
diff --git a/docs/README.md b/docs/README.md
index 5f618fd60..7032f3eb8 100644
--- a/docs/README.md
+++ b/docs/README.md
@@ -1,87 +1,33 @@
# Documentation
-The documentation is divided into the following sections:
+## Product Documentation
-- [Getting Started](#getting-started)
-- [Examples](#examples)
-- [User Guides](#user-guides)
-- [Evaluation Tools](#evaluation-tools)
-- [Security](#security)
-- [Advanced Guides](#advanced-guides)
+Product documentation for the toolkit is available at
+.
-## Getting Started
+## Building the Documentation
-This section will help you get started quickly with NeMo Guardrails.
+1. Build the container:
-* [Installation guide](getting-started/installation-guide.md): This guide walks you through the process of setting up your environment and installing NeMo Guardrails
-* [Getting Started guides](./getting-started): 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.
+ ```console
+ docker build -t guard-tk-docs:dev --build-arg UID=$(id -u) docs
+ ```
-## Examples
+1. Start the container:
-The [examples folder](https://github.com/NVIDIA/NeMo-Guardrails/tree/develop/examples) contains multiple examples that showcase a particular aspect of using NeMo Guardrails.
+ ```console
+ docker run --rm -it -v $(pwd):/work -w /work -u $(id -u) guard-tk-docs:dev bash
+ ```
-* [Bots](https://github.com/NVIDIA/NeMo-Guardrails/tree/develop/examples/bots): This section includes two example configurations.
- * [HelloWorldBot](https://github.com/NVIDIA/NeMo-Guardrails/tree/develop/examples/bots/hello_world): This basic configuration instructs the bot to greet the user using "Hello World!" and to not talk about politics or the stock market.
- * [ABCBot](https://github.com/NVIDIA/NeMo-Guardrails/tree/develop/examples/bots/abc): This more complex configuration includes topical rails, input and output moderation and retrieval augmented generation.
-* [Configs](https://github.com/NVIDIA/NeMo-Guardrails/tree/develop/examples/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](https://github.com/NVIDIA/NeMo-Guardrails/tree/develop/examples/scripts): These short scripts showcase various aspects of the main Python API.
+1. Build the documentation:
+ ```console
+ sphinx-build -b html docs _build/docs
+ ```
-```{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.
-```
+## Publishing the Documentation
-## User Guides
+Tag the commit to publish with `docs-v`.
+Push the tag to GitHub.
-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](user-guides/configuration-guide.md): The complete guide to all the configuration options available in the `config.yml` file.
-* [Guardrails Library](user-guides/guardrails-library.md): An overview of the starter built-in rails that NeMo Guardrails provide.
-* [Guardrails Process](user-guides/guardrails-process.md): A detailed description of the guardrails process, i.e., the categories of rails and how they are called.
-* [Colang Language Guide](user-guides/colang-language-syntax-guide.md): Learn the syntax and core concepts of Colang.
-* [LLM Support for Guardrails](user-guides/llm-support.md): An easy to grasp summary of the current LLM support.
-* [Python API](user-guides/python-api.md): Learn about the Python API, e.g., the `RailsConfig` and `LLMRails` classes.
-* [CLI](user-guides/cli.md): Learn about the NeMo Guardrails CLI that can help you use the Chat CLI or start a server.
-* [Server Guide](user-guides/server-guide.md): Learn how to use the NeMo Guardrails server.
-* [Integration with LangChain](user-guides/langchain/langchain-integration.md): Integrate guardrails in your existing LangChain-powered app.
-* [Detailed Logging](user-guides/detailed-logging/README.md): Learn how to get detailed logging information.
-
-## Security
-
-* [Security Guidelines](./security/guidelines.md): Learn about some of the best practices for securely integrating an LLM into your application.
-* [Red-teaming](./security/red-teaming.md): Learn how you can use the experimental NeMo Guardrails red-teaming interface.
-
-## Evaluation Tools
-
-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](https://github.com/NVIDIA/NeMo-Guardrails/tree/develop/nemoguardrails/eval): General explanation for the CLI evaluation tools and experimental results.
-* [Topical Rail Evaluation - Dataset Tools](https://github.com/NVIDIA/NeMo-Guardrails/blob/develop/nemoguardrails/evaluate/data/topical/README.md): Dataset tools and details to run experiments for topical rails.
-* [Fact-checking Rail Evaluation - Dataset Tools](https://github.com/NVIDIA/NeMo-Guardrails/blob/develop/nemoguardrails/evaluate/data/factchecking/README.md): Dataset tools and details to run experiments for fact-checking execution rail.
-* [Moderation Rail Evaluation - Dataset Tools](https://github.com/NVIDIA/NeMo-Guardrails/blob/develop/nemoguardrails/evaluate/data/moderation/README.md): Dataset tools and details to run experiments for moderation execution rail.
-
-## Advanced Guides
-
-The following guides explain in more details various specific topics:
-
-* [Generation Options](user-guides/advanced/generation-options.md): Learn how to have to use advanced generation options.
-* [Prompt Customization](user-guides/advanced/prompt-customization.md): Learn how to customize the prompts for a new (or existing) type of LLM.
-* [Embedding Search Providers](user-guides/advanced/embedding-search-providers.md): Learn about the core embedding search interface that NeMo guardrails uses for some of the core features.
-* [Using Docker](user-guides/advanced/using-docker.md): Learn how to deploy NeMo Guardrails using Docker.
-* [Streaming](user-guides/advanced/streaming.md): Learn about the streaming support in NeMo Guardrails.
-* [AlignScore deployment](user-guides/advanced/align-score-deployment.md): Learn how to deploy an AlignScore server either directly or using Docker.
-* [Extract User-provided Values](user-guides/advanced/extract-user-provided-values.md): Learn how to extract user-provided values like a name, a date or a query.
-* [Bot Message Instructions](user-guides/advanced/bot-message-instructions.md): Learn how to further tweak the bot messages with specific instructions at runtime.
-* [Event-based API](user-guides/advanced/event-based-api.md): Learn about the generic event-based interface that you can use to process additional information in your guardrails configuration.
-* [Jailbreak Detection Heuristics Deployment](user-guides/advanced/jailbreak-detection-deployment.md): Learn how to deploy the jailbreak detection heuristics server.
-* [Llama Guard Deployment](user-guides/advanced/llama-guard-deployment.md): Learn how to deploy Llama Guard using vLLM.
-* [Nested AsyncIO Loop](user-guides/advanced/nested-async-loop.md): Understand some of the low level issues regarding `asyncio` and how they are handled in NeMo Guardrails.
-* [Vertex AI Setup](user-guides/advanced/vertexai-setup.md): Learn how to setup a Vertex AI account.
-
-
-## Other
-
-* [Architecture](./architecture/README.md#the-guardrails-process): Learn how the Guardrails runtime works under the hood.
-* [Glossary](./glossary.md)
-* [FAQs](./faqs.md)
+To avoid publishing the documentation as the latest, ensure the commit has `/not-latest` on a single line, tag that commit, and push to GitHub.
diff --git a/docs/conf.py b/docs/conf.py
new file mode 100644
index 000000000..ec3f73374
--- /dev/null
+++ b/docs/conf.py
@@ -0,0 +1,86 @@
+# SPDX-FileCopyrightText: Copyright (c) 2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
+# SPDX-License-Identifier: Apache-2.0
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Copyright (c) 2024, NVIDIA CORPORATION.
+
+from datetime import date
+
+from toml import load
+
+project = "NVIDIA NeMo Guardrails"
+this_year = date.today().year
+copyright = f"2023-{this_year}, NVIDIA Corporation"
+author = "NVIDIA Corporation"
+release = "0.0.0"
+with open("../pyproject.toml") as f:
+ t = load(f)
+ release = t.get("tool").get("poetry").get("version")
+
+extensions = [
+ "myst_parser",
+ "sphinx.ext.intersphinx",
+ "sphinx_copybutton",
+ "sphinx_reredirects",
+]
+
+redirects = {
+ "introduction": "index.html",
+ "documentation": "index.html",
+}
+
+copybutton_exclude = ".linenos, .gp, .go"
+
+myst_linkify_fuzzy_links = False
+myst_heading_anchors = 3
+myst_enable_extensions = [
+ "deflist",
+ "dollarmath",
+ "fieldlist",
+ "substitution",
+]
+
+myst_substitutions = {
+ "version": release,
+}
+
+exclude_patterns = [
+ "_build/**",
+]
+
+# intersphinx_mapping = {
+# 'gpu-op': ('https://docs.nvidia.com/datacenter/cloud-native/gpu-operator/latest', None),
+# }
+
+# suppress_warnings = ["etoc.toctree", "myst.header", "misc.highlighting_failure"]
+
+html_theme = "nvidia_sphinx_theme"
+html_copy_source = False
+html_show_sourcelink = False
+html_show_sphinx = False
+
+html_domain_indices = False
+html_use_index = False
+html_extra_path = ["project.json", "versions1.json"]
+highlight_language = "console"
+
+html_theme_options = {
+ "icon_links": [],
+ "switcher": {
+ "json_url": "../versions1.json",
+ "version_match": release,
+ },
+}
+
+html_baseurl = "https://docs.nvidia.com/nemo/guardrails/latest/"
diff --git a/docs/index.md b/docs/index.md
new file mode 100644
index 000000000..9f8339f6c
--- /dev/null
+++ b/docs/index.md
@@ -0,0 +1,117 @@
+
+
+# About NeMo Guardrails
+
+```{include} ../README.md
+:start-after:
+:end-before: