Skip to main content
ARCHOS 525 BLUEPRINT · /d/dgm_int-guardrail-service

AI Guardrail Service Internals (Input/Output Classifiers, PII & Prompt Shield)

6 COMPONENTS · 6 FLOWS · UPDATED 2026-11-24
GITHUB README / PR PREVIEW CARD
[![AI Guardrail Service Internals (Input/Output Classifiers, PII & Prompt Shield) — ArchOS Architecture](https://archos.sageideas.dev/d/dgm_int-guardrail-service/opengraph-image)](https://archos.sageideas.dev/d/dgm_int-guardrail-service)

*Interactive architecture diagram powered by [ArchOS Studio](https://archos.sageideas.dev/d/dgm_int-guardrail-service)*
NOTION / DOCS / CONFLUENCE EMBED
<iframe src="https://archos.sageideas.dev/embed/dgm_int-guardrail-service" width="100%" height="580" style="border:1px solid rgba(240,236,225,0.14);border-radius:6px;" loading="lazy" title="AI Guardrail Service Internals (Input/Output Classifiers, PII & Prompt Shield) — Interactive in ArchOS"></iframe>
PORTABLE MERMAID SPEC (GITHUB / NOTION / RFC)
flowchart LR
  client_0["AI Gateway"]
  n1_1["Parallel Input Shield"]
  n2a_2["Deterministic Rules"]
  n2b_3["Streaming Output Check"]
  n3_4[("Audit & Safe Fallback")]
  downstream_5["Downstream & OTel"]
  client_0 -->|"1. Scan input · gRPC"| n1_1
  n1_1 -->|"2a. Fast check · In-Proc"| n2a_2
  n1_1 -.->|"2b. Scan · SSE"| n2b_3
  n2a_2 -->|"3a. Verdict · OTLP"| n3_4
  n2b_3 -->|"3b. Sync · Control"| n3_4
  n3_4 -.->|"4. Emit / · OTLP/API"| downstream_5

COMPONENT STACK (6)

  • AI GatewaySTATELESS
    User Prompt & Model Stream
  • Parallel Input ShieldSTATELESS
    PII NER + injection classifier
  • Deterministic RulesSTATELESS
    Aho-Corasick + regex + schema
  • Streaming Output CheckSTATELESS
    Windowed toxicity/hallucination
  • Audit & Safe FallbackSTATEFUL
    Redacts/blocks + logs incident
  • Downstream & OTelSTATELESS
    Consumers, metrics & SLOs

REQUEST & DATA FLOW (6)

  1. AI Gateway → Parallel Input Shield (Scan input)[gRPC]
  2. Parallel Input Shield → Deterministic Rules (Fast check)[In-Proc]
  3. Parallel Input Shield → Streaming Output Check (Scan)[SSE]
  4. Deterministic Rules → Audit & Safe Fallback (Verdict)[OTLP]
  5. Streaming Output Check → Audit & Safe Fallback (Sync)[Control]
  6. Audit & Safe Fallback → Downstream & OTel (Emit /)[OTLP/API]
Configure NGINX / Postgres / K8s →60-Sec L4–L7 Diagnostic →