Glossary
PII Redaction
Finding personal data in text and taking it out before it reaches a log, a database or a language model. The hard part is not the masking, it is the detection.
General definition
PII Redaction is the automated or manual removal of personally identifiable information (PII) from content so that what remains can be stored, logged, analysed or passed to a third party with less risk. Redaction sits downstream of detection: a system first has to find the names, e-mail addresses, phone numbers, account numbers, dates of birth and free-text clues that identify a person, then decide what to do with each match.
Three detection methods are common, and production systems usually combine them:
- Pattern rules (regular expressions plus checksum validators) for structured identifiers: card numbers, social security and national insurance numbers, IBANs, e-mail addresses, phone numbers
- Named entity recognition (NER) models that tag people, organisations, locations and dates in free text, which catches what a regex cannot
- LLM classifiers that read a passage and label sensitive spans in context, useful for indirect identifiers (“the only cardiologist in the village”) at the cost of latency and a model call that must itself be trusted with the data
What happens after detection matters as much. Masking replaces the value with a placeholder such as [NAME] or XXX-XX-1234 and is irreversible. Reversible tokenisation swaps the value for a token and keeps the mapping in a separate vault, so an authorised process can restore the original later. GDPR calls this pseudonymisation (Article 4(5)) and still treats the result as personal data, because the key exists. Tokenisation is the right choice when a downstream step must reply to the real person; masking is right for analytics, model training and logs.
Redaction has limits. Detection is probabilistic, so a redacted dataset should be sampled and checked, and surrounding context can re-identify a person after the obvious fields are gone. It is a data minimisation control, not a substitute for access control, encryption or a retention policy, and it works best at a boundary: before a message is written to a log, before a document is indexed for retrieval, and before a prompt leaves your network for a model API.
In the Ethora ecosystem
In Ethora the redaction layer is the Trust and Safety (TnS) system, which runs server-side on every message. Stop-word lists and regular expressions catch structured identifiers, and AI auto-moderation reads free text for sensitive content. Each rule can block the message, censor the matched span, quarantine it and report it, or report only, so a healthcare deployment can strip a date of birth or a card number that a patient pasted into chat immediately, or after a delay that gives staff time to act. Findings are reported to your own systems through a message bus, the API or e-mail.
For AI agents the same boundary applies before a prompt is built. Agents answer from the knowledge you assign to them, and on dedicated or self-hosted deployments the model endpoint can be a local model behind an OpenAI-compatible API, so personal data never has to leave your account to be read or redacted. TnS rules are configured per App through the admin panel and API, and they work alongside configurable retention and per-user erasure rather than replacing them.