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
[](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_5COMPONENT STACK (6)
- AI GatewaySTATELESSUser Prompt & Model Stream
- Parallel Input ShieldSTATELESSPII NER + injection classifier
- Deterministic RulesSTATELESSAho-Corasick + regex + schema
- Streaming Output CheckSTATELESSWindowed toxicity/hallucination
- Audit & Safe FallbackSTATEFULRedacts/blocks + logs incident
- Downstream & OTelSTATELESSConsumers, metrics & SLOs
REQUEST & DATA FLOW (6)
- AI Gateway → Parallel Input Shield (Scan input)[gRPC]
- Parallel Input Shield → Deterministic Rules (Fast check)[In-Proc]
- Parallel Input Shield → Streaming Output Check (Scan)[SSE]
- Deterministic Rules → Audit & Safe Fallback (Verdict)[OTLP]
- Streaming Output Check → Audit & Safe Fallback (Sync)[Control]
- Audit & Safe Fallback → Downstream & OTel (Emit /)[OTLP/API]