modern-guard
Detects prompt injection vulnerabilities.
Detector
modern-guard
98%
25ms
Text
JSON with injection probability
Transformer-encoder based
By defining a policy, you can set a target, combine multiple detectors, and fine-tune.
policy = {
"id": "modern-guard",
"definition": "modern-guard policy example",
"target": "user",
"override_response": "Ops, sorry!",
"detectors": [
{
"expected": "blocked",
"model": "modern-guard",
"threshold": 0.5
}
]
};
payload = {
"message": messages,
"policies": [policy],
"enabled_policies": ["modern-guard"]
};