Skip to content

Why LLMs for PII detection

Traditional detectors catch emails and phone numbers by shape. Real documents hide PII in relationships, layout, and implication, which is why Piixie puts a language model at the center of detection.

A regex finds [email protected]. It does not find the sensitive fact that a patient is linked to a doctor, that a dependent is mentioned by first name only, or that a claim number sits in the middle of a paragraph. The sensitive part is often the relationship between ordinary-looking tokens rather than any single predictable pattern.

A resume mentions “Alex” in a cover note, a full name in the header, and a personal website in the footer. A rules engine sees three unrelated strings. An LLM reasons that they belong to one person and anonymizes them consistently, so “Alex” doesn’t survive in paragraph four after the header name was scrubbed. Tables with “spouse” or “emergency contact” columns need the same contextual reading.

Regex cannot distinguish a public company name from a private employer in a medical form, or a product code from an account number. An LLM reads the surrounding text and decides that “Dr. Ruiz” is a provider in one document, “Ruiz family trust” is a private entity in another, and “Ruiz Street” is an address, not a person.

Dates are a good example of where judgment matters. “March 2023” in a press release is public information. “Employed Jan 2020 – Mar 2023” in a CV anchors a person’s timeline and is identifying. Piixie’s prompt treats personal timeline dates as PII; a pattern matcher can’t make that call.

Piixie’s local models support vision, so rendered pages, scans, image-backed PDFs, and screenshots are analyzed directly. No OCR preprocessing, and none of its failure modes: misread characters, lost table structure, flattened multi-column layouts, detached labels.

If the model knows three mentions refer to the same person, Piixie uses one replacement identity for all of them. If it knows an email belongs to that person, synthetic mode generates a coherent local part. Multiple address lines stay internally consistent.

The model finds and classifies entities, but Piixie controls the final operation: redaction markers, replacement tokens, or local Faker-backed synthetic values. The model never freely rewrites your document.

The strongest PII detector is useless if every raw document has to be uploaded to use it. Piixie runs detection where the document already lives. Organizations can still send anonymized output to their preferred external LLMs; the raw detection and transformation step happens before that boundary. If you do want remote inference for the detection step itself, that is an explicit opt-in via remote endpoints or a Piixie server on your own network.