Skip to content

Commit 7b77778

Browse files
authored
doc fixes (#1600)
1 parent 032e096 commit 7b77778

9 files changed

Lines changed: 53 additions & 58 deletions

docs/about/overview.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ The NeMo Guardrails library provides multiple approaches to content safety:
4848
- **LLM self-checking**: Use the LLM itself to check inputs and outputs for harmful content.
4949
- **NVIDIA safety models**: Integrate with [Llama 3.1 NemoGuard 8B Content Safety](https://build.nvidia.com/nvidia/llama-3_1-nemotron-safety-guard-8b-v3) for robust content moderation.
5050
- **Community models**: Use [LlamaGuard](../user-guides/community/llama-guard.md), [Fiddler Guardrails](../user-guides/community/fiddler.md), and other community content safety solutions.
51-
- **Third-party APIs**: Integrate with [ActiveFence](../configure-rails/yaml-schema/guardrails-configuration/built-in-guardrails.md#activefence), [Cisco AI Defense](../user-guides/community/ai-defense.md), and other moderation services.
51+
- **Third-party APIs**: Integrate with [ActiveFence](../configure-rails/guardrail-catalog.md#activefence), [Cisco AI Defense](../user-guides/community/ai-defense.md), and other moderation services.
5252

5353
For practical examples, try the following tutorials:
5454

@@ -98,7 +98,7 @@ The NeMo Guardrails library supports PII detection through multiple integrations
9898

9999
PII detection can be configured to either detect and block content containing PII or to mask PII entities before processing.
100100

101-
For more information, refer to the [Presidio Integration](../user-guides/community/presidio.md) and [Sensitive Data Detection section](../configure-rails/yaml-schema/guardrails-configuration/built-in-guardrails.md#presidio-based-sensitive-data-detection) in the built-in Guardrails library.
101+
For more information, refer to the [Presidio Integration](../user-guides/community/presidio.md) and [Sensitive Data Detection section](../configure-rails/guardrail-catalog.md#presidio-based-sensitive-data-detection) in the Guardrail Catalog.
102102
:::
103103

104104
:::{dropdown} 🤖 Add Agentic Security
@@ -108,7 +108,7 @@ This includes:
108108

109109
- **Tool call validation**: Execute rails that validate tool inputs and outputs before and after invocation.
110110
- **Agent workflow protection**: Integrate with [LangGraph](../integration/langchain/langgraph-integration.md) for multi-agent safety.
111-
- **Secure tool integration**: Review guidelines for safely connecting LLMs to external resources (refer to [Security Guidelines](../security/guidelines.md)).
111+
- **Secure tool integration**: Review guidelines for safely connecting LLMs to external resources (refer to [Security Guidelines](../resources/security/guidelines.md)).
112112
- **Action monitoring**: Monitor detailed logging and tracing of agent actions.
113113

114114
Key security considerations for agent systems:
@@ -118,7 +118,7 @@ Key security considerations for agent systems:
118118
3. Apply execution rails to tool calls.
119119
4. Monitor agent behavior for unexpected actions.
120120

121-
For more information, refer to the [Tools Integration Guide](../integration/tools-integration.md), [Security Guidelines](../security/guidelines.md), and [LangGraph Integration](../integration/langchain/langgraph-integration.md).
121+
For more information, refer to the [Tools Integration Guide](../integration/tools-integration.md), [Security Guidelines](../resources/security/guidelines.md), and [LangGraph Integration](../integration/langchain/langgraph-integration.md).
122122
:::
123123

124124
:::{dropdown} 🔧 Build Your Own or Use Third-party Guardrail Solutions
@@ -130,7 +130,7 @@ If you have a script or tool that runs a custom guardrail, you can use it in NeM
130130

131131
2. **LangChain tool integration**: Register LangChain tools as custom actions. For more information, refer to the [](../integration/tools-integration.md).
132132

133-
3. **Third-party API integration**: Integrate external moderation and validation services. For a complete list of supported third-party guardrail services, refer to the [](../configure-rails/yaml-schema/guardrails-configuration/built-in-guardrails.md#third-party-apis) section in the built-in Guardrails library.
133+
3. **Third-party API integration**: Integrate external moderation and validation services. For a complete list of supported third-party guardrail services, refer to the [Third-Party APIs](../configure-rails/guardrail-catalog.md#third-party-apis) section in the Guardrail Catalog.
134134
:::
135135

136136
:::{dropdown} 🔌 Integrate NeMo Guardrails Library into Your Application

docs/getting-started/installation-guide.md

Lines changed: 7 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title:
33
page: "Install the NeMo Guardrails Library"
4-
nav: "Install"
4+
nav: "Installation"
55
description: "Install NeMo Guardrails with pip, configure your environment, and verify the installation."
66
topics: ["Get Started", "AI Safety"]
77
tags: ["Installation", "Python", "pip", "Docker", "Setup"]
@@ -15,7 +15,7 @@ content:
1515

1616
Follow these steps to install the NeMo Guardrails library.
1717

18-
## Requirements
18+
## Prerequisites
1919

2020
Verify your system meets the following requirements before installation.
2121

@@ -46,7 +46,7 @@ Use the following steps to install the NeMo Guardrails library in a virtual envi
4646

4747
```bash
4848
python -m venv .venv
49-
.venv\Scripts\activate
49+
source .venv/Scripts/activate
5050
```
5151

5252
:::
@@ -67,25 +67,14 @@ Use the following steps to install the NeMo Guardrails library in a virtual envi
6767

6868
This is required to access NVIDIA-hosted models on [build.nvidia.com](https://build.nvidia.com). The tutorials and example configurations ([examples/configs](https://github.com/NVIDIA-NeMo/Guardrails/tree/develop/examples/configs)) in this library include configurations that use NVIDIA-hosted models.
6969

70-
## Install from Source
70+
## Alternative Installation Methods
7171

72-
To use the latest development version:
72+
Install the NeMo Guardrails library from source using pip or Poetry. Choose this method if you want to contribute to the library or use the latest development version.
7373

7474
::::{tab-set}
7575

7676
:::{tab-item} pip
7777

78-
```bash
79-
python -m venv .venv
80-
source .venv/bin/activate
81-
pip install nemoguardrails[nvidia]
82-
export NVIDIA_API_KEY="nvapi-..."
83-
```
84-
85-
:::
86-
87-
:::{tab-item} pip (development)
88-
8978
```bash
9079
git clone https://github.com/NVIDIA-NeMo/Guardrails.git nemoguardrails
9180
cd nemoguardrails
@@ -96,7 +85,7 @@ pip install -e .
9685

9786
:::
9887

99-
:::{tab-item} Poetry (development)
88+
:::{tab-item} Poetry
10089

10190
```bash
10291
git clone https://github.com/NVIDIA-NeMo/Guardrails.git nemoguardrails
@@ -124,7 +113,7 @@ You can install the NeMo Guardrails library with optional extra packages to add
124113
|-------|-------------|
125114
| `nvidia` | NVIDIA-hosted model integration through [build.nvidia.com](https://build.nvidia.com/) |
126115
| `openai` | OpenAI-hosted model integration |
127-
| `sdd` | [Sensitive data detection](../configure-rails/yaml-schema/guardrails-configuration/built-in-guardrails.md#presidio-based-sensitive-data-detection) using Presidio |
116+
| `sdd` | [Sensitive data detection](../configure-rails/guardrail-catalog.md#presidio-based-sensitive-data-detection) using Presidio |
128117
| `eval` | [Evaluation tools](../evaluation/index.rst) for testing guardrails |
129118
| `tracing` | OpenTelemetry tracing support |
130119
| `gcp` | Google Cloud Platform language services |
Lines changed: 22 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title:
3-
page: "Integrate the NeMo Guardrails Library into Your Application"
4-
nav: "Integrate"
3+
page: "Integrate Guardrails into Your Application"
4+
nav: "Integrate Guardrails"
55
description: "Add guardrails to existing applications using the Python SDK, LangChain, or HTTP API."
66
topics: ["Get Started", "AI Safety"]
77
tags: ["Integration", "Python", "LangChain", "SDK", "API"]
@@ -11,17 +11,11 @@ content:
1111
audience: ["Developer", "AI Engineer"]
1212
---
1313

14-
# Integrate the NeMo Guardrails Library into Your Application
14+
# Integrate Guardrails into Your Application
1515

16-
If you have an existing application, you can integrate NeMo Guardrails into it using the NeMo Guardrails library.
16+
The NeMo Guardrails library provides the following tools to integrate guardrails into your applications.
1717

18-
---
19-
20-
## Integrate Guardrails into LLM-based Applications
21-
22-
The NeMo Guardrails library can be integrated into applications in multiple ways:
23-
24-
1. **Python SDK integration**: Add guardrails directly into your Python application.
18+
- Use the NeMo Guardrails Python SDK to add guardrails directly into your Python application.
2519

2620
```python
2721
from nemoguardrails import LLMRails, RailsConfig
@@ -33,7 +27,7 @@ The NeMo Guardrails library can be integrated into applications in multiple ways
3327
response = rails.generate(messages=[...])
3428
```
3529

36-
2. **LangChain integration**: Wrap guardrails around LangChain chains or use chains within guardrails.
30+
- Use the NeMo Guardrails LangChain integration capabilities to wrap guardrails around LangChain chains or use chains within guardrails.
3731

3832
```python
3933
from nemoguardrails.integrations.langchain.runnable_rails import RunnableRails
@@ -44,15 +38,26 @@ The NeMo Guardrails library can be integrated into applications in multiple ways
4438

4539
For more information, refer to the [LangChain Integration Guide](../integration/langchain/langchain-integration.md).
4640

47-
3. **HTTP API integration**: Use the guardrails server to add protection to applications in any programming language.
41+
- Integrate the NeMo Guardrails API server into your application to add protection to applications in any programming language.
4842

4943
```bash
5044
nemoguardrails server --config path/to/configs
5145
```
5246

53-
For more information, refer to the [Server Guide](../deployment/local-server/index.md).
47+
You can then use the API server in your application by sending requests to the server's endpoint.
48+
49+
```bash
50+
curl -X POST http://localhost:8000/v1/chat/completions \
51+
-H "Content-Type: application/json" \
52+
-d '{
53+
"config_id": "content_safety",
54+
"messages": [{"role": "user", "content": "Hello!"}]
55+
}'
56+
```
57+
58+
For more information, refer to [](../run-rails/using-fastapi-server/index.md).
5459

55-
4. **Docker deployment**: Deploy guardrails as a containerized service.
56-
For more information, refer to the [Using Docker Guide](../deployment/using-docker.md).
60+
- Use the NeMo Guardrails Docker deployment capabilities to deploy guardrails as a containerized service.
61+
For more information, refer to [](../deployment/using-docker.md).
5762

58-
For complete examples and detailed integration patterns, refer to the [examples directory](https://github.com/NVIDIA-NeMo/Guardrails/tree/develop/examples) in the GitHub repository.
63+
For more examples and detailed integration patterns, refer to the [examples directory](https://github.com/NVIDIA-NeMo/Guardrails/tree/develop/examples) in the NeMo Guardrails GitHub repository.

docs/getting-started/tutorials/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,14 @@ Deploy Nemotron-Content-Safety-Reasoning-4B for customizable content safety with
3636
:link: nemoguard-topiccontrol-deployment
3737
:link-type: doc
3838

39-
Restrict conversations to allowed topics using Nemotron Topic Control NIM.
39+
Restrict conversations to allowed topics using Llama 3.1 NemoGuard 8B TopicControl NIM.
4040
:::
4141

4242
:::{grid-item-card} Detect Jailbreak Attempts
4343
:link: nemoguard-jailbreakdetect-deployment
4444
:link-type: doc
4545

46-
Detect and block adversarial prompts and jailbreak attempts using Nemotron Jailbreak Detect NIM.
46+
Detect and block adversarial prompts and jailbreak attempts using NemoGuard JailbreakDetect NIM.
4747
:::
4848

4949
:::{grid-item-card} Add Multimodal Content Safety

docs/getting-started/tutorials/nemoguard-jailbreakdetect-deployment.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title:
33
page: "Detect Jailbreak Attempts with NVIDIA NemoGuard JailbreakDetect NIM"
44
nav: "Detect Jailbreak Attempts"
5-
description: "Detect and block adversarial prompts and jailbreak attempts using Nemotron Jailbreak Detect NIM."
5+
description: "Detect and block adversarial prompts and jailbreak attempts using NemoGuard JailbreakDetect NIM."
66
topics: ["AI Safety", "Security"]
77
tags: ["Jailbreak", "NIM", "Security", "Input Rails", "Docker", "Nemotron"]
88
content:
@@ -57,7 +57,7 @@ You will secure an application LLM and test block prompt injection and jailbreak
5757
5858
The [Nemoguard Jailbreak Detect](https://build.nvidia.com/nvidia/nemoguard-jailbreak-detect) model does not use any prompts, so you don't need to create a `prompts.yml` file for this model.
5959

60-
For more information about the configuration parameters, refer to the [Configuration Reference](../../configure-rails/yaml-schema/configuration-reference.md).
60+
For more information about the configuration parameters, refer to the [Configuration Reference](../../configure-rails/configuration-reference.md).
6161

6262
## Run the Guardrails chat application
6363

@@ -165,7 +165,7 @@ This section shows how to run the NVIDIA NemoGuard JailbreakDetect NIM microserv
165165

166166
To run the NVIDIA NemoGuard JailbreakDetect NIM in a Docker container, follow these steps:
167167

168-
1. Update the `config.yml` file you created earlier to point to a local NIM deployment rather than build.nvidia.com. The following configuration updates the `nim_base_url` to point to `http://localhost:8123`, which tells the NeMo Guardrails toolkit to make requests to the local NIM deployment. The Guardrails configuration must match the NIM Docker container configuration for them to communicate.
168+
1. Update the `config.yml` file you created earlier to point to a local NIM deployment rather than build.nvidia.com. The following configuration updates the `nim_base_url` to point to `http://localhost:8123`, which tells the NeMo Guardrails library to make requests to the local NIM deployment. The Guardrails configuration must match the NIM Docker container configuration for them to communicate.
169169

170170
```yaml
171171
models:
@@ -249,4 +249,4 @@ To run the NVIDIA NemoGuard JailbreakDetect NIM in a Docker container, follow th
249249

250250
- [NVIDIA NemoGuard JailbreakDetect NIM documentation](https://docs.nvidia.com/nim/nemoguard-jailbreakdetect/latest/index.html)
251251
- [Jailbreak Detection Heuristics](../../user-guides/jailbreak-detection-heuristics/README.md) for detection without a NIM
252-
- [Configuration Reference](../../configure-rails/yaml-schema/configuration-reference.md) for all configuration options
252+
- [Configuration Reference](../../configure-rails/configuration-reference.md) for all configuration options

docs/getting-started/tutorials/nemoguard-topiccontrol-deployment.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
22
title:
3-
page: "Restrict Topics with Nemotron Topic Control NIM"
3+
page: "Restrict Topics with Llama 3.1 NemoGuard 8B TopicControl NIM"
44
nav: "Restrict Topics"
5-
description: "Restrict conversations to allowed topics using Nemotron Topic Control NIM."
5+
description: "Restrict conversations to allowed topics using Llama 3.1 NemoGuard 8B TopicControl NIM."
66
topics: ["AI Safety", "Content Moderation"]
77
tags: ["Topic Control", "NIM", "Input Rails", "LoRA", "Docker", "Nemotron"]
88
content:
@@ -122,7 +122,7 @@ By following this tutorial, you learn how to configure a set of allowed topics a
122122
I'd be happy to help you with canceling your subscription. You have a couple of options to do so, and I'll walk you
123123
through them.
124124
125-
[The NeMo Guardrails toolkit responds with instructions and information on subscription cancellations]
125+
[The NeMo Guardrails library responds with instructions and information on subscription cancellations]
126126
```
127127

128128
## Import the NeMo Guardrails Library in Python
@@ -185,7 +185,7 @@ This section shows how to run the NemoGuard 8B TopicControl model locally while
185185

186186
To run the Llama 3.1 NemoGuard 8B TopicControl in a Docker container, follow these steps:
187187

188-
1. Update the `config.yml` file you created earlier to point to a local NIM deployment rather than build.nvidia.com. The following configuration adds a `base_url` and `model_name` field under `parameters`, which tells the NeMo Guardrails toolkit to make requests to the `nvidia/llama-3.1-nemoguard-8b-topic-control` model hosted at `http://localhost:8123/v1`. The Guardrails configuration must match the NIM Docker container configuration for them to communicate.
188+
1. Update the `config.yml` file you created earlier to point to a local NIM deployment rather than build.nvidia.com. The following configuration adds a `base_url` and `model_name` field under `parameters`, which tells the NeMo Guardrails library to make requests to the `nvidia/llama-3.1-nemoguard-8b-topic-control` model hosted at `http://localhost:8123/v1`. The Guardrails configuration must match the NIM Docker container configuration for them to communicate.
189189

190190
```yaml
191191
models:
@@ -270,7 +270,7 @@ To run the Llama 3.1 NemoGuard 8B TopicControl in a Docker container, follow the
270270

271271
## Next Steps
272272

273-
- [Nemotron Safety models overview](../../configure-rails/yaml-schema/guardrails-configuration/built-in-guardrails.md#nvidia-models)
273+
- [Topic Safety overview](../../configure-rails/guardrail-catalog.md#topic-safety)
274274
- [Topic safety example configuration](https://github.com/NVIDIA-NeMo/Guardrails/tree/develop/examples/configs/topic_safety)
275275
- [Topic Control research paper (EMNLP 2024)](https://arxiv.org/abs/2404.03820)
276-
- [NeMo Guardrails Toolkit Configuration Guide](../../configure-rails/overview.md)
276+
- [NeMo Guardrails Library Configuration Guide](../../configure-rails/overview.md)

docs/getting-started/tutorials/nemotron-content-safety-reasoning-deployment.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ See the full [Model Architecture](https://huggingface.co/nvidia/Nemotron-Content
4242
## Prerequisites
4343

4444
- Python 3.10 or later
45-
- [NeMo Guardrails installed](../../getting-started/installation-guide.md)
45+
- [NeMo Guardrails installed](../installation-guide.md)
4646
- GPU with at least 16GB VRAM (see [Hardware Requirements](https://huggingface.co/nvidia/Nemotron-Content-Safety-Reasoning-4B#hardware-and-software-requirements) on HuggingFace)
4747
- vLLM installed:
4848

@@ -218,6 +218,7 @@ prompts:
218218
```
219219

220220
The `reasoning_enabled` variable is automatically passed to prompt templates by the content safety action, based on the `rails.config.content_safety.reasoning.enabled` setting.
221+
221222
## Running Inference
222223

223224
### Load the Configuration

docs/getting-started/tutorials/nemotron-safety-guard-deployment.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ Follow these steps to prepare the guardrails configuration.
193193
```console
194194
> मुझे भारत में तीन आम खाने की चीज़ज़ों के नाम बताओ।
195195
196-
[The NeMo Guardrails toolkit responds with information about rice, roti, and dal—common Indian foods]
196+
[The NeMo Guardrails library responds with information about rice, roti, and dal—common Indian foods]
197197
```
198198

199199
## Import the NeMo Guardrails Library in Python
@@ -259,7 +259,7 @@ This section shows how to run the Nemotron Safety Guard 8B model locally while s
259259

260260
To run the Llama 3.1 Nemotron Safety Guard 8B V3 in a Docker container, follow these steps:
261261

262-
1. Update the `config.yml` file you created earlier to point to a local NIM deployment rather than build.nvidia.com. The following configuration adds a `base_url` and `model_name` field under `parameters`, which tells the NeMo Guardrails toolkit to make requests to the `nvidia/llama-3.1-nemotron-safety-guard-8b-v3` model hosted at `http://localhost:8123/v1`. The Guardrails configuration must match the NIM Docker container configuration for them to communicate.
262+
1. Update the `config.yml` file you created earlier to point to a local NIM deployment rather than build.nvidia.com. The following configuration adds a `base_url` and `model_name` field under `parameters`, which tells the NeMo Guardrails library to make requests to the `nvidia/llama-3.1-nemotron-safety-guard-8b-v3` model hosted at `http://localhost:8123/v1`. The Guardrails configuration must match the NIM Docker container configuration for them to communicate.
263263

264264
```yaml
265265
models:

docs/index.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ Follow these steps to start using the NeMo Guardrails library.
5454
::::{grid} 1 1 2 2
5555
:gutter: 3
5656

57-
:::{grid-item-card} Install
57+
:::{grid-item-card} Installation
5858
:link: getting-started/installation-guide
5959
:link-type: doc
6060

@@ -139,9 +139,9 @@ Release Notes <about/release-notes.md>
139139
:name: Get Started
140140
:hidden:
141141
142-
Install <getting-started/installation-guide>
142+
Installation <getting-started/installation-guide>
143143
Tutorials <getting-started/tutorials/index>
144-
Integrate <getting-started/integrate-into-application.md>
144+
Integrate Guardrails <getting-started/integrate-into-application.md>
145145
```
146146

147147
```{toctree}

0 commit comments

Comments
 (0)