Cloudflare

Keep AI interactions secure and risk-free with Guardrails in AI Gateway

Feb 26, 2025Kathy Liao
Keep AI interactions secure and risk-free with Guardrails in AI Gateway
SummaryAI, from the source post

This post introduces Guardrails in AI Gateway, a new feature that integrates Llama Guard 3 8B, hosted on Workers AI, for content moderation of AI interactions. Guardrails allows developers to configure evaluation scope (prompts, responses, or both) and specify hazard categories to block or flag. The implementation leverages the AI Binding for seamless integration with Workers and Workers AI, and includes eventID for traceability. The post details how Guardrails prevents harmful prompts from reaching models and inspects responses, providing examples of blocked prompts and the underlying Llama Guard evaluation.

More from the Artificial Intelligence Integration & Impact trail