Skip to content

Solutions · PII redaction

PII redaction for LLMs and AI agents

Strip or replace personal data before it reaches a model, using rules your whole organization shares.

Every prompt, retrieved document and tool call that an AI agent sends can carry personally identifiable information (PII): names, email addresses, phone numbers, account numbers, health details. PII redaction tools exist, but each one decides on its own what counts as PII and what to do with it. The Open Privacy Protocol (OPP) makes that decision explicit, portable and auditable.

Why redaction alone is not enough

Common approach The problem What OPP adds
Regex lists per tool Every tool redacts differently; gaps between tools One catalog of 33 classes shared by every tool
Redact everything The model loses meaning: it cannot tell two people apart Per-class handling: pseudonymize, generalize, redact or block
Generic PII detectors Miss your own identifiers (client IDs, matter numbers) Your identifier formats and terms are part of the model
Opaque decisions Hard to audit or explain to a regulator Every finding carries its class, sensitivity, action and reason

How PII redaction works with OPP

  1. Describe. A privacy model maps your data to catalog classes such as personal.email, personal.government_id and special.health, each with a default sensitivity and handling.
  2. Detect. OPP Engine finds values with checksummed rules (cards, IBANs), patterns (emails, phones, keys), your declared identifiers, and optionally the open-weight OPP Model for names, addresses and free-text topics.
  3. Decide. The sharing rules resolve each finding to one action for the destination, and the strictest action wins.
  4. Transform. The agent receives safe_content: values replaced by consistent placeholders such as <EMAIL_1> or removed, with a list of what changed and why.
opp-engine check acme.opp.yaml --dest external_ai \
  "Write a welcome email to [email protected] about client CE-204817's plan upgrade."
# verdict: pseudonymize
# safe_content: Write a welcome email to <EMAIL_1> about client <RECORD_IDENTIFIER_1>'s plan upgrade.

Redaction, pseudonymization and generalization

Action What happens Use it for
generalize A coarser value: a year instead of a date, a city instead of an address Analytics and reporting
pseudonymize A consistent substitute you can map back Drafting, summarising, anything that must keep who-is-who
redact The value is removed and a typed placeholder left Content the model does not need
block The content is not sent at all Credentials, special-category data to external models

Covered PII and sensitive data

Personal data (names, dates of birth, addresses, locations, emails, phones, usernames, government IDs, account and card numbers, record identifiers, online and vehicle identifiers, images, affiliations), GDPR special categories (health, genetic, biometric, ethnic origin, political opinion, belief, trade-union membership, sex life, criminal records) and credentials. See the full baseline catalog.

Next steps