AI CompendiumA public chart of the language
Home / Safety & Alignment / PII Redaction
Safety & Alignment

PII Redaction

also called Anonymisation

Removing or masking personal identifiers before the model sees them.

Definition

Detecting and replacing names, addresses, account numbers and other personal data with placeholders, then restoring them after generation if the application needs the real values.

A clean pattern for regulated contexts: redact on the way in, keep the mapping on your side, rehydrate the model’s output locally. The provider never holds the identifiers.

The hard part is restoration, and it is worth designing deliberately. A placeholder scheme needs to survive the round trip without collisions and without leaking structure — sequential placeholders reveal the number of distinct people, which is itself information in a small dataset.

How people use it
Designing a support-copilot integration.
"Names and account numbers get tokenised before the request. We rehydrate the draft reply on our side."
Worked example

Redact, generate, restore

Drafting a customer letter that must contain their real details.

Replace identifiers with stable tokens, let the model write the letter, then substitute the real values back on your side. The model never sees the data and the output is still personalised, which is the pattern most privacy-sensitive deployments converge on.

Sources
Related terms