跳转到内容
搜索文档

cf.llm.prompt.custom_topic_categories

cf.llm.prompt.custom_topic_categoriesMap<Number>

A map of custom topic labels to relevance scores (1–99) for the LLM prompt in the request.

Lower scores indicate the prompt is more relevant to that topic. Only populated when custom topics are configured.

Requires a Cloudflare Enterprise plan. You must also enable AI Security for Apps.

Example usage:

# Matches requests where the prompt is highly relevant to the "competitors" custom topic:
(cf.llm.prompt.custom_topic_categories["competitors"] lt 30)
Categories:
  • Request

这篇文档对您有帮助吗?