Skip to content

Commit f174157

Browse files
authored
docs: fix links and burn down build warnings for clean build (#1678)
1 parent a9f0255 commit f174157

File tree

102 files changed

+3443
-3707
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

102 files changed

+3443
-3707
lines changed

.github/workflows/docs-build.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ jobs:
4949
- name: Validate redirect targets
5050
run: make docs-check-redirects
5151
- name: Build documentation
52-
run: make docs
52+
run: make docs-strict
5353
- name: Delete unnecessary files
5454
run: |
5555
sudo find _build -name .doctrees -prune -exec rm -rf {} \;

Makefile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.PHONY: all test tests test_watch test_coverage test_profile docs docs-serve docs-update-cards docs-check-cards docs-watch-cards pre_commit help
1+
.PHONY: all test tests test_watch test_coverage test_profile docs docs-strict docs-serve docs-update-cards docs-check-cards docs-watch-cards pre_commit help
22

33
# Default target executed when no specific target is provided to make.
44
all: help
@@ -24,6 +24,9 @@ test_profile:
2424
docs:
2525
poetry run sphinx-build -b html docs _build/docs
2626

27+
docs-strict:
28+
poetry run sphinx-build -b html -W --keep-going docs _build/docs
29+
2730
docs-serve:
2831
cd docs && poetry run sphinx-autobuild . _build/html --port 8000 --open-browser
2932

@@ -54,6 +57,7 @@ help:
5457
@echo 'test_watch - run unit tests in watch mode'
5558
@echo 'test_coverage - run unit tests with coverage'
5659
@echo 'docs - build docs, if you installed the docs dependencies'
60+
@echo 'docs-strict - build docs with warnings as errors (used in CI)'
5761
@echo 'docs-serve - serve docs locally with auto-rebuild on changes'
5862
@echo 'docs-update-cards - update grid cards in index files from linked pages'
5963
@echo 'docs-check-cards - check if grid cards are up to date (dry run)'

docs/about/how-it-works.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,8 @@ The NeMo Guardrails library acts as an intermediary between application code and
2323
```
2424

2525
Each application can configure its own set of guardrails, depending on the use-case. Guardrails requests can trigger calls to third-party APIs, LLMs fine-tuned to implement Guardrail functionality, or to the Application LLM. Guardrails hides this complexity from clients, orchestrating the workflows behind-the-scenes so applications can focus on their business logic.
26+
27+
## Related Resources
28+
29+
- [Guardrail Types](rail-types.md)
30+
- [Get Started](../getting-started/installation-guide.md)

docs/about/release-notes.md

Lines changed: 9 additions & 199 deletions
Original file line numberDiff line numberDiff line change
@@ -121,202 +121,12 @@ For a complete record of changes in a release, refer to the
121121
122122
---
123123
124-
(v0-19-0)=
125-
126-
## 0.19.0
127-
128-
(v0-19-0-features)=
129-
130-
### Key Features
131-
132-
- Added support for LangChain 1.x, including the content blocks API for reasoning traces and tool calls.
133-
134-
(v0-19-0-fixed-issues)=
135-
136-
### Fixed Issues
137-
138-
- Fixed TypeError in Colang 2.x chat caused by incorrect type conversion between `State` and `dict`.
139-
- Fixed async streaming support for the ChatNVIDIA provider patch by adding a new `async_stream_decorator`.
140-
141-
---
142-
143-
(v0-18-0)=
144-
145-
## 0.18.0
146-
147-
(v0-18-0-features)=
148-
149-
### Key Features
150-
151-
- In-memory caching of guardrail model calls for reduced latency and cost savings.
152-
NeMo Guardrails now supports per-model caching of guardrail responses using an LFU (Least Frequently Used) cache.
153-
This feature is particularly effective for safety models such as NVIDIA NemoGuard [Content Safety](https://build.nvidia.com/nvidia/llama-3_1-nemoguard-8b-content-safety), [Topic Control](https://build.nvidia.com/nvidia/llama-3_1-nemoguard-8b-topic-control), and [Jailbreak Detection](https://build.nvidia.com/nvidia/nemoguard-jailbreak-detect) where identical inputs are common.
154-
For more information, refer to [](model-memory-cache).
155-
- NeMo Guardrails extracts the reasoning traces from the LLM response and emits them as `BotThinking` events before the final `BotMessage` event.
156-
For more information, refer to [](bot-thinking-guardrails).
157-
- New community integration with [Cisco AI Defense](https://www.cisco.com/site/ca/en/products/security/ai-defense/index.html).
158-
- New embedding integrations with Azure OpenAI, Google, and Cohere.
159-
160-
(v0-18-0-fixed-issues)=
161-
162-
### Fixed Issues
163-
164-
- Implemented validation of content safety and topic control guardrail configurations at creation time, providing prompt error reporting if required prompt templates or parameters are missing.
165-
166-
---
167-
168-
(v0-17-0)=
169-
170-
## 0.17.0
171-
172-
(v0-17-0-features)=
173-
174-
### Key Features
175-
176-
- Added support for [integrating with LangGraph and tool calling](../integration/langchain/langgraph-integration.md).
177-
This integration enables building safe and controlled multi-agent workflows.
178-
LangGraph enables you to create sophisticated agent architectures with state management, conditional routing, and tool calling, while NeMo Guardrails provides the safety layer to ensure responsible AI behavior.
179-
You can intercept, store, and forward LLM tool invocations with backward compatibility.
180-
181-
- Enhanced support for [integrating with LangChain `RunnableRails`](../integration/langchain/runnable-rails.md).
182-
This release supports the LangChain Runnable interface, such as synchronous and asynchronous operations, streaming, and batch processing while preserving metadata during LangChain operation.
183-
This enhancement enables NeMo Guardrails to plug into LangChain pipelines seamlessly.
184-
185-
- Trend Micro contributed support for Trend Micro Vision One AI Application Security AI Guard.
186-
Refer to [configuration documentation](../configure-rails/guardrail-catalog/community/trend-micro.md) for more information.
187-
188-
(v0-17-0-other-changes)=
189-
190-
### Other Changes
191-
192-
- Improved URL handling for connecting to NemoGuard JailbreakDetect NIM.
193-
Guardrails now tolerates the URL for `rails.config.jailbreak_detection.nim_base_url` ending with or without a trailing slash.
194-
Refer to [](../getting-started/tutorials/nemoguard-jailbreakdetect-deployment.md) for information about using the NIM.
195-
196-
(v0-16-0)=
197-
198-
## 0.16.0
199-
200-
(v0-16-0-features)=
201-
202-
### Key Features
203-
204-
- Enhanced tracing system with [OpenTelemetry semantic conventions](https://opentelemetry.io/docs/specs/semconv/gen-ai/). To learn more, refer to [](tracing). For usage examples, refer to the following notebooks
205-
- [Tracing Guardrails Quickstart](https://github.com/NVIDIA-NeMo/Guardrails/tree/develop/docs/getting-started/8-tracing/1_tracing_quickstart.ipynb)
206-
- [Tracing Guardrails with Jaeger](https://github.com/NVIDIA-NeMo/Guardrails/tree/develop/docs/getting-started/8-tracing/2_tracing_with_jaeger.ipynb)
207-
- Community integration with [GuardrailsAI](https://www.guardrailsai.com/) and [Pangea AI Guard](https://pangea.cloud/services/ai-guard).
208-
209-
(v0-16-0-other-changes)=
210-
211-
### Other Changes
212-
213-
- Added documentation about using KV cache reuse for LLM-based NemoGuard NIMs. By using KV cache reuse, you can improve the performance of LLM-based NemoGuard NIMs where the system prompt is the same for all calls up to the point where user query and LLM response are injected. To learn more, refer to [](kv-cache-reuse).
214-
215-
(v0-15-0)=
216-
217-
## 0.15.0
218-
219-
(v0-15-0-features)=
220-
221-
### Key Features
222-
223-
- Added parallel execution for input and output rails. To learn more, refer to [](parallel-rails).
224-
- Implemented a new way of configuring tracing. You can now use the OpenTelemetry SDK and the OpenTelemetry Protocol (OTLP) exporter while configuring the NeMo Guardrails clients in your application code directly. To learn more, refer to the [basic tracing configuration guide](tracing-configuration) and the [advanced tracing configuration guide](tracing).
225-
- Updated the streaming capability of output rails to support parallel execution.
226-
- Added support for external async token generators. To learn more, refer to the [](external-async-token-generators) section.
227-
228-
### Breaking Changes
229-
230-
With the new tracing configuration, the following old configuration for tracing in `config.yml` is no longer supported.
231-
232-
```yaml
233-
# No longer supported
234-
tracing:
235-
enabled: true
236-
adapters:
237-
- name: OpenTelemetry
238-
service_name: "my-service"
239-
exporter: "console"
240-
```
241-
242-
To find the new way of configuring tracing, refer to [](tracing-configuration).
243-
244-
### Deprecated Functions
245-
246-
- `register_otel_exporter()` is deprecated and will be removed in v0.16.0. Configure exporters directly in your application instead.
247-
248-
(v0-14-1)=
249-
250-
## 0.14.1
251-
252-
(v0-14-1-features)=
253-
254-
### Features
255-
256-
- Added direct API key configuration support for jailbreak detection. This change adds a new optional field `api_key` to the `JailbreakDetectionConfig` Pydantic model. This allows to provide an API Key in a `RailsConfig` object or YAML file, for use in Jailbreak NIM calls. Prior to this change, the `api_key_env_var` field used an environment variable (for example `NVIDIA_API_KEY`) to get the API Key for the Jailbreak NIM.
257-
258-
(v0-14-1-fixed-issues)=
259-
260-
### Fixed Issues
261-
262-
- Fixed lazy loading of jailbreak detection dependencies. Before, jailbreak detection imported unnecessary dependencies when using NIM, which led to installation of those dependencies even when not using the local model-based jailbreak detection.
263-
- Fixed constructor LLM configuration to properly load other config models.
264-
- Fixed content safety policy violations handling by replacing try-except with iterable unpacking.
265-
- Fixed numpy version compatibility by pinning to version 1.23.5 for scikit-learn compatibility.
266-
- Fixed iterable unpacking compatibility in content safety output parsers.
267-
268-
(v0-14-0)=
269-
270-
## 0.14.0
271-
272-
(v0-14-0-features)=
273-
274-
### Features
275-
276-
- Added support for Python 3.13.
277-
- Enhanced working with advanced reasoning models.
278-
- Added support for the NVIDIA Nemotron family of advanced reasoning models, such as Llama 3.1 Nemotron Ultra 253B V1.
279-
- Added the `rails.output.apply_to_reasoning_traces` field.
280-
When this field is `True`, output rails are applied to the reasoning traces and the model output.
281-
For more information, refer to [](./user-guides/configuration-guide.md#using-llms-with-reasoning-traces).
282-
- The `reasoning_config.remove_thinking_traces` field is deprecated and replaced by the `reasoning_config.remove_reasoning_traces` field that has the same purpose and subfields.
283-
- Previously, if `remove_thinking_traces` was set to `True`, the reasoning traces were omitted from the final response presented to the end user.
284-
In this release, `remove_reasoning_traces` controls whether reasoning traces are removed from internal tasks and has no effect on the final response presented to the user.
285-
- Using advanced reasoning models with dialog rails is not supported.
286-
- Simplified and broadened support for chat model providers from LangChain and
287-
LangChain Community chat model providers.
288-
You must use `langchain` version `0.2.14` or higher and `langchain-community` version `0.2.5` or higher.
289-
For information about using model providers, refer to [](./user-guides/configuration-guide.md#the-llm-model).
290-
- Added support for code injection detection.
291-
For more information, refer to [](../configure-rails/guardrail-catalog/agentic-security.md#injection-detection).
292-
- Enhanced the `nemoguardrails` CLI with a `find-providers` argument to list chat and text completion providers.
293-
For more information, refer to [](./user-guides/cli.md#providers).
294-
295-
(v0-14-0-breaking-changes)=
296-
297-
### Breaking Changes
298-
299-
- Removed support for the NeMo LLM Service, `nemollm`.
300-
This provider reached end-of-life on February 5, 2025.
301-
- The `HuggingFacePipelineCompatible` provider is refactored.
302-
Previously, the class was available from the `nemoguardrails.llm.providers` package.
303-
In this release, the class is moved to the `nemoguardrails.llm.providers.huggingface` package.
304-
305-
(v0-14-0-fixed-issues)=
306-
307-
### Fixed Issues
308-
309-
- Fixed an issue when tracing is enabled.
310-
Previously, the response was replaced when tracing is enabled and could cause a crash or exception.
311-
In this release, the response is not modified when tracing is enabled.
312-
For more information, refer to <pr:1103>.
313-
314-
- Fixed an issue with the self check output flow.
315-
Previously, the `stop` instruction was not executed when `enable_rails_exceptions` was enabled.
316-
In this release, the `stop` instruction correctly regardless of the `enable_rails_execptions` value.
317-
For more information, refer to <pr:1126>.
318-
319-
- Previously, the model specification in the guardrails configuration file, `config.yml`, did not validate the model name.
320-
In this release you must specify the model name in the `model` top-level field or as `model` or `model_name` in
321-
the parameters field.
322-
For more information, refer to <pr:1084>.
124+
## Previous Release Notes
125+
126+
- [0.19.0](https://docs.nvidia.com/nemo/guardrails/0.19.0/release-notes.html)
127+
- [0.18.0](https://docs.nvidia.com/nemo/guardrails/0.18.0/release-notes.html)
128+
- [0.17.0](https://docs.nvidia.com/nemo/guardrails/0.17.0/release-notes.html)
129+
- [0.16.0](https://docs.nvidia.com/nemo/guardrails/0.16.0/release-notes.html)
130+
- [0.15.0](https://docs.nvidia.com/nemo/guardrails/0.15.0/release-notes.html)
131+
- [0.14.1](https://docs.nvidia.com/nemo/guardrails/0.14.1/release-notes.html)
132+
- [0.14.0](https://docs.nvidia.com/nemo/guardrails/0.14.0/release-notes.html)

docs/about/supported-llms.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ The NeMo Guardrails library supports the following self-hosted LLM providers:
4343

4444
### Providers from LangChain
4545

46-
The NeMo Guardrails library supports LLM providers from the LangChain Community, including both text completion and chat completion providers. Refer to [Chat model integrations](https://docs.langchain.com/oss/python/integrations/chat) in the LangChain documentation. You can also use the [`nemoguardrails find-providers`](../cli/index.md#find-providers-command) CLI command to discover available providers.
46+
The NeMo Guardrails library supports LLM providers from the LangChain Community, including both text completion and chat completion providers. Refer to [Chat model integrations](https://docs.langchain.com/oss/python/integrations/chat) in the LangChain documentation. You can also use the [`nemoguardrails find-providers`](find-providers-command) CLI command to discover available providers.
4747

4848
## Embedding Providers
4949

docs/conf.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@
186186
# Other user guides
187187
"user-guides/cli": "reference/cli/index.html",
188188
"user-guides/colang-language-syntax-guide": "configure-rails/colang/colang-1/colang-language-syntax-guide.html",
189-
"user-guides/guardrails-library": "configure-rails/guardrail-catalog.html",
189+
"user-guides/guardrails-library": "configure-rails/guardrail-catalog/index.html",
190190
"user-guides/guardrails-process": "about/how-it-works.html",
191191
"user-guides/llm-support": "about/supported-llms.html",
192192
"user-guides/llm": "about/supported-llms.html",
@@ -212,6 +212,12 @@
212212
"README.md",
213213
"_build/**",
214214
"_extensions/**",
215+
"LIVE_DOCS.md",
216+
"research.md",
217+
"scripts/**",
218+
"docs-structure-context.md",
219+
"user-guides/**",
220+
"**/.cursor/**",
215221
]
216222

217223
myst_linkify_fuzzy_links = False
@@ -232,6 +238,7 @@
232238
myst_url_schemes = {
233239
"http": None,
234240
"https": None,
241+
"mailto": None,
235242
"pr": {
236243
"url": "https://github.com/NVIDIA-NeMo/Guardrails/pull/{{path}}",
237244
"title": "PR #{{path}}",

docs/configure-rails/actions/action-parameters.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ async def my_action(context: Optional[dict] = None):
7676

7777
Custom context variables set in flows are also accessible:
7878

79-
```colang
79+
```text
8080
# In a Colang flow
8181
$user_preference = "dark_mode"
8282
execute check_preference

0 commit comments

Comments
 (0)