Track 07 · Data & governanceLesson 05 of 11

Finding and masking personal data

Discover, mask and tokenise PII before it stalls the project.

What you'll be able to do

What you'll be able to do

01
  • Explain how PII, GDPR special-category data, HIPAA PHI and PCI cardholder data differ, and which de-identification standard applies to each.
  • Choose between redaction, masking, pseudonymisation, vault tokenisation, format-preserving encryption and anonymisation for a field and its consumer.
  • Implement detectors that combine patterns, checksums and context, and measure precision and recall per entity type.
  • Design where masking happens in an LLM pipeline and where un-masking is allowed.
  • Defend the residual re-identification risk to a CISO and a privacy officer with numbers.
Before you start

Before you start

The short version

The short version

Enterprise AI stalls on PII because nobody can show which sensitive values cross which boundary. The fix is data engineering, not a prompt: discover sensitive data in columns and free text, classify it by regime, measure your detectors, and transform values near the source. Deterministic keyed tokens keep joins and reasoning working; a vault the model never touches holds the mapping; un-masking happens only at the edge, for an authorised viewer, logged.

  • Classification drives treatment. A card number, an NHS number and a diagnosis fall under different rules.
  • Detectors are classifiers. Report precision and recall per entity type; an overall score hides the entity you never detect.
  • Pseudonymised is not anonymous. Under GDPR Recital 26, tokenised data is personal data for whoever can reverse it.
  • Mask early, un-mask late. Before embedding, prompting, logging and tracing; reveal only in the render layer or a trusted tool.
  • The vault is a security system. Role, purpose and case scope gate every reveal, and the log is audit evidence.

Pro lesson

The rest of this lesson is in Pro.

The mental model, worked example, field note, failure table, exercise and self-check, with the voice tutor.

  • Every stage and specialisation, in full
  • Every lab and every role project
  • Halden weeks 2–10, on your record
  • Every drill, live in the playground
  • All solutions, plus the server judge
  • Lab Assistant and every Teach with AI