On this page
The short answer
Test metadata filters against an explicit set of eligible document IDs for each query. Verify both that excluded documents stay out and that eligible evidence remains retrievable before assessing answer quality.
What to take away
- Label eligibility before relevance.
- Include missing and malformed metadata.
- Check both exclusion and recall.
Sources checked . Research synthesis and Rubrex recommendations. Examples and local experiments are labeled; they are not client results.
Separate eligibility from semantic similarity
Qdrant documents filter conditions for restricting search results. Your application still owns the meaning of fields such as tenant, effective date, and publication status. Write an eligibility rule independently of the retriever: for example, a customer may search only published documents belonging to its organization. A semantically perfect draft is ineligible. A published but irrelevant document is eligible yet insufficient. Combining these two labels into one relevance score makes permission and quality failures harder to distinguish.
Evidence: Filtering [1]
Create a small truth table
Author six fictional policy records: two tenants, one unpublished draft, an expired rule, a current rule, and one record missing its tenant field. For a tenant-A question, list the exact allowed IDs and the evidence expected among them. Test an ordinary date, the instant a rule becomes effective, and a query with a malformed filter value. The proposed gate rejects cross-tenant or unpublished evidence and requires a documented handling rule for missing fields.
Inspect every retrieval stage
Record the final filter expression, authenticated scope, candidate IDs, and context IDs. Check whether filtering occurs before or after candidate selection and test the configured behavior rather than assuming both approaches are equivalent. When a result is empty, compare it with the eligible set: the correct explanation may be that no eligible evidence exists, not that vector retrieval failed. Also test that reranking or parent-document expansion cannot reintroduce records removed by the eligibility rule.
Review false exclusions as product failures
A filter that blocks everything can pass a simplistic no-leakage test while making the assistant unusable. Score the number of prohibited records returned and the number of answerable eligible cases that lose their supporting evidence. Investigate missing metadata, type mismatches, and timezone interpretation separately. Before deploying a schema change, replay the truth table through the whole application path. Preserve the eligibility decision and source metadata with each failure so the owner can repair the correct boundary.
Test field changes and mixed revisions
Replay the truth table after a document changes tenant, publication status, or effective date. Confirm that stale metadata cannot survive in an older chunk, parent record, reranking cache, or retrieved-context cache. Use one record that moves from allowed to denied and another that becomes newly eligible. The first detects lingering access; the second detects unnecessary exclusion. Record when the source change becomes effective and when each searchable representation reflects it. This makes a delayed update visible instead of misclassifying the result as a random retrieval failure. Exercise nested filters and mixed field types with known eligible IDs, because logically similar expressions can behave differently when metadata is malformed.
Limits of the evidence
This is a metadata test method using fictional records. It does not certify authorization security or replace a complete access-control assessment of your application.
Common questions
Can relevance labels encode access rules?
Keep separate labels. Eligibility is a prerequisite; relevance describes whether allowed evidence answers the question.
What should missing tenant metadata do?
Define and test an explicit rule. Do not let missing fields silently inherit a permissive default.
Sources & further reading
Primary sources behind this briefing. A source’s findings apply to its own study conditions; publication on arXiv does not establish peer review.
- Filtering Qdrant · Living reference · Maintained documentationReviewed: filter condition mechanisms; application eligibility examples are original. Accessed October 16, 2026.
Questions or corrections? Write to Rubrex. Read our editorial approach.