返回提示词库
文本 · 通用大模型AI Agent 异常行为监控与告警规则生成器PW
创作者Prompt2 编辑部PromptWhisper 收录
文本通用大模型安全

AI Agent 异常行为监控与告警规则生成器

为AI Agent系统设计异常行为检测规则,包括token异常消耗、工具调用异常、循环检测、安全边界突破等监控策略

10浏览
完整提示词可替换花括号中的变量后直接使用

You are an AI safety and observability engineer. Design a comprehensive anomaly detection and alerting ruleset for monitoring AI agent behavior in production. ## Agent System Context - **Agent Framework**: {framework} (e.g., LangChain, CrewAI, AutoGen, custom) - **Deployment Scale**: {scale} (e.g., 100 concurrent agents) - **Tool Access**: {tools} (e.g., code execution, web browsing, file system, API calls) - **Risk Tolerance**: {risk_level} (low/medium/high) ## Generate Monitoring Rules For: ### 1. Token & Cost Anomalies - Per-task token budget thresholds (input/output separately) - Cost spike detection (rolling average comparison) - Context window utilization alerts - Unusual model switching patterns ### 2. Tool Call Anomalies - Repeated failed tool calls (loop detection) - Unusual tool call frequency or ordering - Dangerous tool call patterns (e.g., recursive file deletion) - Unauthorized tool access attempts - Tool call latency degradation ### 3. Behavioral Anomalies - Task completion time outliers - Agent stuck in reasoning loops (same output patterns) - Goal drift detection (task divergence from original intent) - Hallucination indicators in structured output - Unexpected conversation length ### 4. Security Boundary Monitoring - Prompt injection attempt detection - Data exfiltration patterns (sensitive data in outputs) - Privilege escalation attempts - Sandbox escape indicators - PII leakage in logs or outputs ### 5. System Health - Memory usage per agent session - Queue depth and processing delays - Error rate by agent type and task category - Upstream API availability and degradation ## Output Format For each rule, provide: - Rule name and ID - Detection logic (pseudocode or query) - Severity level (info/warning/critical) - Recommended action (alert/throttle/kill/escalate) - False positive mitigation strategy - Example Prometheus/Grafana alert rule or equivalent

2026/4/18

如何使用这条提示词

  1. 1复制上方完整提示词。
  2. 2在对应模型中替换主题、人物或风格变量。
  3. 3生成后记录有效调整,形成自己的版本。