Picture a document assistant built on RAG (retrieval-augmented generation) and sold to many companies. Each customer company, or tenant, uploads its policies, contracts, and HR files into one shared search index, and its employees ask questions in plain English. Data leakage is what happens when one of those answers carries private data to someone who should not see it: an Acme employee reading Acme's salary folder, or a Globex user reading Acme's contracts. Access control is the code that decides, from the caller's permissions, which text is allowed into the model's context at all.
The basic principle: anything placed in the model's context window can come back out in a reply, so the only safe control is a check in application code that keeps forbidden data out of the context in the first place.
Private data has five ways out of an LLM feature: what retrieval pulls in, what the prompt carries, what logs and traces keep, what the model provider retains, and what a fine-tuned model memorized. You need this work whenever several customers or permission groups share a store, prompts or logs carry personal data, or customer data goes to a hosted model. A single-user assistant over that user's own files needs no retrieval-time filter, since per-user storage isolation covers it, though the log and provider paths still apply.
"How do you make sure no user ever sees data they shouldn't?" is the most common opening prompt in enterprise AI security rounds. A mid-level answer filters retrieval by tenant and keeps secrets out of the system prompt. A senior answer also handles stale folder permissions, rejects output filtering as access control, sets log retention and provider terms, and knows why trained weights cannot be filtered per user. The data-flow drawing these paths sit on lives in Threat Modeling LLM Applications.