Design a document assistant for 20,000 employees where people must only see answers from documents they are allowed to access.
Think first
Permissions at retrieval time, synced from the source, never left to the prompt.
Strong answer
Index documents with their access-control lists from the source systems (SharePoint, Confluence, Drive), mapped to identity-provider groups. At query time, resolve the user's groups from their SSO token and filter retrieval to documents they can read before anything reaches the model. Never rely on the prompt to hide content. Keep ACLs in sync with change feeds plus a periodic full reconciliation, and define what happens during the gap. Log which documents were retrieved for each answer for audit. Test with users from different groups and a red-team set of queries that try to surface restricted content. Mention scale: per-user filtered vector search needs metadata filtering support or pre-partitioned indexes.
Weak-answer indicators
- Filters after generation
- Puts permissions in the system prompt
- Ignores ACL sync lag
Likely follow-up questions
- Someone loses access to a folder. How quickly does the assistant stop using it?