Data leakage, PII, sensitive data, and secrets
Practice this questionOverview
- Data leakage is unauthorized disclosure.
- PII means personally identifiable information, such as identity-linked names, contact details, and account identifiers.
- Sensitive business or health information and credentials need protection even when they do not fit a narrow PII category.
Why this matters
Prompts, embeddings, traces, tool outputs, caches, and transcripts can all copy private information into new locations.
An everyday example
Photocopying a private case file creates another copy that must be secured and eventually disposed of.
A technical example
Return {claimId, status, missingDocumentTypes} to the model rather than the full customer record and bank details.
How it works
- Classify data
- Minimize fields
- Redact/tokenize where needed
- Use approved provider/region
- Encrypt storage/transit
- Restrict logs
- Apply retention/deletion.
Architecture and flow
Private record → minimal authorized projection → approved model/tool path → redacted trace.
The insurance assistant example
A claim summary should not send unrelated medical history or payment credentials to a model.
When to use it
Every production AI system processing private or client data.
When to avoid it
Never put provider API keys in browser bundles, prompts, source-control examples, or model-readable logs.
Interview answer
“I minimize model-visible data and protect every derived copy, including vectors, caches, traces, and conversation history.”
Benefits, trade-offs, and production considerations
- Masking can harm task quality; use reversible tokenization only with controlled re-identification where necessary.
- Confirm provider data-handling terms for the actual account/service rather than assuming that one request flag establishes compliance.