RAG with Permissions: A Visual Field Guide
Follow the badge, the folder labels, and the briefing packet.

Maya works in Support. Arun works in Engineering. Both ask why the Orion launch is delayed. They should receive answers built from the evidence each may read.
This is Part 9 of the RAG series, expanded into six focused lessons. At the records desk of Sachin, a fictional company, we follow one question from an employee badge to a permission check, a packet of evidence, and an answer with protected sources.
Start with the illustrated story. Change an input, predict the result, inspect the mechanism, then run the same example yourself.
Same question. Different permissions.
Predict how an employee’s identity changes a RAG answer, inspect the permission decision, and run the same policy yourself.
Read, explore, and build →A document’s permissions must travel with it.
Follow a restricted folder through the copy room. Preserve its permissions on every chunk and reject missing labels.
Read, explore, and build →Find the best evidence this person may read.
Move a retrieval cutoff and see why removing denied results can leave a short answer packet. Measure recall against an allowed baseline.
Read, explore, and build →Access was revoked. What happens now?
Step through a permission change at the source, a stale index, and an old cached answer. Learn where current checks belong.
Read, explore, and build →Protect the whole answer, including its sources.
Inspect four places information can escape an otherwise filtered answer: citations, previews, shared answers, and diagnostics.
Read, explore, and build →Build it. Then try to break it.
Run a local permission-aware answer service. Test forged group claims, tenant isolation, revoked access, stale caches, and source requests.
Read, explore, and build →Each download runs with Node.js 20 or newer, without packages or API keys. People, documents, scores, and session tokens are fictional. Answers are assembled from fixed facts. The last article includes a small local HTTP server; it does not supply production login, a vector database, or a live language model.
Continue the broader series with Part 10: Citations Are Not Evidence.
For the wider retrieval-augmented generation picture, see the RAG landscape. For measuring a system’s behavior, continue with RAG evaluation.