An AI search interface can reveal a restricted document without ever showing the original file. A generated answer, cached response, or conversation summary may contain the same sensitive information. Blocking the source link after generation is too late.
Design access around the data path before adding the assistant. Identify the user's current authority, approved sources, retrieval filters, tools, storage, and diagnostic systems. Security needs enforcement outside the model, with tests that attempt to cross the actual boundaries.
Map where sensitive information can travel
List source systems, extraction services, indexes, model providers, conversation storage, caches, logs, and exports. Record what each receives and why. A connector's technical ability to read a file does not establish that every user of the assistant should receive its contents.
Review provider handling and organizational requirements with the appropriate owners. Avoid making universal legal or data-residency assurances from a generic architecture diagram. The exact configuration, contract, region, and data category matter, and may require qualified review before deployment.
Enforce access before restricted evidence is retrieved
Apply the current user's authorized scope to source selection and retrieval. Use a trustworthy identity and policy boundary rather than role claims supplied by a browser prompt. The answer generator should not receive passages that the user is not allowed to access.
Keep equivalent controls on source links, attachments, and follow-up tools. A user may have permission to read a summary but not export a full record, or may belong to more than one organization. Define those distinctions explicitly and keep the active context clear.
| Boundary | Required question | Failure scenario |
|---|---|---|
| Retrieval | Is the current user allowed to receive this passage? | A prompt asks for another organization's records |
| Cache | Does reuse preserve access and freshness? | One user's answer is returned to a different role |
| Conversation | What persists after access changes? | Old context reveals a newly restricted record |
| Diagnostics | Who can inspect stored contents? | Sensitive passages are copied into broad-access logs |
Separate document content from tool authority
Treat user messages and retrieved documents as untrusted data. They may contain instructions that attempt to change the assistant's behavior. A document should not be able to authorize an export, expand permissions, or cause a tool to contact an arbitrary destination.
Keep tool inputs constrained and validate the actual operation through service-side controls. Grant only the capabilities needed for the supported task. Human review may be necessary for consequential actions, but it does not replace a correct authorization boundary.

Test roles, account changes, and lifecycle events
Use controlled records for several roles and organizations. Test direct questions, indirect summaries, citations, follow-up questions, and export paths. Include a user whose access changes during a conversation and someone switching organization context.
Check deletion, retention, and correction behavior for indexed and cached content. A source permission change may not automatically update every derived store unless the design handles it. Document propagation and failure behavior rather than assuming immediate consistency.
Operate with accountable review and incident handling
Assign ownership for source access, application policy, provider configuration, and incidents. Keep safe references and relevant version information for investigations without retaining unnecessary sensitive content. Make a route for reporting suspected disclosure available to users.
Re-run boundary tests after connector, policy, model, or storage changes. Review the actual data path as the product grows. A secure knowledge assistant is not a prompt that promises confidentiality; it is an enforced and maintained system of access, authority, and lifecycle controls.
Frequently asked questions
Can a prompt telling the model not to reveal secrets enforce access?
No. The application and services must enforce access before restricted content reaches the response process, with equivalent controls for tools and stored outputs.
Is blocking the original document link enough?
No. An answer, summary, cache, or conversation can disclose the same information. Review the entire data path.
Sources and further reading
- OWASP: Excessive Agency (opens in a new tab)
Primary guidance on limiting tool capabilities and authority in AI systems.
- NIST: AI Risk Management Framework (opens in a new tab)
A framework for evaluating context, oversight, and risks across the system lifecycle.
Make the next step concrete
Discuss your current process, constraints, and intended outcome with GhairMulki. We can help define a focused first release and the checks needed to evaluate it.
Discuss your project




