Skip to content
Sans Studio
All insights
7 min read

Security7 min

Retrieval that respects who is asking

A knowledge assistant that can read every file in the company will eventually tell someone something they should not know. Permissions have to live inside retrieval.

The first version of almost every internal knowledge assistant indexes a shared drive and answers questions from it. It demos well. Then someone in operations asks about bonuses and gets a paragraph from a board memo, and the project is shut down by lunchtime.

The mistake is treating permissions as a filter on the answer. By the time a model has read a document, the information is in its context and can leak through paraphrase, summary or a well-phrased follow-up question. Access control has to happen before retrieval, not after generation.

01

Acts alone

reversible, cheap

  • Read calendar
  • Draft reply
  • Tag ticket

02

Acts, can undo

reversible, visible

  • Send message
  • Book slot
  • Update CRM

03

Gate

Waits for a person

irreversible

  • Issue refund
  • Cancel contract
  • Change record
fig. 01Every tool an agent holds, sorted before a line of code is written.

We carry the source system's permissions into the index. Every chunk is stored with the groups and users allowed to read the original file, synced from the drive, wiki or mailbox it came from. At query time, the search runs with the asking user's identity, and chunks they cannot open are never candidates.

Sync lag is the part people underestimate. If someone is removed from a folder, the index has to reflect that within minutes, not at the next nightly job. We subscribe to permission change events where the source supports them and run short reconciliation cycles where it does not.

Citations are the second safeguard. Every answer links to the passages it used, and each link opens the original document through the source system, which checks access again. If a citation would fail to open for the user, the answer should never have included it, and our tests assert exactly that.

Finally, we test with adversarial users. Eval suites include accounts with deliberately narrow access asking questions whose answers exist only in restricted files. A pass means the assistant says it cannot find the information, not that it finds a creative way around the rule.

Next note, OperationsThe morning brief is the product
30 minutes, no deck

Want this working in your operation?

All insights