Skip navigation
Dual-Zone AI Architecture: Structurally Eliminating PHI Exposure

Dual-Zone AI Architecture: Structurally Eliminating PHI Exposure

Architecture Pattern: Dual-zone isolation • Deterministic tokenization • Defense-in-depth guardrails • Zero data exposure

The Architecture Challenge

Foundation models need domain context to generate useful answers. In regulated industries — healthcare, financial services, legal — that context often contains protected data that cannot leave a compliance boundary. Policy-based controls (prompt engineering, content filters) are insufficient: a single bypass means exposure.

EFS Networks was asked to solve this for a healthcare system where HIPAA's "minimum necessary" standard required a solution where it is structurally impossible — not just policy-controlled — for protected health information to reach the foundation model.

Dual-Zone Architecture

The solution separates the system into two isolated zones with no shared data paths:

The zones communicate only through a tokenization pipeline — the AI Zone receives synthetic tokens, never real data.

How It Works

  1. Entity extraction — Amazon Comprehend Medical identifies 18 PHI entity types (names, dates, medications, diagnoses) from clinical text
  2. Deterministic tokenization — Each PHI entity is replaced with a synthetic token (e.g., [NAME_001], [MED_003]). Token mappings are stored in DynamoDB within the PHI Zone only.
  3. Guardrail layer — Bedrock Guardrails run in BLOCK mode on both input and output as defense-in-depth. In production, Guardrails caught all 6 entities that Comprehend Medical missed (99.94% combined accuracy).
  4. Agent reasoning — The Strands agent reasons over tokenized text using Bedrock (Claude 3.5 Sonnet for complex queries, Haiku for simple lookups), autonomously selecting tools and planning query strategy
  5. Reconciliation — Response tokens are mapped back to real patient data within the PHI Zone before delivery to the clinician

The agent also routes between Sonnet and Haiku based on query complexity, reducing inference costs by 19–31% with no accuracy degradation on simple queries.

Why This Pattern Matters

This architecture is transferable to any domain with sensitive data — financial PII, legal privilege, student records (FERPA), or classified information. The key insight: rather than trying to prevent a model from leaking data it has seen, ensure the model never sees the data in the first place.

The dual-zone pattern provides:

Production Results

MetricResult
PHI exposure incidentsZero — verified via CloudTrail audit
Response time (p95)3.2 seconds against 5-second target
Anonymization accuracy99.94% (Comprehend Medical + Guardrails combined)
System availability99.97%
User adoption (month 3)73% (89% in emergency medicine)
Productivity gain78 minutes saved per clinician per day
Annualized value$5.7M at ~$2,900/month operating cost

AWS Services

Amazon Bedrock (Claude 3.5 Sonnet / Haiku), Bedrock Guardrails, Amazon AgentCore, Strands Agents SDK, Amazon Comprehend Medical, Lambda, DynamoDB, S3, Cognito, KMS, CloudWatch, CloudTrail, VPC. Infrastructure via AWS CDK (Python).

Let's talk about what you're building.

Our team brings over two decades of experience to every engagement. Tell us about your project and we'll show you what's possible.