What Output Guard Detects
Output Guard evaluates model responses across five threat categories.- Data Leakage / PII: Sensitive personal or business data included in a model response — names, email addresses, phone numbers, financial identifiers, healthcare data, or internal business information — that should not be surfaced to the requesting user or logged in plaintext.
- IP Violation: Model outputs that reproduce copyrighted text, trademarked content, or licensed code verbatim, exposing your organization to intellectual property liability.
- Toxic and Harmful Output: Offensive, harassing, discriminatory, or otherwise harmful content — including content that is harmful in the specific context of your application even if it would not be universally classified as toxic.
- Dangerous Code: Generated code that contains malicious behavior (backdoors, data exfiltration, destructive operations) or serious security vulnerabilities (SQL injection, command injection, hardcoded credentials) that would put users or systems at risk if executed.
- Brand Integrity: Responses that contradict your brand guidelines, make unauthorized claims about your products or services, misrepresent your organization’s positions, or otherwise violate your defined business rules for model behavior.
How Output Guard Works
Output Guard intercepts model responses after generation and before delivery, running them through a post-generation inspection pipeline.1
Response Capture
After your model generates a response, Output Guard captures it before it is returned to the user or consumed by the next step in your pipeline. For streaming responses, Output Guard buffers the stream and evaluates the complete response prior to final delivery.
2
Multi-Category Evaluation
The response is evaluated across all enabled threat categories simultaneously. PII detection uses entity recognition and pattern matching. IP violation detection compares response content against reference fingerprints. Toxicity evaluation uses content classifiers tuned to your configured policy. Code analysis uses static analysis to identify dangerous patterns. Brand integrity checks compare the response against your registered brand rules.
3
Enforcement Action
Based on evaluation results and your configured thresholds, Output Guard takes the appropriate enforcement action: deliver (no issues detected), redact (mask identified sensitive content and deliver the modified response), or block (reject the entire response and return a safe fallback). See the next section for guidance on choosing between redaction and blocking.
4
Audit Logging
Every evaluated response — whether delivered, redacted, or blocked — is recorded in the BeyondGuard audit log with its evaluation scores, matched patterns, enforcement action, and (for redacted responses) the original and modified versions. This log supports compliance reporting and incident investigation.
Configuring Output Guard
Enable and configure Output Guard from the BeyondGuard Control Plane.1
Open Your Project
Navigate to the Control Plane and select the project you want to protect.
2
Open the Guards Tab
Inside your project, select the Guards tab from the left navigation panel.
3
Enable Output Guard
Locate Output Guard in the guard list and toggle it to Enabled.
4
Configure PII Detection
Under PII Settings, select the PII categories you want Output Guard to detect and act on. Categories include personal identifiers (name, email, phone, address), financial data (account numbers, card numbers), healthcare identifiers, and custom patterns you define via regex or named entity rules.
5
Set Content Policy Thresholds
Under Content Policy, configure the sensitivity thresholds for toxicity, IP violation, and brand integrity checks. Each category can be tuned independently. Review the Observation Mode detections from your application before finalizing thresholds for Enforcement Mode.
6
Configure Code Analysis
Under Code Analysis, enable dangerous code detection and select the vulnerability categories you want flagged: malicious behavior, injection vulnerabilities, hardcoded secrets, and insecure patterns. You can scope code analysis to specific programming languages if your application generates code in a known set of languages.
7
Register Brand Rules
Under Brand Integrity, enter the business rules, prohibited claims, and brand guidelines that model responses must comply with. Rules can be entered as natural-language statements or as structured policy documents.
8
Choose Enforcement Actions per Category
For each threat category, configure whether violations should trigger Redaction or Blocking (see the next section). You can set different enforcement actions for different categories and different severity levels.
9
Save and Deploy
Click Save Configuration. Output Guard begins inspecting all model responses on this project immediately.
Operating Modes
Output Guard supports two operating modes. You can switch between them at any time from the Control Plane without downtime.Redaction vs. Blocking
When Output Guard detects a policy violation, it can respond in one of two ways. Choosing the right enforcement action for each threat category balances security with user experience.- Redaction
- Blocking
Redaction masks the violating content within the response while preserving the rest of the model’s output. The user receives a modified but still useful response.How it works: Identified sensitive content — a PII value, a flagged phrase — is replaced with a token such as
[REDACTED], [PII REMOVED], or a custom placeholder you configure. The rest of the response is delivered unchanged.Best for:- PII and sensitive data: the user’s question can still be answered without exposing the specific sensitive value
- Minor brand integrity issues: a response that is mostly correct but contains a single non-compliant claim can be corrected rather than discarded
[REDACTED] — the user still receives a complete, coherent answer.