Infrastructure · Verification

OutputGuard

Final egress filter for safety and privacy

Definition

Mechanism

Post-generation content filter. Scans candidate Solution against PII patterns and Toxicity Classifiers. If Score > Threshold, triggers mitigation (Redact/Reject). It mirrors the logic of input guard but applied to egress traffic, scanning for leakage or toxicity.

Preconditions

  1. Candidate solution generated
  2. Safety policies active

Postconditions

  1. Safe output delivered OR Block signal returned

Invariants

  1. Fail-Safe: If Scanner fails (timeout/error), Output is BLOCKED (not passed).
  2. Privacy First: detected PII must not reach egress unmitigated. Which mitigation applies — redaction, blocking, or hashing — is the caller's `pii_mode` choice; what is mandatory is that one of them runs, since blocking is stronger than redaction where the content cannot be safely salvaged.

Risks

Failure modes

  1. Scunthorpe {{problem}}

    Over-censorship blocking valid words containing restricted substrings.

  2. Semantic context blindness

    Guard blocks necessary medical terms misclassified as toxicity.

  3. Redaction Leak

    [REDACTED] markers revealing the location/length of hidden secrets.

Relationships

Builds on

Accepts

Solution

The fractal unit of completed work

References

Problem

A state gap with a cost of inaction

Used by

Composes with

Society

AgentSandbox

Isolate agent execution with resource limits and egress controls

References

FailClosed

Default-deny policy for uncertain states

Reference

Parameters

pii_mode Enum, {Redact, Block, Hash}
Default: Redact
scan_timeout Duration, unspecified
Default: 500ms
toxicity_threshold Float, [0.0, 1.0]
Default: 0.8

Identity

Ref
OutputGuard#3618
Sema ID
sema:OutputGuard#mh:SHA-256:3618ee4d6aa243c10c16af73e4a385a6fa0c60ee193edb0a67d23e2c8d57f93e
Ring
0
Tier
2
Updated
2026-11-11
Supersedes
  • sema:OutputGuard#mh:SHA-256:eb44b7e751219a94f752bb8827843ede1045bc1a4195d9d0db3648f9ae097bb0
  • sema:OutputGuard#mh:SHA-256:32b0ffd08f916d61a677af7d82c53feb8a4019baab1bd86622a853aafa91ed2f
  • sema:OutputGuard#mh:SHA-256:1396cd3b7d51a56b178382a521d22ae7f478d4681ea7e31d5af1d625857ad315
  • sema:OutputGuard#mh:SHA-256:fa36290c5575e62bc35a5196e93536286575b2c6dbeb13db64e000bbd487e8d3