Cloudflare

Block unsafe prompts targeting your LLM endpoints with Firewall for AI

Aug 26, 2025Radwa Radwan, Mathias Deschamps
Block unsafe prompts targeting your LLM endpoints with Firewall for AI
SummaryAI, from the source post

This post introduces the integration of Llama Guard into Cloudflare Firewall for AI, enabling real-time detection and moderation of unsafe prompts targeting LLM endpoints. It details the underlying architecture, which uses parallel, non-blocking requests from a Cloudflare Worker to detection modules (including PII and unsafe topics), leveraging Workers AI for Llama Guard inference. The post explains how Llama Guard classifies prompts into categories like hate, violence, and sexual content, and how these detections can be used to enforce security rules via custom WAF rules to log or block harmful content. It also mentions future plans to detect prompt injection and jailbreak attempts.

More from the Website Security & Threat Management trail