lesson
60 min

Handling Personal Information

Minimize, redact, restrict, and delete personal information across an AI pipeline, with the strictest defaults for minors.

Objective

By the end of this lesson, you can apply data minimization, layered redaction, access control, and retention rules to an AI pipeline, and explain the extra protections for minors.

What counts as personal information

Personally identifiable information (PII) is data that identifies a person alone or combined with other data. Some is obvious: names, phone numbers, Social Security numbers. Some is not: a rare medical condition plus a zip code, or "the only Spanish-speaking family on Elm Street."

Some data is sensitive and needs extra care: health, immigration status, criminal records, sexual orientation, income, and anything about children.

Five layers of protection

No single step protects people. Stack them:

  1. Minimize. Do not collect what you do not need. The safest data is data you never stored.
  2. Redact. Remove identifiers before text reaches the model, logs, or test sets.
  3. Restrict. Only the people and systems that need data can reach it (Module 8).
  4. Retain briefly. Set deletion dates for chats, logs, and test samples. Check your provider's retention terms.
  5. Review. Audit samples regularly to find what slipped through.

Redaction catches patterns, not meaning

Run it. Phone, email, and SSN are caught. The name and street address are not. Try adding a pattern for addresses like '12 Oak St'. Then think: how many ways can people write an address? This is why redaction is one layer, not the plan.
Python 3
Ctrl+Enter to run | Tab to indent | Python runs in your browser via Pyodide

The first run downloads Python into your browser (several MB). All data in this example is made up.

Pattern matching misses names, addresses, and details that identify someone in context. Tools that use trained models to find names and places catch more, and still miss some. Plan for leaks: assume some PII will get through, and limit where it can go.

Extra care for minors

Children and teens deserve the strictest defaults:

  • COPPA (Children's Online Privacy Protection Act) requires verifiable parental consent before collecting personal information online from children under 13, among other rules.
  • FERPA (Family Educational Rights and Privacy Act) protects student education records at schools that receive federal funding.
  • State laws add more. Check the rules where you operate.

Laws set a floor. As an architect, design above it:

  • Collect the least possible from anyone under 18.
  • Use their data only to serve them. Keep it out of training, evaluation sets, and analytics.
  • Do not log raw conversations with minors.
  • Involve a parent or guardian in consent, in plain language.
  • Never use real student or youth data in demos, class projects, or vendor trials.

A national example

PII design review

0 of 8 done

Go deeper: Consent as signal: the first-party data layer you own

Ask. Answer. Build together.