Skip to main content
Skip to content
DN Research

A retrieval filter needs an authorised-answer test

A fixed-ranking example shows how authorization filtering can change both exposure and recall, while keeping identity verification separate from retrieval quality.

A reader opens an authorised archive gate while a searchlight also illuminates locked shelves. Editorial illustration.
Reading options: audio, text size & sections

Research scope: Documentary analysis with a hypothetical worked example. Sources reviewed 5 December 2026; this is a planning and interpretation guide, not a report of 2027 observations.

A retrieval system should return evidence the user is allowed to see, but adding a permission filter does not by itself explain the quality of the remaining results. If a search first selects a small global candidate set and then removes unauthorized documents, useful authorized evidence can remain outside that set.

That produces two distinct questions. Did any unauthorized material reach the answer pipeline? And did the search recover the relevant material that this user was entitled to retrieve? A result can pass the first question while giving an unnecessarily incomplete answer to the second.

This article supplies a fixed-ranking example to separate the two. It does not audit a live retrieval service or certify an access-control design. DN's data-residency guide addresses where processing occurs; this piece addresses which documents may participate and how that boundary changes retrieval evaluation.

What documented filters do

Azure AI Search describes security trimming using indexed user or group permission fields and query filters. Its vector-filter documentation also distinguishes stages at which filters can be applied, explaining why postfiltering a bounded candidate set can omit qualifying results. These are implementation-specific capabilities, not a guarantee that every filter setting has identical recall or cost. [1][2]

Amazon Kendra's user-context documentation makes an additional boundary explicit: filtering by supplied identity is not itself authentication of the caller. The application must establish the appropriate identity and authorization context. A string that names a group is not proof that the requester belongs to it. [3]

These sources support a practical test design. Preserve the trusted principal, the document eligibility rule, the candidate-selection stage and the final evidence returned. Do not let a good answer score stand in for those permission records.

Build the permitted denominator first

Assume one fictional reader and ten invented documents. Four documents are both authorized for that reader and relevant to the task: D2, D6, D7 and D9. Other documents can be relevant but unauthorized, or authorized but irrelevant.

For the calculation, relevance is an authored label and the ranking is fixed. The scores simply order the toy documents; they are not measurements from an embedding model or a claim that a real approximate search would return this exact sequence.

Synthetic rank Document Authorized Relevant
1 D1 No Yes
2 D2 Yes Yes
3 D3 No Yes
4 D4 Yes No
5 D5 No Yes
6 D6 Yes Yes
7 D7 Yes Yes
8 D8 Yes No
9 D9 Yes Yes
10 D10 No Yes

Authorized recall uses four as its denominator: the relevant documents this reader may retrieve. Counting all eight relevant documents instead would ask a different question and could reward a system for recovering material it should not disclose.

Compare three candidate paths

An unfiltered top-five selection contains D1 through D5. Three of those documents are unauthorized. Sending that set to a generator would cross the assumed document boundary even if a later answer happened not to quote the restricted text.

Filtering the same top-five set after selection leaves D2 and D4. Only D2 is relevant, so authorized recall is one divided by four, or 25%. The final set contains no unauthorized documents, but the candidate cut has removed the opportunity to retrieve D6, D7 or D9.

Selecting the top five eligible documents instead gives D2, D4, D6, D7 and D8 in this fixed ordering. Three are relevant, so authorized recall is 75%. D9 is authorized and relevant but ranks sixth among eligible documents and is still outside the five-result budget.

The improvement is fifty percentage points, or three times the original recall. It is not a measured provider advantage. The example demonstrates the consequence of candidate ordering and filtering under a declared exact ranking; actual approximate implementations require their own matched tests. [2]

Keep content out of the wrong stage

The security boundary needs to apply before restricted content enters components that are not permitted to receive it. Depending on the design, that includes a generator, a reranker, logs, caches or an external tool. A final-output filter cannot retroactively remove an earlier disclosure to another component.

Preserve document and chunk permissions through ingestion and updates. If a document becomes unavailable to a user, investigate derived chunks, cached results and stored citations under the declared retention and access policy. This is a proposed review procedure, not a claim that the cited services automatically fail or succeed at it.

An unknown access label should remain unresolved. Treating a missing field as public because the document is useful substitutes a content judgment for a permission decision. The eligibility policy needs an explicit owner and behavior for missing or stale metadata.

Test relevance within each access context

A useful authorized trial uses synthetic tenants or permitted fixtures with deliberately overlapping vocabulary and different access sets. Freeze the corpus, labels, query, ranking configuration and result budget. Record both unauthorized returned items and authorized recall; keep them separate rather than averaging them into one score.

Evaluate more than one user context. A global recall score can hide a small eligible population for which postfiltering returns very little. Likewise, a larger candidate pool might recover more eligible evidence while adding cost or latency. Measure those effects rather than assuming that a parameter increase is free.

Identity evidence is a separate gate throughout the trial. Kendra's documented distinction is useful here: a correct filter applied to an untrusted user or group assertion does not establish the caller's entitlement. Record how the application obtained and validated the context it supplied. [3]

The procurement question becomes specific

Ask a supplier where authorization is evaluated, how eligible documents enter candidate selection, and how a permission change affects chunks and caches. Request an exportable example tied to a known principal and corpus. A statement that the product supports filters does not answer those operational questions.

The downloadable ten-row ledger reproduces the three paths without executing any search or touching private data. Its contribution is a clean denominator: quality is measured over relevant evidence the reader is permitted to use, and access remains an independent condition. That makes a retrieval comparison more useful without presenting a synthetic table as a security certification.

Use the worked example

Authored exact ranking and permission/relevance labels for one fictional principal. Scores are ordering placeholders, not observed retrieval outputs; all three candidate paths use this same ledger.

To check the arithmetic and CSV/JSON agreement locally, save both files beside the Python verification script and run python3 verify.py q25.json. Python 3 is required; no third-party packages are needed. The check does not verify source claims or provider performance.

These are downloadable research records. They do not connect to an account, execute a trade or provide live market data.

Frequently asked questions

Does postfiltering always leak unauthorized documents?

No. The example’s final postfiltered set is authorized, but its recall is lower because eligible documents outside the candidate cut cannot return.

Does this table prove one service has better recall?

No. It is an exact synthetic ranking. Actual approximate search, configuration, latency and cost require matched measurement.

Does supplying a user or group string authenticate the caller?

No. The application must establish the trusted identity and its authorization context; a filter alone cannot prove membership.

Continue the research

Optional research services and tools

The free example above can be used without buying a product. For a defined team question, the DN Research Desk offers separately agreed documentary briefs, source registers and worked examples. Scope, fee, delivery date and usage terms are agreed before work begins; an enquiry creates no payment obligation.

Commercial disclosure: DN’s own service and any referral relationship are separate from the research method. No provider paid for a favourable finding in this article.

Sources and review scope

Sources reviewed on 5 December 2026. Review dates are distinct from each source’s observation, publication and effective dates.

  1. Azure AI Search: Security filters for trimming results. Security trimming can filter results through indexed user/group permission fields. Evidence: Provider documentation.
  2. Azure AI Search: Vector query filters. Filter placement changes returned candidates; postfiltering can omit qualifying documents from a bounded candidate set. Evidence: Provider documentation.
  3. Amazon Kendra: User context filtering. User/group access filtering does not authenticate the caller; the application remains responsible for supplied identity and authorization. Evidence: Provider documentation.

Corrections and limitations

To flag a possible error, use the DN contact route with this article’s URL, the disputed claim and the supporting source. The analysis is educational, not personalised investment, legal or tax advice. Documentation and synthetic examples do not establish realised returns or individual eligibility.

The DN briefing: what changed and why it matters

Follow documented changes in AI, crypto and financial technology, with practical analysis and source context. Unsubscribe anytime.