A company knowledge assistant should not reveal a private document simply because the integration account can read it. Employees must receive answers within their own access boundaries, including the sources and snippets that support those answers.
This is a retrieval-permission problem. A sentence in the prompt saying “respect permissions” is not an access-control system.
Where should document access be enforced?
Apply the relevant authorisation checks before restricted content enters the model's context. Depending on the source system and architecture, this can involve user-scoped requests, indexed access metadata, or a combination with source-side rechecks.
The WorkOS document-permission guide describes several approaches and their trade-offs. None removes the need to define how current employee identity maps to source permissions.
Test with two users who should see different answers
Create fictional documents and users:
| User | Shared handbook | Private compensation notes |
|---|---|---|
| General employee | Allowed | Denied |
| Authorised HR reviewer | Allowed | Allowed |
Ask both users the same compensation question. The restricted user should not receive the private answer, a revealing document title, or a citation snippet that leaks the information indirectly.
Then remove the HR reviewer's access and repeat the test. This exposes stale permission caches that a first-time demonstration can miss.
Keep retrieval identity attached through the workflow
The request needs a verified user and organisation context. Do not accept a caller-supplied employee ID or browser-provided organisation value as sufficient authority.
Each search, source preview, answer cache, and citation-opening request must preserve the relevant boundary. If users share an answer cache, its key and access policy must prevent one person's permitted context from being served to another person.
Also inspect administrative tools. A debugging screen that displays raw retrieved passages can bypass protections in the customer-facing interface.
Decide how permission changes reach the index
Cached access metadata can make retrieval more practical, but it introduces freshness requirements. Define the delay you can tolerate and what happens when synchronisation fails.
A source-side recheck may reduce the stale-access risk while adding latency and dependency on the source system. A fully user-scoped source request has different operational requirements. Choose the approach for the actual sources rather than adopting a diagram without testing it.
If access cannot be established, fail closed for restricted material. Offer the user a route to the document owner instead of falling back to a broadly privileged service identity.
My Nucleus contribution provides portfolio context for knowledge integration work. The knowledge-sync article covers how edits and deletions affect the indexed copy.
Private-document questions
Is hiding a citation enough?
No. The restricted content must not reach the answer in the first place.
Can we rely entirely on a shared integration account?
Not when its access is broader than the requesting user's permissions.
What should the first acceptance test cover?
Two users, one private document, and a permission revocation. Bring that access matrix to a knowledge integration discussion.