Skip to content

Commit c1378e9

Browse files
authored
Update set-up-guardrail.mdx
3 changes 1) moved configuration first, before supported model types 2) moved note about llamaguard to llamaguard section 3) added link to workers ai dashboard
1 parent ba3ab97 commit c1378e9

File tree

1 file changed

+14
-13
lines changed

1 file changed

+14
-13
lines changed

src/content/docs/ai-gateway/guardrails/set-up-guardrail.mdx

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,6 @@ sidebar:
55
order: 3
66
---
77

8-
## Supported model types
9-
10-
AI Gateway's Guardrails detects the type of AI model being used and applies safety checks accordingly:
11-
12-
- **Text generation models**: Both prompts and responses are evaluated.
13-
- **Embedding models**: Only the prompt is evaluated, as the response consists of numerical embeddings, which are not meaningful for moderation.
14-
- **Unknown models**: If the model type cannot be determined, only the prompt is evaluated, while the response bypass Guardrails.
15-
168
## Configuration
179

1810
Within AI Gateway settings, you can customize Guardrails:
@@ -21,18 +13,27 @@ Within AI Gateway settings, you can customize Guardrails:
2113
- Choose evaluation scope: Analyze user prompts, model responses, or both.
2214
- Define hazard categories: Select categories like violence, hate, or sexual content and assign actions (ignore, flag, or block).
2315

24-
## Workers AI and Guardrails
16+
## Supported model types
2517

26-
Guardrails currently uses [Llama Guard 3 8B](https://ai.meta.com/research/publications/llama-guard-llm-based-input-output-safeguard-for-human-ai-conversations/) on [Workers AI](/workers-ai/) to perform content evaluations. The underlying model may be updated in the future, and we will reflect those changes within Guardrails.
18+
AI Gateway's Guardrails detects the type of AI model being used and applies safety checks accordingly:
2719

28-
Since Guardrails runs on Workers AI, enabling it incurs usage on Workers AI. You can monitor usage through the Workers AI Dashboard.
20+
- **Text generation models**: Both prompts and responses are evaluated.
21+
- **Embedding models**: Only the prompt is evaluated, as the response consists of numerical embeddings, which are not meaningful for moderation.
22+
- **Unknown models**: If the model type cannot be determined, only the prompt is evaluated, while the response bypass Guardrails.
2923

30-
## Additional considerations
24+
## Workers AI and Guardrails
3125

32-
- Latency impact: Enabling Guardrails adds some latency. Consider this when balancing safety and speed.
26+
Guardrails currently uses [Llama Guard 3 8B](https://ai.meta.com/research/publications/llama-guard-llm-based-input-output-safeguard-for-human-ai-conversations/) on [Workers AI](/workers-ai/) to perform content evaluations. The underlying model may be updated in the future, and we will reflect those changes within Guardrails.
27+
28+
Since Guardrails runs on Workers AI, enabling it incurs usage on Workers AI. You can monitor usage through the [Workers AI Dashboard](https://dash.cloudflare.com/?to=/:account/ai/workers-ai).
3329

3430
:::note
3531

32+
3633
Llama Guard is provided as-is without any representations, warranties, or guarantees. Any rules or examples contained in blogs, developer docs, or other reference materials are provided for informational purposes only. You acknowledge and understand that you are responsible for the results and outcomes of your use of AI Gateway.
3734

3835
:::
36+
37+
## Additional considerations
38+
39+
- Latency impact: Enabling Guardrails adds some latency. Consider this when balancing safety and speed.

0 commit comments

Comments
 (0)