An empty retrieval response is an outcome that needs a cause. Check whether search completed successfully, whether the expected revision was indexed, and whether an eligible matching passage survived the search and assembly stages. Use approved diagnostic counters in an isolated synthetic fixture. Preserve the reader’s normal authorization in every product probe.
Imagine a synthetic Mariner Depot handbook assistant. A test reader asks how to book a weekend loading bay. The assistant returns no source. A zero could be correct for that reader, a stale index could have missed the new bay schedule, or the search request could have failed before any search happened. These cases require different repairs.
Use a fixture with two known outcomes
Create a shared handbook entry containing a test phrase and a restricted schedule with a different phrase. Give one test identity access only to the shared entry and a second test identity access to both. Add one phrase known to be absent from the corpus. Save the committed index revision, source revision and expected authorization decisions. Start by checking that the currently shared phrase reaches both identities through the normal query route.
In the fixture, use trusted server observations to count synthetic matched candidates at the instrumented search boundary and eligible candidates at the policy boundary. Use the same candidate definition, filters, query and revision for any compared count. A prefiltered approximate search may never materialize a raw candidate set. Measure eligibility from the fixture's authorized expected-state records, and record the raw count as unavailable for that run. Search systems can apply matching and filtering at different stages. Use the engine's documented execution model before interpreting telemetry. Elasticsearch query and filter context
Reset the fixture between rows. Restore the indexed schedule before the permission check and change only the condition stated for each probe.
| Synthetic probe | At the recorded boundaries | Interpretation |
|---|---|---|
| Shared handbook for either identity | Search succeeded, one eligible match delivered | Positive route control |
| Restricted schedule for shared-only identity | One synthetic matched candidate, zero eligible | Expected policy exclusion |
| Same schedule for its entitled identity | Search succeeded, expected revision absent, zero eligible matches | Inspect ingestion state and active index target |
| Known absent phrase for either identity | Search completed, zero matched candidates, positive control works | Expected empty result |
| Shared handbook times out | Search failed, no reliable candidate count | Dependency failure, outcome inconclusive |
Read the stage where the outcome changed
Compare the expected source revision with the active index watermark or recorded document version. If the expected revision appears and the eligible count is zero, inspect benign differences such as analyzer terminology, search field, search parameters and configured thresholds using the authorized test identity. If an eligible match is present but nothing reaches the model, examine the context assembly stage. Separate a valid empty search, a failed search, and a context that was emptied after search. A successful HTTP response alone does not establish which one occurred inside your product.
Keep production telemetry access-controlled. Exposing the count, name, or existence of matching restricted documents can itself reveal information. The reader can receive a neutral message that the assistant could not find accessible evidence. Route a dependency error through the service's failure state so the operator can distinguish it from successful empty search. If the result is supposed to verify withdrawal instead, test the separate restoration and cache failure modes described in the site's document removal drill. Verify RAG document removal
Treat access filtering and search errors as different operator outcomes. The ordinary reader can receive the same neutral wording for an authorized search with no evidence, while an operation failure should carry a separately recorded error state.
Begin with the shared positive probe and one expected empty probe. Require distinct recorded outcomes for both before using the fixture to assign a zero-result incident to a team.
sinc-LLM