Retrieval-augmented generation is now the default pattern for grounding language models in organizational knowledge. The pattern is simple: index documents, retrieve the most relevant passages for a query, and provide them to the model as context. The difficulty is everything the simple version leaves out.
The flattening problem
Source systems — document stores, wikis, ticketing tools, file shares — each have their own permission models. A naive indexing pipeline copies content into a single vector store and discards those permissions. Every user of the resulting system can now, in principle, retrieve anything that was indexed.
This is rarely intentional. It is the default outcome of treating retrieval as a search-relevance problem rather than a security problem.
Principles we apply
- Permissions are captured at index time and stored alongside every chunk.
- Retrieval filters by the requesting principal before ranking, not after generation.
- Agents act with the permissions of the user they serve, never a broader service identity, unless explicitly configured and audited.
- Permission changes in source systems propagate on a defined schedule, and that schedule is visible to administrators.
- Every retrieved source is recorded in the audit trail for the run.
Citations as a control
Requiring a citation for every substantive claim is often framed as a quality feature. It is also a governance control. A reviewer can see exactly which sources informed an output, and an auditor can reconstruct what the system had access to at the time.
Freshness is part of correctness
Policy documents are superseded. Procedures are revised. A knowledge layer that returns the 2023 version of a policy with confidence is wrong in a way that is hard to detect. Indexes should track document versions and lifecycle state, and retrieval should prefer current, authoritative sources.