An employee asks the assistant what the salary band is for a senior engineer. It answers, precisely, from a planning document in a folder they have never been able to open.
Nothing malfunctioned. Retrieval did exactly what it was built to do. Embeddings do not carry access control lists, and the index had no opinion about who was asking.
A source registry, written before the index exists
Listing the sources is the easy part. The test is whether each one has a named owner.
Before anything gets embedded, every source needs a row: who owns it, what trust level it carries, how often it syncs, and whether it is authoritative or merely informative. A published policy page and a two-year-old draft in a wiki are not equal evidence, and the retriever will treat them as equal unless something tells it otherwise.
Trust level should be a field you retrieve on rather than a comment in a design doc. When two chunks contradict each other, the system needs a rule, such as authoritative over informative and then the later effective date, and "whichever scored higher" is not a rule anyone would defend in a review.
Permissions belong inside the query
The UI hides what the user should not see. The retriever does not.
Permission filters have to run inside the retrieval call as pre-filters: tenant ID, group membership, document-level ACLs applied before scoring rather than after. Post-filtering a result set is the pattern that quietly leaks, because a chunk that was retrieved and then dropped still took a top-k slot from an allowed one and shaped any fused or reranked order, and it still surfaces in any citation list somebody forgot to filter.
Pre-filtering costs something on the vector side, because under a highly selective filter an HNSW search either loses recall or falls back to a slower exact scan, depending on the engine. Test filtered queries for your smallest permission groups as well as your largest.
A useful test is whether the user can open every citation the answer gave them. If a link returns 403, retrieval already read something it should not have.
Freshness and deletion are correctness problems
Deletes are the failure that embarrasses teams in public. Someone removes a document from the source system, and it stays answerable for another six weeks because the sync job only handles creates and updates.
Three numbers deserve first-class metric status: index lag against source, deletion propagation time, and the count of indexed documents whose source no longer resolves. Lineage makes those numbers answerable. Every chunk should carry its source ID, version and ingestion timestamp, so "why did it say that" resolves in one query instead of an afternoon.
The system also needs permission to say no. When the only sources covering a question are stale beyond the freshness budget, or the user's permissions filter the candidate set down to nothing, refusing is the correct answer. Answering from whatever survived the filter is how you get a confident response built on the one document nobody thought to restrict.
Test revocation before launch
Revoke a test account's access to a folder the index already holds, then query as that account until its content stops coming back. That gap is your permission propagation time. Indexed ACLs are copies, only as current as the last sync, so put the gap on the dashboard beside deletion lag and give urgent revocations a path that does not wait for the next one.
Terms in this piece
About this explainer
- Format
- Explainer
- Level
- Practitioner
- Read
- 2 min read
- Published
- Aug 10, 2026
- Disciplines
Short mental models: one idea, why it matters, what to do about it.
More on these topics
Explainer · · 4 min read
Eventual consistency, explained by one policy change
A policy changes at 10:00 and the assistant quotes the old one at 10:05. Follow that one change through every copy of the data to see what eventual consistency means.
Decision note · · 2 min read
We chose Azure AI Search for retrieval because ingestion and filtering stay simple
Why our retrieval runs on Azure AI Search: our Databricks ingestion pipelines feed it directly, filtering is simple, and several semantic configurations share one index.
Checklist · · 12 checks
RAG production-readiness checklist
Twelve checks to pass before a retrieval system answers a real user. Tick them locally; progress stays in your browser.
Discussion