Why AI systems leak PII: masking treated as text replacement, not data classification
arpit_bhayani · x · 2026-11-04
A common failure mode in AI systems is PII leakage, and the root cause is treating masking as a text-replacement problem rather than a data-classification problem. Typical anti-pattern: a support bot or RAG pipeline connected to real customer data, with regex stripping emails and phone numbers before shipping. Regex only catches fixed-shape PII; it misses context-dependent PII like "the patient in room 4B", where sensitivity lies in token relationships. NER catches free-text entities via context but misses domain-specific identifiers. What works is layering: 1) structural detectors for fixed-shape data, 2) NER for free-text entities, 3) a domain-specific rule layer for your own schema.
More from coding & agent
- Power user tallies 12B coding-agent tokens, finds 96% were cache reads — peakpirate007 · 2026-11-04
- Indian code-mixed calls have no single correct transcript: LLM, CRM and compliance each need a different one — BEYOND__7 · 2026-11-04
- Alexey Grigorev releases free kit of 28 prompts to ship an app from spec to production — Al_Grigor · 2026-11-04
- Hugging Face Hub MCP Server lets agents search models and datasets via MCP — modelcontextprotocol · 2026-11-04
- awesome-mcp.tools exposes 2,000+ MCP servers as searchable tools, refreshed every 6h — modelcontextprotocol · 2026-11-04
- Open-source Skill Lets You Ship Native macOS Apps with One Prompt, Auto-Notarized — vista8 · 2026-11-04