INDIA-BASED · INTERNATIONAL DELIVERYsupport@maukaz.com
MAUKAZ — Your Technology Partner
Insights/Knowledge & RAG
EXPANDED GUIDE · Knowledge & RAG

Keeping document permissions in a retrieval system

Retrieval must respect the user's authorization before content reaches the model. Filtering an already-generated answer is too late to prevent disclosure.

Enforce authorization before content reaches the model

Treat document access as a server-side control, not a prompt instruction. Resolve the user's identity and permissions before selecting eligible material. Apply restrictions throughout retrieval, caching and source delivery. A final-answer filter cannot undo exposure if restricted content has already been sent to an unauthorized processing path.

Worked example

Illustrative scenario; not a claim of measured client results.

Imagine two departments with different contract access. A user in one department should not retrieve the other's documents even when the titles are similar. Test with users representing both permission sets and with a user whose access was recently removed. Also check cached answers and citations, since those can retain information after the original retrieval step.

Checks, limitations and next decisions

If a permission test fails, stop the affected workflow and inspect the authorization path. Do not merely ask the model to avoid mentioning the restricted passage. Keep access metadata synchronized with the source system and define how revocation propagates. Test both allowed and denied cases after integration changes so a broader retrieval configuration does not silently weaken the boundary.

A practical starting point

Work through these checks in order. Use the results to decide what needs to change in your own workflow.

  1. Carry document access rules into the retrieval layer.
  2. Derive user identity and permissions from trusted systems.
  3. Test users with different roles against the same question.

A mistake to avoid

Do not trust a prompt telling the assistant to keep restricted information secret as the only control.

How to check progress

Test for unauthorized retrieval, including through summaries and indirect questions.

Your action checklist

Use this checklist while reviewing your own setup. Checkmarks are temporary and stay in this open page.

For the wider decision process, read When retrieval is the right addition to an AI assistant.

Further reading

Official background resources for this topic. The workflow above is general guidance, not a guarantee of a particular result.

AI-assisted editorial content. Examples are illustrative, not client case studies. Read our editorial policy or report a correction.