Module 8 · AI security
Keeping PII out of prompts
Redacting personal information before it reaches a model, what automated redaction catches and misses, and an AI and student data policy to back it up.
- Schedule
- Week 9
- Status
- Draft outline
- Sources checked
This module is a first draft. It sets out the scope so it can be reviewed before it is written in full.
Overview
The surest way to keep a model provider from leaking or training on student data is to not send it. Redaction means detecting personal information in text before a model call and replacing it with placeholders, then restoring the real values in the response only if the user is allowed to see them. Microsoft's open-source Presidio is the usual starting point: it combines pattern matching, checksums and named entity recognition to find names, emails, phone numbers, ID numbers and similar fields, and it lets you add recognizers for your own identifiers such as student ID formats.
Automated redaction is a safety net, not a guarantee. It misses unusual names, nicknames, context that identifies someone without naming them (the only student in the class who uses a wheelchair), and identifiers in images or attachments. It also produces false positives that can break the task. That is why redaction belongs alongside two other controls: data minimization, so the prompt never includes fields the task does not need, and a written policy that says what may and may not be sent to which model.
The module's main deliverable is that policy. An AI and student data policy covers which data may be used with AI, no training on student data, redaction requirements, retention and deletion of prompts and outputs, human review for decisions that affect students, and how a suspected data exposure is reported and handled.
- How Presidio detects and anonymizes PII, and how to add custom recognizers
- What automated redaction misses, and how to test it on your own data
- Data minimization patterns for prompts
- Drafting the AI and student data policy
Lab
Redaction prototype
- 1Install Presidio and run it over a set of synthetic student records, never real ones.
- 2Add a custom recognizer for a student ID format.
- 3Measure what it caught and missed, and list the misses by type.
- 4Draft the AI and student data policy using the headings in this module.
You finish with: A redaction prototype with a miss report, and a draft AI and student data policy.
Open questions for the next draft
- Should the lab ship as a small open-source repo people can clone?
- The plan also names a tool called SupaMakers PII. It is not verified yet and is left out until it is.