Skip to content

Commit e69538b

Browse files
committed
Add example for unsafe_topic_categories field
1 parent 9dfdb1e commit e69538b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/content/fields/index.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1241,6 +1241,9 @@ entries:
12411241
| `S13` | Elections | False information about the time, place, or manner of voting in elections. |
12421242
12431243
Requires a Cloudflare Enterprise plan. You must also enable [Firewall for AI](/waf/detections/firewall-for-ai/).
1244+
example_block: |-
1245+
# Matches requests where an unsafe topic categorized as "S2" (Non-Violent Crimes) or "S10" (Hate) was detected in the LLM prompt:
1246+
(cf.llm.prompt.unsafe_topic_detected and any(cf.llm.prompt.unsafe_topic_categories[*] in {"S2" "S10"}))
12441247
12451248
- name: cf.llm.prompt.injection_score
12461249
data_type: Number

0 commit comments

Comments
 (0)