check_safety
Scan AI outputs and prompts for injection, jailbreaks, harmful content, data leaks, fraud, and hallucinations. Returns risk score, threat details, and recommendations per OWASP LLM Top 10.
Instructions
AI 安全网关检测。对 prompt + output 跑 OWASP LLM Top 10 三层检测:40+ 特征规则引擎(注入/越狱/有害内容/敏感信息泄露/欺诈)+ 可选 LLM 深度分析 + 可选幻觉检测。返回 passed、risk_score、risk_level、threats[](category/severity/match_context/recommendation)、quota。fast=true 走纯规则 <10ms 模式。耗 detect 额度(fast 亦计入)。
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fast | No | true 走纯规则快速模式(<10ms,无 LLM)→ /guard/check-fast;默认 false 走完整 /guard/check | |
| output | Yes | AI 响应(≥1 字,≤50000 字) | |
| prompt | No | 用户原始输入(默认空,≤50000 字) | |
| check_hallucination | No | 是否同时检测幻觉,默认 false |