shiichan

Guard AI prompts by context, not keywords: Cloudflare DLP custom topics

Hey there, it's Shiichan! Today I've got a nice update for Data Loss Prevention (DLP), which protects your AI prompts, so let me walk you through it.

Cloudflare Changelog developers.cloudflare.com

What was announced?

Cloudflare DLP now lets you define your own custom topics for AI prompt protection! This one comes from Cloudflare's Changelog.

Until now, the predefined AI prompt topics covered common content and intent categories like PII, source code, and jailbreak attempts. Custom topics let you detect unique or proprietary concepts that aren't part of those predefined categories.

The story so far

Previously, the topics you could detect were limited to the predefined categories that Cloudflare shipped. So concepts specific to your own organization, the stuff that's only confidential to you, were hard to cover out of the box.

What changes

With custom topics, you just describe the concept you want to detect in natural language. And instead of matching keywords, DLP judges by context.

For example, if you set up a topic describing confidential merger discussions, it will match a prompt that only paraphrases the deal, even when the word "merger" and the company names never appear. Pretty neat!

Custom topics are available for ChatGPT, Google Gemini, Perplexity, and Claude.

Dive Deep

To create one, head to Zero Trust > Data loss prevention > Detection entries in the dashboard, pick "AI prompt topics", then "Custom Prompt Topic", and describe the concept you want to detect in specific natural language. After that, add it to an existing DLP profile or create a new DLP profile, and use it in a Gateway HTTP policy to log or block matching prompts.

The trick is to write it as a concept to classify, not a list of keywords. The post itself puts it well:

Write the description as a concept to classify, not a list of keywords.

If you instead want to catch literal values like internal codenames or product IDs, use a custom wordlist or pattern entry. Custom topics run through the same application granular controls path as the predefined ones, so the setup feels familiar.

Wrap-up

  • Cloudflare DLP now lets you define custom topics for AI prompt protection
  • Describe the concept in natural language and it matches by context, not keywords
  • Available for ChatGPT, Google Gemini, Perplexity, and Claude
  • Use custom wordlists/patterns for literal values instead

If you're on an IT or security team that wants to safeguard how employees use AI, this update is right up your alley!