Back to List

ModernGuard

modern-guard

Detects prompt injection vulnerabilities.

Type

Detector

Model

modern-guard

Accuracy

98%

Latency

25ms

Technical Details

Input Format

Text

Output Format

JSON with injection probability

Model Architecture

Transformer-encoder based

Creating a policy example

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"]
};

Tags

Security
Prompt Injection

Guardion API - Playground

Check out the API reference