---
title: "How to safeguard AI workloads with Unity AI Gateway Guardrails"
description: "Unity AI Gateway’s beta LLM Guardrails extend earlier Gateway guardrails with LLM-powered evaluation, pre-built protections, and tunable custom rules for AI security, compliance, and sensitive-data protection. An Acme marketing scenario maps policies to PII redaction on inputs, jailbreak and prompt-injection blocking, unsafe-content blocking on outputs, and a custom rule that blocks competitor references. Teams configure these guardrails on an endpoint, optionally use Log mode, select evaluator endpoints, and test representative requests while tracking activity in inference tables. Built-in controls behave as expected in the examples, while the custom rule initially performs unreliably until a more specific prompt and gpt-5-4-mini evaluator improve triggering without degrading other tests. Inference tables record request outcomes, evaluator calls, latency, statuses, token counts, and shared request_id values for auditing and refinement."
---

# How to safeguard AI workloads with Unity AI Gateway Guardrails

[Databricks](https://yomu.fyi/company/databricks) · Tim Lortz · May 19, 2026

**Type:** Tutorial

## Summary

Unity AI Gateway’s beta LLM Guardrails extend earlier Gateway guardrails with LLM-powered evaluation, pre-built protections, and tunable custom rules for AI security, compliance, and sensitive-data protection. An Acme marketing scenario maps policies to PII redaction on inputs, jailbreak and prompt-injection blocking, unsafe-content blocking on outputs, and a custom rule that blocks competitor references. Teams configure these guardrails on an endpoint, optionally use Log mode, select evaluator endpoints, and test representative requests while tracking activity in inference tables. Built-in controls behave as expected in the examples, while the custom rule initially performs unreliably until a more specific prompt and gpt-5-4-mini evaluator improve triggering without degrading other tests. Inference tables record request outcomes, evaluator calls, latency, statuses, token counts, and shared request\_id values for auditing and refinement.

## Context

Organizations need controls for AI security, compliance, sensitive-data disclosure, harmful or unsafe content, brand alignment, and keeping conversations on topic. In the Acme scenario, company policies prohibit customer PII in model prompts, require screening for jailbreaks and prompt injection, prohibit harmful content, and avoid disparaging or naming competitors.

## Approach / What changed

Configure a Unity AI Gateway endpoint with built-in PII Detection & Redaction, Jailbreak & Prompt Injection, and Unsafe Content Blocking guardrails, plus a custom output-blocking guardrail for competitor references. Test representative prompts, tune the custom guardrail prompt and evaluator endpoint, and use inference tables to audit activity and refine behavior.

## Takeaways

- Built-in guardrails have predetermined actions such as blocking or sanitizing, while administrators can choose an evaluator endpoint and use Log mode to test new controls without enforcing them.
- The custom competitor-reference guardrail was unreliable with gpt-5-nano and gpt-5-mini; switching to gpt-5-4-mini made it trigger as expected without degrading the other guardrail tests.
- Inference tables capture endpoint requests and evaluator calls, including statuses, token counts, latency, raw evaluator responses, and a shared request\_id for tracing decisions.

**Tags:** [AI Governance](https://yomu.fyi/topic/ai-governance), [AI Security](https://yomu.fyi/topic/ai-security), [LLMs](https://yomu.fyi/topic/llm), [Unity AI Gateway](https://yomu.fyi/topic/unity-ai-gateway)

- Source: [Databricks](https://www.databricks.com/blog/how-safeguard-ai-workloads-unity-ai-gateway-guardrails)
- Source URL: https://www.databricks.com/blog/how-safeguard-ai-workloads-unity-ai-gateway-guardrails
- Ingested by Yomu: 2026-08-31T03:34:12.545Z

[Read original post](https://www.databricks.com/blog/how-safeguard-ai-workloads-unity-ai-gateway-guardrails)
