Blue team · D2 / D4 Data protection

Find and redact PII with AI

Use a local AI assistant to locate personal data across structured and unstructured files and produce a redacted version — the data-minimization skill behind every privacy regime.

~50 min · AnythingLLM Desktop · 5 steps

The scenario

A customer-support export landed in your queue and it is full of personal data — names, emails, SSNs, dates of birth, card numbers. It has to go to a vendor for analysis, and it has to be scrubbed first. You also have an internal incident report where the PII is buried in prose, not tidy columns. Your job: find every piece of PII and produce a clean, redacted version.

New to AnythingLLM? Do the one-time setup first — it takes about five minutes.

1 Guided walkthrough

  1. Do the one-time AnythingLLM setup if you have not. Download and unzip the Day 3 data pack (button below): a support-export CSV and an incident report.

  2. Create a workspace and upload support-export.csv. Ask it to inventory the personal data.

    Paste this into the assistant
    This is a customer support export. List every column that contains personally identifiable information (PII), and for each say why it is sensitive.

    You should see: It flags name, email, phone, SSN-last-4, date of birth, address, and card-last-4.

  3. Now have it redact.

    Paste this into the assistant
    Produce a version of this data with every PII value replaced by [REDACTED], keeping the ticket IDs and the issue descriptions intact so it is still useful for analysis.

    You should see: A table where the sensitive fields are masked but the non-sensitive structure remains.

  4. Upload incident-report.md — the harder case, where PII is inside sentences, not columns.

    Paste this into the assistant
    This incident report has personal data scattered through the prose. Find every piece of PII, quote the sentence it appears in, and give a redacted version of the whole report.

    You should see: It should catch inline SSNs and DOBs (James O_Brien, Priya Nair) and staff contact details — but check carefully, prose redaction is where it misses.

  5. Compare its performance on the CSV versus the prose. Where did it do well, and where would you not trust it without a human review?

2 Ship a defensible redaction

No prompts given this time — you write them. Forming the right question is the skill. Work these on your own; compare with a neighbour if you can.

  1. Produce a final redacted copy of BOTH files that you would be comfortable sending to an outside vendor. Verify by hand that nothing slipped through — especially in the prose.
  2. Write the data-handling note that goes with it: what was redacted, what was kept and why, and who signed off.
  3. Answer the design question: should redaction happen at the INPUT (before data reaches an AI/log/ticket) or at the OUTPUT (filtering what comes back)? Defend your answer with an example from these files.
  4. Find one thing the assistant missed or over-redacted. What does that tell you about relying on it unsupervised for compliance work?

What to notice

Think about it

Take it further — for fast finishers
In your classroom: Drop into a privacy, compliance (GDPR/CCPA/HIPAA), or forensics unit. Students see where automated redaction is strong (columns) and where it needs a human (prose).