How would you prevent cross-customer document leakage in RAG?
Understand the idea, explain it in your own words and use the rubric to find your next learning gap.
The idea behind the question
Authorization must constrain retrieval and every downstream store or cache. A prompt that asks a model to respect tenancy is not an access-control system.
A support user must never retrieve another company's internal contract even if it is the closest semantic match.
A practical way to learn it
Draw data boundaries for two tenants and write five cross-tenant requests that must fail.
Open online notepadThe related tool opens separately; your interview answer stays here. Written practice is self-guided, without automatic code grading.
Build an explanation you understand
- State what the concept does in plain language.
- Apply it to the example and make your assumptions explicit.
- Explain a trade-off, failure case and how you would test it.
- Distinguish your actual experience from a proposed approach.
How would you explain it?
Single-question timers reset on refresh. Full mock sessions can resume from this browser.
Strengthen your explanation
Compare reasoning, not identical wording. Reference answers describe a possible approach; replace hypothetical statements with truthful details from your own work.
One way to answer
I would establish identity and tenant membership before retrieval, apply server-enforced filters and verify document permissions again before returning evidence. I would isolate caches, conversation state and indexes according to the risk model, and test malicious identifiers and stale memberships. Citations and logs can leak data too, so I would minimize them and enforce access on source downloads. I would evaluate cross-tenant negative tests as release blockers. The model would receive only authorized content; it would not decide which tenant the user may access.
What a strong explanation should cover
Tick only the points your own answer addresses. This is self-assessment, not AI scoring.
0 / 3 points self-reportedWatch out for
- Relying on a tenant name in the prompt.
Now go one level deeper
- How would you revoke access after a role change?
- What could a shared response cache leak?
Further reading
Further-reading links support learning; the reference is Sukoaa-authored, not an official employer answer key.