Skip to content

Commit 1c657ca

Browse files
authored
refactor(iorails): Migrate from RailAction subclasses to CompiledRail manifest implementation (#2261)
1 parent df7bdb1 commit 1c657ca

40 files changed

Lines changed: 1794 additions & 3173 deletions

docs/configure-rails/guardrail-catalog/jailbreak-protection.mdx

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,21 @@ To compute the perplexity of a string, the current implementation uses the `gpt2
105105

106106
There is currently one available model-based detection, using a random forest-based detector trained on [`Snowflake/snowflake-arctic-embed-m-long`](https://huggingface.co/Snowflake/snowflake-arctic-embed-m-long) embeddings.
107107

108+
### Detector Availability
109+
110+
<Warning>
111+
112+
Jailbreak detection fails open.
113+
When a configured detector cannot be reached, the rail allows the request instead of blocking it.
114+
115+
</Warning>
116+
117+
A connection failure, a timeout, and an error response all produce the same outcome, for both the heuristics server and the jailbreak detection NIM.
118+
The rail logs the failure, allows the request, and returns no error to the caller, so a detector outage removes this protection without a visible signal.
119+
`LLMRails` and `IORails` behave identically here.
120+
121+
Monitor the availability of your detector if you rely on this rail, and pair it with rails that do not call an external service.
122+
108123
### Setup
109124

110125
The recommended way to use the jailbreak detection heuristics in production is to [deploy the jailbreak detection heuristics server](/more-deployment-options/using-docker#jailbreak-detection-heuristics) separately. For a hands-on configuration walkthrough, see [Use Jailbreak Detection Heuristics](/get-started/tutorials/jailbreak-detection-heuristics).

nemoguardrails/guardrails/__init__.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,6 @@ def configure_logging(
2828
2929
Attaches a handler if none exist, or updates existing handlers if they do.
3030
**If a handler is provided on repeat calls, it is ignored to avoid accumulating handlers.**
31-
Sets level and formatter of all handlers so that all modules under this package
32-
(model_engine, api_engine, rails_manager, etc.) inherit the same settings.
3331
3432
"""
3533
logger = logging.getLogger("nemoguardrails.guardrails")

nemoguardrails/guardrails/actions/content_safety_action.py

Lines changed: 0 additions & 133 deletions
This file was deleted.

nemoguardrails/guardrails/actions/jailbreak_detection_action.py

Lines changed: 0 additions & 47 deletions
This file was deleted.

nemoguardrails/guardrails/actions/topic_safety_action.py

Lines changed: 0 additions & 67 deletions
This file was deleted.

0 commit comments

Comments
 (0)