100% Free Forever
AI-Powered Learning
Industry Expert Content
Certificates & Badges
Learn At Your Own Pace
AI Guardrails & Safety Engineering
34 minadvanced

PII Detection, Redaction and Minimisation

Every guardrail this course has built so far assumes the agent legitimately holds some sensitive data and asks how to stop it leaving through the wrong door. This lesson asks a question one step earlier: does the agent need to hold that data at all? A support agent that never receives a customer's full card number cannot leak it, cannot mis-scope a tool around it, and cannot have a redaction filter fail to catch it — because it was never in the context window to begin with. Minimisation, not detection, is the primary control this lesson teaches, and redaction is what you fall back to only for the data you genuinely could not avoid collecting.

Teams routinely get this order backwards: they pipe an entire customer record — name, address, card details, date of birth — into an agent's context because it was convenient to fetch the whole record in one API call, and then bolt on a regex-based redaction filter to catch anything sensitive before it reaches the model's output. This treats a data-minimisation problem as a data-loss-prevention problem, and it inherits every weakness a filter has: it can only catch patterns it was built to recognise, it runs after the data is already in the context the model reasons over, and a single missed pattern is a real leak, not a near miss.

This lesson is explicit about a limit: no detector's accuracy is quoted here as a number, because published accuracy figures vary enormously by data type, language, and format, and quoting one figure as if it generalises would be exactly the kind of invented statistic this course does not traffic in. What follows instead is the actual design discipline — minimise first, redact what remains, and never treat redaction alone as sufficient.

Analogy🏏Cricket
🏏 Think of it like cricket: A stadium's ticketing system for a high-security international fixture does not hand every steward and vendor a full copy of every spectator's personal booking details just because it might be convenient to have on hand. A gate steward checking entry only needs to see whether a scanned ticket is valid for that gate at that time; a catering vendor processing a card payment only needs the transaction to clear, not the cardholder's home address that happens to sit in the same booking record. When India hosted a marquee match with tightened security screening, the access-control system was built specifically to give each role exactly the slice of a booking record its job required, rather than handing every checkpoint the full record and trusting each one not to misuse the rest. Just as a gate steward's screen shows only ticket validity, not the spectator's full personal file, an agent's context should show only the specific fields a task actually requires, not the customer's full record. Just as narrowing what each role can see is a design decision made before the gates ever open, minimising what data an agent receives is a design decision made before the agent ever runs, not a filter bolted on afterward. The insight is that data a system never receives cannot be leaked by that system, no matter how good its safeguards are — the strongest privacy control is the one that makes a later mistake structurally impossible, not merely unlikely.
Lesson 20 of 35
0% complete