This commit is contained in:
Ishaan Jaffer 2026-02-21 17:40:39 -08:00
parent e157f5a8f2
commit 5e71f6128b

View file

@ -50,49 +50,47 @@ pip install litellm==1.81.14
---
## Find, deploy, and test guardrails — all from the gateway
## Guardrail Garden, Built-in Guardrails, and Compliance Playground
The #1 request we hear from enterprise teams shipping AI to production: *how do we operationalize our guardrails?*
Enterprise teams running AI in production keep hitting the same wall — they need to block investment advice, filter competitor mentions, catch insults, and they need to do it at the gateway level, not in application code. Today they use Azure Content Safety, tomorrow they want Bedrock Guardrails. And once a policy is live, they need to know if it's over-sensitive before users start complaining.
They need to block investment advice, filter competitor mentions, catch insults — and they need to do it at the gateway level, not buried in application code. Once a policy goes live, the next question is always: is it over-sensitive? What's the false positive rate on real traffic? And when requirements change — can I swap from Azure Content Safety to Bedrock Guardrails without touching my app?
This release brings the full workflow to LiteLLM: browse and deploy guardrails from the Guardrail Garden, use the new zero-cost built-in guardrails, and test everything in the Compliance Playground before it hits production.
This release ships the full workflow: find a guardrail, deploy it, and test it before it hits production.
### Guardrail Garden
### 1. Browse the Guardrail Garden
EasilyBrowse built-in and partner guardrails organized by use case — denied financial/legal/medical advice, harmful content detection, bias filters (gender, racial, religious), PII masking, prompt injection, and more.
Pick from built-in and partner guardrails organized by use case — competitor blocking, topic filtering, keyword lists, GDPR/EU AI Act compliance, prompt injection detection, and more. Customize the parameters (keyword lists, blocked topics, score thresholds) and attach it to a team or key.
Pick a guardrail, customize the parameters, and attach it to a team or key. Partner integrations include Presidio PII, Bedrock Guardrail, Lakera, OpenAI Moderation, Google Cloud Model Armor, and Guardrails AI.
![Guardrail Garden](../img/release_notes/guardrail_garden.png)
### 2. Deploy built-in guardrails — zero latency, zero cost
### 3 New Built-in Guardrails
Three new built-in guardrails ship in this release:
Three new guardrails that run directly on the gateway — no external API call, no extra cost:
- **Competitor name blocker** — block mentions of competitor brands in responses (handles name variations and streaming)
- **Topic blocker** — block entire topic categories like investment advice, using keyword and embedding-based detection
- **Insults / keyword filter** — catch profanity, slurs, and custom keyword lists
- **Denied Financial Advice** — detects requests for personalized financial advice, investment recommendations, or financial planning
- **Harmful Violence** — detects content related to violence, criminal planning, attacks, and violent threats
- **Bias: Gender** — detects gender-based discrimination, stereotypes, and biased language
All three run at the gateway level with no external API call. Configure them per-team or per-key, and swap in AWS Bedrock Guardrails or Azure Content Safety on the same endpoint without changing your application code. Your governance stays central on the gateway — regardless of which guardrail provider you use underneath.
These join the existing built-in filters (Denied Legal Advice, Denied Medical Advice, Harmful Self-Harm, Harmful Child Safety, Harmful Illegal Weapons, Bias: Racial, Bias: Religious, and more). All are configurable per-team or per-key. You can swap in AWS Bedrock Guardrails or Azure Content Safety on the same endpoint without changing your application code — the governance layer stays on the gateway regardless of which provider you use.
#### Eval results
We benchmark every built-in guardrail against labeled datasets before shipping. Results for the two policies most relevant to topic and keyword blocking (207 investment-question cases, 299 insult cases):
We benchmark every built-in guardrail against labeled datasets before shipping. Results for Denied Financial Advice (207 investment-question cases):
| Guardrail | Precision | Recall | F1 | Latency p50 | Cost/req |
|-----------|-----------|--------|----|-------------|----------|
| Block investment questions | 100% | 100% | 100% | <0.1ms | $0 |
| Block insults / keywords | 100% | 100% | 100% | <0.1ms | $0 |
| Denied Financial Advice | 100% | 100% | 100% | <0.1ms | $0 |
For reference, ONNX embedding approaches on the same eval set hit 9598% precision at 220ms latency and require additional dependencies. The built-in content filter uses no ML model — just structured YAML rules with layered matching — so there's nothing to download, no API key needed, and latency is effectively zero.
For reference, ONNX embedding approaches on the same eval set hit 9598% precision at 220ms latency and require additional dependencies. The built-in guardrails use no ML model — just structured YAML rules with layered matching — nothing to download, no API key, and latency is effectively zero.
### 3. Test before you ship — Compliance Playground
### Compliance Playground
The hardest part isn't deploying a guardrail — it's knowing how it'll behave once it's live. "What happens when a policy rolls out and it's over-sensitive?" Upload your own dataset or use a pre-built one to see precision, recall, and false positive rate on your actual traffic patterns *before* a policy goes live. If a guardrail is blocking too aggressively, you'll know before your users do.
The Compliance Playground lets you test any guardrail against our pre-built eval datasets or your own custom datasets, so you can see precision, recall, and false positive rate before rolling it out to production.
![Compliance Playground](../img/release_notes/compliance_playground.png)
---
---