Policy Concepts
Every BeyondGuard policy is built from three core elements that work together to define guard behavior. Detection Rules specify the patterns, behaviors, or content types that constitute a violation. BeyondGuard ships with a default rule set covering all OWASP LLM Top 10 categories. You can extend these rules with custom patterns specific to your application domain — for example, detecting references to internal project codenames or restricting queries about competitor products. Severity Thresholds determine how confident BeyondGuard must be in its detection before raising a threat event. Each detection rule produces a confidence score. The severity threshold you configure sets the minimum score required to trigger a flag. A lower threshold catches more potential threats at the cost of higher false positive rates; a higher threshold is more precise but may miss subtler attacks.
Enforcement Actions define what BeyondGuard does when a violation is detected. The available actions depend on the guard and the operating mode:
- Allow — the interaction passes unchanged; the decision, confidence score, and reason code are written to the audit log.
- Deny — reject the interaction and return a configurable explanation to the caller.
- Mask — remove or mask the offending content and allow the sanitized interaction to proceed.
- Rewrite — reformulate the offending content into a policy-compliant equivalent, preserving user intent.
Scope Definitions
BeyondGuard’s Context Guard uses scope definitions (controlBG-26) to understand the intended purpose of your AI application. When a request or response falls outside the defined scope — for example, asking a customer support bot for legal advice — the guard flags, denies, or rewrites it based on your enforcement action settings.
Define your application’s scope using a JSON configuration in the Scope section of your project’s Policies settings:
PII Detection Categories
Prompt Guard can be configured to detect and mask personally identifiable information — both on the way in and before responses reach end users (controlsBG-02 and BG-20). The following PII categories are available for detection:
- Names — individual person names detected via named entity recognition
- Email addresses — standard and obfuscated email patterns
- Phone numbers — domestic and international formats
- Card numbers (PAN/CVV) — major card formats with Luhn validation
- IBAN and account numbers — international bank account formats
- National ID numbers — including Turkish TCKN and other national identifier formats
- Passport numbers — international passport number patterns
- Medical record numbers — common MRN formats used in healthcare systems