Document-Level Security in RAG Must Filter Before Retrieval
Document-level security in RAG belongs in the retrieval query, before chunks enter an LLM prompt. Index each document with tenant and access metadata, derive the caller identity from a trusted source, apply the filter server-side, preserve source permissions during updates, and record the retrieved document IDs for each model request.