Data Privacy
data-privacy
Practice Problems
Leakage-Safe Context Selection
Select the documents a user may see from trusted identity alone, rank them by query terms in the title and body, and return at most maxItems minimized context items without ever exposing an internal note.
System Design
Encryption at Rest/Transit & Data Privacy (GDPR)
Encryption protects data from unauthorized access; privacy regulations (GDPR, CCPA, HIPAA, PCI-DSS) determine what data you may collect, how you must protect it, who can see it, and how you must respond to user requests. The two intersect: regulations mandate encryption in many cases, and encryption is the technical foundation for most privacy controls. This lesson covers the standard primitives (TLS 1.3 for transit, AES-GCM and envelope encryption for rest), key management (KMS, HSM, key rotation), application-level encryption (per-tenant keys, field-level encryption, deterministic encryption for searchability), the privacy-engineering layer (data classification, minimization, retention, right-to-be-forgotten), and the operational realities (key compromise, crypto-shredding, BYOK, audit logs). The goal is to leave you able to design a system that is encryption-correct, privacy-compliant, and operationally honest about its trade-offs.
AI Engineering
Contain an indirect prompt injection
Explain why a retrieved document cannot grant itself authority, and name the controls in trusted code that still hold when the model follows an injected instruction.
Prove a context selector cannot leak data
Implement a context selector that enforces tenant, group, and deletion rules before ranking, then design tests proving that forbidden records and internal notes never reach the model-bound payload.
Threat-model an agent with private data
Threat-model a multi-tenant assistant that reads private documents, keeps conversation summaries, and sends approved notifications, naming where each control is enforced and what risk remains.
Choose a hosted API or a self-hosted model
Compare a hosted model API with a self-hosted open-weight model for a live tutor and a nightly scoring job: apply a quality gate, compute monthly cost at real utilization and the breakeven volume, check a data-location rule, and say what would reverse the choice.
Make human oversight meaningful
Examine a fictional AI coach whose feedback passes a human Approve button, calculate what careful review would cost, and propose the purpose, data, review, and ownership controls that make the oversight meaningful.
Set team rules for AI tools and company data
Write the rules a 30-person accounting team follows when it uses AI tools with client data. Classify the data, match each class to a tool by its data terms, give alternatives and an exception path, and handle client data that staff already pasted.
Decide whether to build or buy an AI tool
Choose between the AI feature in your finance suite, a specialist vendor, and an in-house build: apply hard gates first, read a pilot on your own invoices, compare three-year cost on one basis, and recommend one option with contract conditions and an exit plan.
