You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Filtering happens in the query, not after ranking — otherwise top-k is computed over documents the user cannot see and returns fewer results than it should.
Reuse doc_visible() / doc_grants rather than reimplementing visibility.
Acceptance
Two users with different grants issue the same query and receive different results.
A user with no grants receives nothing.
Tests cover the filter-before-rank behaviour, not just the final result set.
Sub-issue of the RAG retrieval epic (#125).
Why
The LLM is not a trust boundary. A user must never retrieve a chunk from a document they cannot read, regardless of how the question is phrased.
Scope
doc_visible()/doc_grantsrather than reimplementing visibility.Acceptance