Define what counts as a violation

Document-based AI search, or RAG, finds relevant passages and sends them to a language model. When several organizations share a system, each user’s access needs checking. Even an ordinary question about equipment quantities can reveal a leak: no specially crafted attack instruction is necessary.

Microsoft’s secure RAG guidance recommends applying organization and user permissions on every retrieval, before sending evidence to the model. Check both the answer and the prepared context. A restricted number missing from the answer does not prove it was absent from the request.

The practical outcome of this proposed method is an access matrix and a test record. Decide beforehand what is protected: content, document titles, links, or a file’s very existence. Otherwise, one reviewer might accept an answer while another identifies a leaked confidential title.

Connect permissions to a verified account

Microsoft’s guidance for multitenant agents states that prompts and model behavior cannot enforce isolation. The user’s organization must come from trusted application state. Writing “I manage another company” in a question must not change the search scope, even if the model believes the claim.

Prepare a record for each document: identifier, organization, permitted groups, and access policy version. If documents are split into chunks, include their parent document connection. Then verify that an access decision can be traced for every chunk, including passages originating from appendices and tables.

Azure AI Search documentation describes filtering results using stored user or group identifiers. This filter compares strings; it does not authenticate someone by itself. In your design, identify separately what establishes the user, what determines their groups, and where results are restricted.

Prepare a small illustrative dataset

Illustrative example: organizations North and South use an exhibition display case rental application. Create three test accounts: North employee Anna, North manager Boris, and South employee Vera. Agree on the access matrix before testing so that expected results do not depend on the model’s answer.

Prepare four fictional documents. A shared policy says collections happen on Wednesdays. North’s employee document lists 17 display cases; South’s lists 29. A separate document for North’s managers contains the illustrative approval code AMBER-63. Every value is invented; this dataset requires no real confidential materials.

Anna can access the shared policy and North’s employee document; Boris can additionally access its management document. Vera can access the shared policy and South’s employee document. Asked about quantities, Anna and Boris should receive 17, Vera 29. Only Boris can access the code; restricted titles are also protected here.

Check the path from search to answer

For every attempt, record the account, question, expected accessible documents, actual user-facing search results, context immediately before model submission, and returned links. Use document and chunk identifiers. In the illustrative environment, this exposes access failures even when the final answer looks harmless.

Start with the same question for all three users. Rephrase it, then request a comparison between organizations. Separately test an unverified account and a document missing permission information. Under the proposed rule, exclude that document until permissions are established, and do not run protected searches without an identified user.

Count violations separately at each observable stage: restricted chunks in search results, restricted chunks in model context, and restricted information in answers or links. One leak can affect several stages. If context cannot be inspected, mark that stage unverified; an acceptable answer cannot replace missing evidence.

Check caches, sources, and access withdrawal

If the application caches completed answers, request the code as Boris, then repeat the question as Anna and Vera. This tests delivery of a previously prepared answer containing restricted information. Matching organizations is insufficient authorization: Anna and Boris share an organization but have different permissions.

Check source links separately from answer text. Copy a link from Boris’s authorized answer and try opening it as Anna. Under the example’s rules, its contents must remain inaccessible. Repeat for previews and downloads if your application provides those ways of obtaining documents.

Next, remove Boris’s management role and repeat requests after the system’s defined change propagation period. Specify that period beforehand. Check a new conversation and continuation of the old one, including saved context. Previously disclosed information cannot become unknown; this checks that new delivery and reuse of restricted data stop.

Record acceptance rules and limitations

For this dataset, an acceptance rule can require zero disclosures of protected information to unauthorized users at the stages inspected. All authorized control questions must also retain useful answers. A system that blocks every search fails the functionality check. Record access compliance and usefulness separately.

If your application uses SeaGenera’s text API, assemble authorized context within your application. SeaGenera’s documentation states that the application executes client functions itself. Tool support does not establish ready-made access controls for your document collection: those depend on your implementation and connected storage.

This dataset is an independently proposed test protocol, not a published test result. It covers selected roles, documents, and retrieval paths. It does not prove the absence of leaks involving other groups, configurations, or indirect deductions from permitted information. Repeat relevant scenarios after changes to search, caching, or access policies.

Sources