← Back to Registry Hub/Site Search/L0 · governance_finops
⚡Flashcard Drill➔
L0S2 · Data & RetrievalS6 · Security & FinOpsVerified: 2026-11-17

Presidio Reversible PII/PHI Redaction & Token-Map Gateway Primitive

Boundary privacy primitive combining Presidio NER + deterministic checksum recognizers to mask PII/PHI/secrets into deterministic placeholders before external LLM calls or vector writes, rehydrating answers strictly inside trusted enclave boundaries.

Best For

HIPAA/GDPR/PCI-regulated enterprise AI gateways forwarding sensitive workflows to external commercial model APIs.

Human-AI Boundary

Ephemeral token-vault maps live solely in short-TTL tenant-scoped memory; raw PII never enters log shippers.

Anti-Patterns to Avoid

  • Writing raw unredacted customer SSNs, API keys, or patient MRNs into vector DB payloads or third-party observability traces
  • Persisting reversible PII lookup tables in long-lived shared caches without per-session TTL and tenant isolation

Latency/Cost Profile & Eval Metrics

Regex/Checksum 1–4ms + Small NER ONNX < 18ms P95 on CPU · Zero LLM token overhead; dedicated CPU inference pool

  • PII Recall on Annotated Domain Emails/Tickets: >= 0.99 recall on SSN, credit cards, MRN, and auth secrets (Treat false negative (leak) as 20x costlier than benign false positive masking)

💰 Business ROI Model & Evidence Level

production_practice

Unlocks frontier commercial LLM APIs for regulated datasets without breaching compliance—saving weeks of InfoSec sign-off and six-figure self-hosting GPU overhead.

⚖️ Engineering Trade-Off & Decision Matrix

Reversible Request-Scoped Vault Redaction
When to Use: Internal agent UX where authorized staff need real entity names restored post-inference.
Trade-Off: Requires short-TTL vault state and semantic placeholder typing (`<COMPANY_A>`).
Irreversible One-Way Hashing / Scrubbing
When to Use: Offline fine-tuning corpora and anonymized benchmark suites.
Trade-Off: Zero re-identification risk at the cost of non-reversibility.

🛡️ Compliance & Governance Hard Constraints

  • Dual enforcement: mask both ingestion chunks before embedding AND runtime user prompts/tool results
  • Zero plaintext PII persistence in LLM trace exporters (OpenTelemetry / Langfuse)
⚡
Test muscle memory on this topic via 3-Layer Flashcards
Active Recall: Mentally formulate Prompt ➔ Math Derivation ➔ Benchmark Implementation in 3 minutes.
🎯 Drill This Card Now➔

Bidirectional Taxonomy Links

Internal Tools & Primary Sources