Practiced one out loud? Paste your answer into the free self-check and get a score in 30 seconds
What the interviewer is testing
Whether you treat permissions as a retrieval-layer control rather than a prompt instruction, and whether you think about sync, caching and testing.
Answer framework
- Attach permission metadata to every chunk at ingestion: tenant, groups, document ACL, sensitivity.
- Filter inside the retrieval query, using the caller's identity, before anything reaches the model.
- Never rely on the prompt to hide documents the user should not see.
- Keep ACLs in sync with source systems, including revocations, and scope caches by permission.
- Test with users who should and should not see each document, and log what was retrieved.
Sample answer
The rule I follow is that the model should only ever see text the user is allowed to read. So access control belongs in retrieval, not in the prompt. At ingestion I copy the source system's permissions onto each chunk: tenant ID, allowed users or groups, and a sensitivity label.
At query time the application resolves the user's identity and groups and passes them as a filter inside the vector or keyword search, so forbidden chunks are never candidates. Post-filtering after retrieval is weaker, because it can return too few results, and asking the model not to reveal certain documents is not a control at all, since prompt injection or a clever question can extract them.
The hard part is keeping permissions current. When someone loses access to a folder in the source system, the index has to reflect that quickly, so I sync ACL changes separately from content changes. Any cache of answers or retrieved chunks must be keyed by user or permission set. Finally I test with pairs of users, one who should see a document and one who should not, and I log retrieved chunk IDs for audits.
Likely follow-ups
Common mistakes
- Relying on the system prompt to hide documents.
- Ignoring revocations and stale ACLs.
- Sharing a response cache across users with different permissions.
- Testing only with an admin account.
The 0 to 1 AI Engineer Interview Playbook covers the answer frameworks, system-design walkthroughs and an 8-week plan.
Get the playbook 40% off with code EARLYBF until Nov 3, 11:59 PM PTEARLYBF: 40% off until Nov 3Smaller start: Score your answers against 50 rubrics, $9. 50 AI engineer questions, one rubric each, PDF on Gumroad.
Interviewing for PM or TPM? See the full PM package, $59 on Gumroad: a resume system, a PM, TPM and PGM interview handbook, a 1:1 cheat sheet and a PM playbook. PM and TPM content, not AI engineer prep.
Related questions
Based on question #38 in the full question bank.