Data leakage, PII, sensitive data, and secrets
Words made simple
A few useful meanings before you read the explanation.
- PII
- Information that can identify a person, such as a name, address or identity number.
- AI
- Software techniques for tasks such as recognizing patterns, understanding language or generating content.
- API
- A way for one piece of software to ask another for data or an action. A claims API might return the current status of a claim.
More words from this lesson
- Embedding
- A list of numbers that represents the meaning of some content. Similar meanings can produce nearby lists of numbers.
- Vector
- An ordered list of numbers. An embedding is a vector used to represent content for tasks such as similarity search.
- Authorization
- Checking what that identity is allowed to read or do. Being logged in does not grant access to every record.
- Trace
- A linked record of the steps in one request, including model calls, retrieval and tools. It helps locate delays or failures.
Overview
- 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.
Can you explain it without the notes?
Data leakage, PII, sensitive data, and secrets
Use your own words. Explain an example and one limitation before checking the explanation.
Check your explanation
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…
Turn this concept into a clear answer.
Practice this conceptKeep connecting the ideas.
Next lesson: Authentication, authorization, least privilege, and tenant isolationAdapted from 13_AI.MD · “Data leakage, PII, sensitive data, and secrets”. Examples are study fragments; framework behavior can depend on your version.