Concept guide · RAG foundations
How do you build a permission-aware RAG system?
A slower explanation for when the short interview answer is not enough. Start with the intuition, then connect it to the technical idea and the way an interviewer expects you to reason about it.
ML area
Generative AI → Permission-aware RAG
Interview format
Advanced · Concept
Question
GENAI-058
Start with the idea
In simple terms
A permission-aware RAG system filters evidence before it reaches the model. The model should never receive a passage that the current user is not allowed to see.
Make it concrete
Two employees can ask the same semantic question but receive different evidence sets because their team and document permissions differ.
Build the answer
How to reason about it
- 1Treat authorisation as a hard retrieval constraint, not a prompt instruction.
- 2Keep permission context consistent across search, memory, cache, and citations.
- 3Prove isolation with adversarial tests and audit traces.
Go one level deeper
The technical explanation
Attach tenant, audience, role, source, and effective-access metadata to retrievable units. Enforce filters in the search layer or a trusted policy service, isolate caches and memories, and verify that citations and logs do not leak restricted identifiers. Test cross-tenant retrieval, revoked access, shared links, empty results, and filter bypasses.
Say this in the interview
Attach tenant and access metadata to every retrievable unit, enforce filters during retrieval, isolate caches and memory, and test cross-tenant and revoked-access cases. Do not rely on the model to hide unauthorised passages after they have entered its context.
Keep preparing