Permissions enforced at retrieval
The most serious failure an enterprise assistant can produce is showing somebody a document they were not entitled to see. It happens easily. A single index is built over a shared drive, the drive contains folders with restricted access, and the index has no notion of who may read what. Instructing the model not to reveal restricted content is not a control. It is a request, and it fails against a determined question or an unusual phrasing.
The workable design attaches access metadata to every chunk at ingestion and filters at query time using the identity of the person asking. The user's session carries their group memberships from the directory, the search is constrained to what they may read, and the model only ever sees permitted material. Permission changes have to propagate, so a revocation is reflected in the index rather than waiting for a weekly rebuild, and deleted documents are removed rather than merely hidden.
Testing this deserves the same adversarial approach we apply to portals. A restricted account asks questions designed to surface material it should not see, including indirect ones asking for a summary rather than a document. That test belongs in the regression suite, because a later change to the ingestion pipeline can reintroduce the flaw silently. We also treat ingested content as untrusted, since instructions hidden inside a document are a recognised injection route.
- Access metadata attached to each chunk at ingestion, derived from the source system
- Retrieval filtered by the asking user's own entitlements before the model sees anything
- Permission changes and deletions propagated to the index rather than waiting on a rebuild
- Adversarial tests from a restricted account kept in the regression suite
- Ingested content treated as untrusted, given that documents can carry injected instructions