A personal identifier appears in a trace before masking
Detect: Telemetry inspection finds raw payload capture upstream of the transformer.
Recover: Move or disable capture and remediate retained data under policy.
Detect and transform personal data before model exposure while preserving task utility, protecting reidentification mappings, and measuring missed entities.
PII masking replaces or removes personal information in prompts, documents, tool results, and logs according to a defined data policy. Techniques include redaction, typed placeholders, tokenization, and reversible pseudonyms. These techniques have different privacy and utility properties; replacing a name with a stable token is not the same as making the record anonymous.
Detection is imperfect, especially for uncommon identifiers, multilingual text, images, and context-dependent entities. Combine appropriate recognizers and domain rules, evaluate false negatives, and minimize data before detection. Protect any reversible mapping as sensitive data with stricter access than the masked payload.
A prototype can mask obvious names and contact details in a sample corpus. Include realistic domain identifiers and ambiguous phrases before judging coverage.
Production applies masking before external inference and before telemetry export, with policy-specific handling for structured fields and free text. Reidentification requires explicit authorization.
At scale, maintain recognizers by language and business domain, track detector drift, and cover attachments and derived artifacts. Masking errors must be assessed against both privacy exposure and loss of task meaning.
Determines relevant personal-data categories and the applicable handling policy.
Combines structured-field knowledge, patterns, and contextual recognition to locate sensitive spans.
Applies redaction, typed replacement, hashing, or tokenization according to field semantics.
Protects reversible token mappings with separate keys, access controls, and retention.
Measures missed entities and excessive masking on representative reviewed samples.
flowchart LR
R["Customer case data"] --> M["Data minimization"]
M --> D["PII detection"]
D --> T["Policy transformation"]
T --> L["Model inference"]
T --> O["Masked observability"]
T --> V["Protected mapping vault"]
L --> A["Authorized output adapter"]
V --> A
A --> U["Permitted recipient"]Remove fields unnecessary for the task before invoking any model or detector.
Analyze structured fields and text using domain and language-appropriate recognizers.
Apply consistent precedence when multiple recognizers identify overlapping sensitive spans.
Replace entities while preserving required relationships and storing reversible mappings only when necessary.
Send the transformed payload through inference and apply the same policy to logs and outputs.
Restore approved values only for an authorized recipient and record mapping access.
Insurance customer service · Illustrative enterprise scenario, not a reported customer outcome.
An insurer summarizes customer emails containing names, addresses, policy identifiers, and descriptions of personal circumstances.
Sending entire messages to every processing component exposes unnecessary personal data and reproduces it in traces.
The assistant must summarize the service issue while retaining enough entity consistency to distinguish people and policies.
A minimization stage removes irrelevant fields, then typed pseudonyms preserve relationships through inference while mappings remain in a protected vault.
If a detector misses a rare identifier, sampled review and output scanning create a remediation case and update the recognizer evaluation set.
Measure entity-level false negatives, excessive masking, summary utility, and mapping-vault access. Masking reduces exposure but does not guarantee anonymity.
| Decision | Benefit | Cost |
|---|---|---|
| Irreversible redaction | Removes the need to protect a reidentification mapping. | Some workflows lose essential entity relationships. |
| Stable pseudonyms | Preserve references across a case or analysis. | Linkability can still reveal sensitive patterns. |
| Contextual detection | Finds entities beyond simple regular expressions. | Accuracy varies by language and domain. |
Detect: Telemetry inspection finds raw payload capture upstream of the transformer.
Recover: Move or disable capture and remediate retained data under policy.
Detect: Access review reveals equivalent access to tokens and mappings.
Recover: Separate permissions and rotate affected mappings where appropriate.
Document remaining linkability and reidentification risk.
Cover tool results, attachments, outputs, and logs.
Test domain identifiers and supported languages.