Guardrails & safety models
Beyond sensitive data, profiles stop prompt injection, unsafe content, blocked topics and oversized or unwanted input.
Prompt injection
Messages that look like attempts to override instructions are blocked (prompt_injection). Set the profile's sensitivity to Strict, Balanced or Lenient; Strict catches more, with more false alarms. Agent tool results go through the gateway too, so injected instructions in fetched content are checked.
Safety models
Any model behind a provider can be marked as a guardrail: Llama Guard 3, ShieldGemma, Granite Guardian, or anything that answers safe/unsafe or Yes/No. Select it on a profile to screen requests and, optionally, answers.
- Hazard categories S1–S14 follow the Llama Guard / MLCommons taxonomy; you choose which ones block.
- If the safety model is unavailable, the profile either blocks the request (fail closed) or allows and records it (fail open).
- High-severity blocks (S1, S4, S9, S11) open an incident automatically.
- Blocked requests return
guard_model_blocked; withheld answers returnoutput_guard_blocked.
Run a safety model on your own hardware
Run it wherever you host models (Ollama, vLLM, TGI, NVIDIA NIM) and add that endpoint in Providers & models (opens in a new tab) with provider type Ollama or vLLM. Set the URL (for example http://<gpu-server>:11434/v1), set "Where it runs" to on-prem, and give the model the guardrail strength. See Providers & models.
Content limits
| Limit | Error when hit |
|---|---|
| Denied topics | denied_topic |
| Maximum prompt size | prompt_too_large |
| Block images, audio, video or files | attachments_blocked |
Risk tiers
Each request gets a risk score from 0 to 100 (returned in X-AIGov-Risk), from data sensitivity, how consequential the action is, model reliability, regulation and where it runs. Scores above 50 are tier 2, above 80 tier 3. The profile sets what each does: record, hold for review, or block.