How to separate public and private sources in an AI support assistant

Classify sources before indexing so public answers draw from public material and signed-in users only retrieve private data they are allowed to see.

Example

A pricing article can appear in a public response. A renewal case note may only be retrieved when the authenticated workspace and case permissions match.

What to do

  1. Identify the datasets that are public, account-specific or restricted to staff. Store the visibility classification on every indexed chunk.
  2. Apply the authenticated customer's scope to retrieval and filter the results again before generating the reply.
  3. Ask the same fictional question anonymously and as two accounts. Check that citations and quoted details match the intended scope.

How to verify

The public answer cites only public material and one fictional account cannot retrieve the other account's private note.

Limits

A model prompt describing visibility does not implement access control. Validate authorization in both storage and retrieval.

Spendplane for this workflow

Open the API gateway quickstart

Related reading