Hypothetical scenario. Northwind’s combined retrieval still misses an employee’s shorthand. Dev proposes reformulations and a generated search document. Maya recognizes useful vocabulary in the generated paragraph, but Priya asks which parts came from actual policy.
Maya: “That paragraph sounds like the policy we want to find.”
Dev: “It can guide search even though it is generated.”
Priya: “Then keep it separate from the source we would cite in an answer.”
You will compare multi-query expansion with HyDE, which embeds a generated hypothetical document to locate real material. Preserve the employee’s intent and trusted authorization scope across every search branch.
Can a better search query become an unsupported answer?
Multi-query expansion retrieves with several reformulations and fuses their candidate sets. HyDE instead generates a hypothetical document, embeds that generated text and uses its representation to retrieve real documents. Gao and colleagues' HyDE paper explicitly distinguishes the unreal generated document from the corpus evidence it helps locate.
Hypothetical scenario. Three rewrites each retrieve ten IDs. Their concatenated lists contain 30 entries, but deduplication leaves 22 unique IDs: 30 − 22 = 8 entries repeat an already-seen ID. Those repetitions are not independent corroboration. Apply the employee's authorization scope to every retrieval branch and to the final evidence. Do not quote a HyDE-generated policy as if it were an authoritative source; retain it only as a search intermediate.
The best-ranked passage belongs to another account
Northwind's shared knowledge service returns a highly relevant supplier passage to a support assistant. Priya recognizes the right terminology but notices the passage belongs to another account. Dev proposes removing unauthorized results after ranking. Sam asks whether the first-stage search, reranker and traces have already handled evidence that this request should never receive.
Design the allowed evidence view before optimizing retrieval. The authenticated caller, requested resource and current policy determine which material may participate. Relevance ranks useful evidence inside that boundary. It should not be asked to learn or infer the boundary from text similarity.
Bind generated search queries to the original authority
Hypothetical scenario. A model expands an employee question into several search queries or a hypothetical answer for embedding. These are search proposals, not new source evidence. Retain the original task identity and caller scope across every branch.
| Artifact | Concrete evidence | Decision boundary |
|---|---|---|
| Original task | caller, scope, time/applicability | Authoritative intent |
| Query proposal | transform version, branch identity | Fallible search input |
| Retrieved evidence | real source and revision | Only source-bearing support |
An expansion can introduce a different time period, tenant or requested action. Validate preserved constraints and search only the permitted universe. HyDE-style generated text can help formulate a query, but citing that text as though it came from a policy would manufacture evidence. Bound branch count and candidate work under the same end-to-end budget. Evaluate recall gain against intent drift and extra retrieval cost, including cases where no expansion is needed.
Derive access scope from an authoritative caller context
The service should resolve tenant and resource scope through trusted application state. A caller-supplied tenant identifier can be a requested target, but it must be checked against the authenticated identity. A generated query or model-proposed tool argument cannot simply select another tenant's collection.
Represent document permissions at the granularity the task requires. An entire document can share one access policy, while sections or attachments may require separate treatment. Parsing and chunking must retain that scope. If children lose their parent's access identity, the vector index can make an unavailable source appear independently readable.
Permissions can change after ingestion. Define which current authority is consulted when retrieving and using evidence, and what happens when that authority is unavailable. A copied access label in a vector payload is useful metadata, but its age and update contract must match the application's requirements.
A metadata filter is a mechanism the service must apply correctly
Qdrant's filtering documentation describes conditions over stored payload and related selection behavior. These operations can help restrict a candidate search. They do not authenticate the caller or decide which condition is authorized; the application must bind trusted policy into the request.
Keep access fields distinct from relevance hints. A product category can narrow topical search, while a tenant or access scope can be mandatory. A query rewrite may reasonably broaden a topical hint, but it must not discard a mandatory access condition because too few results were found.
Reject malformed or unsupported scope requests explicitly. Falling back to an unfiltered search when a filter fails is a change in authority, not a harmless availability improvement. The safe failure behavior should be part of the retrieval contract before an exception path is exercised.
Filtering after a top-k cut can lose valid evidence
Hypothetical scenario. Choose a global ranking of passages A, B, C, D, E and F. Only B, E and F are authorized for this caller, and the task asks for three passages. Taking the global top five and then removing unauthorized entries returns B and E. It misses F even though F is the third-best authorized passage.
An exact ranking inside the authorized set returns B, E and F. This small example shows why the ranking population matters. It does not prove that every filtered approximate-nearest-neighbor implementation returns those exact results; approximation, index design and filter selectivity still require evaluation.
Post-selection checks remain valuable as a defense and freshness boundary, but they should not excuse an uncontrolled first-stage candidate set. Avoid sending unauthorized text to a reranker or model and then hoping the final answer will omit it. Data handling begins before the final response is visible.
Filter selectivity changes the candidate and cost problem
Choose a hypothetical collection of 10,000 passages. A tenant scope permits 1,000, and a selected active-document rule leaves 200 currently eligible passages. The eligible fraction is 200 / 10,000 = 2%. This is a chosen population, not a measured distribution or a guarantee about an index's planning behavior.
For a deliberately simple exact-scoring model, assume 0.01 milliseconds per passage and a two-millisecond scope lookup. Scoring all 10,000 costs 100 milliseconds before the lookup; selected total is 102 milliseconds. Scoring the eligible 200 costs two milliseconds; with the lookup, total is four milliseconds.
The calculation isolates one hypothetical benefit of avoiding unnecessary scoring. Real filtered ANN search has different traversal and planning costs, and restrictive filters can change recall or latency in nontrivial ways. Benchmark the actual engine, allowed population and query shape rather than transferring the toy factor into a performance promise.
Rewrite terminology without rewriting the user's authority or intent
Query expansion can add relevant vocabulary, translate a supported language or separate a complex question into bounded evidence requests. Preserve the original question and the reasons for each transformation. A rewrite that drops “not,” changes a product identifier or replaces an exact policy condition can retrieve a persuasive answer to a different task.
Keep original-query retrieval where it helps retain exact terms, then compare authorized candidates from the defined alternatives. Do not treat a generated hypothetical answer as evidence that its claims are true. It can be a search aid only; returned source material still needs the ordinary support and permission checks.
The hybrid-retrieval chapter explains lexical/semantic fusion and reranking. Query transformation adds candidate-generation choices before that pipeline. Evaluate them against the original task and distinguish a retrieval gain from a change in what the system was asked to answer.
Bound the work across query alternatives
Choose three query variants, each returning 20 already permitted candidate entries. Raw appearances total 3 × 20 = 60. Suppose identity-aware deduplication removes 15 repeated appearances, leaving 60 − 15 = 45 distinct candidates. A current-revision check excludes five stale candidates, leaving 40.
If the selected reranking budget permits ten candidates, the pipeline must choose which ten to score rather than silently reranking all 40. Selection can affect recall and belongs in evaluation. Increasing query variants increases work and can introduce more irrelevant material; it is not an automatic improvement.
Preserve source and revision identity during fusion. Two chunks with similar words can be different evidence, while repeated representations of one source should not become independent support. Count evidence contributions by the relationship the task requires, not by how many query variants rediscovered them.
A shared collection and separate collections have different operating costs
A shared collection with enforced payload scope can simplify some capacity management, while separate collections or deployments can provide different administrative and resource boundaries. Neither arrangement removes the need to authenticate callers and apply policy. A wrongly selected collection can be as problematic as a missing payload filter.
Qdrant's multitenancy guide discusses organizing tenant data and its operational tradeoffs. Inspect the actual isolation, indexing and resource-management guarantees of the chosen arrangement. Do not call a layout “complete isolation” merely because a tenant identifier is present.
Measure noisy-neighbor behavior and administrative operations as well as query correctness. One tenant's large workload can affect shared capacity even when returned evidence remains correctly scoped. Per-tenant admission and quotas address a resource concern distinct from document authorization.
An agent may propose another search, not another permission
A bounded agent can request another evidence lookup when its first result is insufficient. The retrieval tool should accept a task query and bind the caller's trusted scope outside model-generated arguments. Each additional search consumes the shared time and work allowance.
Keep an evidence ledger that records queries, accepted sources and unresolved questions. Stop when the task is answered, the evidence is insufficient or the budget is exhausted. Repeatedly broadening a search must not become a path around missing authorization or a way to turn irrelevant text into apparent corroboration.
In the wild: filtering and tenant organization are explicit database features
Qdrant documents payload filtering and multitenant data organization separately. These primary mechanisms illustrate why a storage layout and an access decision should not be conflated. The application still needs trusted scope construction, current authorization and end-to-end evidence handling.
Hypothetical scenario. Northwind's rewrite tool omits a tenant condition to improve recall. The final answer contains no copied confidential text, but the reranker and logs already received another tenant's passage. Restore the enforced scope at the tool boundary and inspect derived copies. A clean final answer does not retroactively authorize earlier data movement.
Evaluate authorized retrieval against authorized ground truth
A relevant document outside the caller's scope is not a retrieval miss for that caller's accepted task. Build labels for the allowed evidence population and include permission-change cases. Otherwise a recall metric can reward the service for obtaining evidence it should never use.
Use query rewriting when vocabulary mismatch or task decomposition causes a demonstrated candidate problem. Keep simpler exact or lexical retrieval when identifiers and explicit conditions dominate. Evaluate ranking quality, current-source coverage, unauthorized-data handling and work cost as separate outcomes.
Test the original task boundary
A generated hypothetical answer mentions a policy that does not exist. What may enter the final citations?
Reveal the design reasoning
Only independently retrieved eligible sources. The generated text can guide search but cannot become its own supporting document. Return unsupported or clarify when no source establishes the claim.
Decision: Carry original scope and work budgets through query transformation.
Keep relevance inside the allowed view
Only B, E and F are allowed, but global top-five filtering returns B and E. What did the pipeline miss?
It cut the candidate list before restricting the ranking population. F is the third-best authorized passage in the selected exact example. Apply scope during candidate selection and still verify current permission and approximate-search behavior.
A query rewrite improves recall by removing the tenant condition. Is that a useful fallback?
No. Mandatory scope is an enforced application rule, not a relevance hint. Preserve it across every query and tool invocation. A generated rewrite cannot expand the caller's authority.
Three lists of 20 candidates lose 15 duplicate appearances and five stale entries. May a ten-candidate reranker score all remaining work?
The remaining set contains 60 − 15 − 5 = 40 candidates. A ten-candidate budget requires an explicit selection step. Evaluate the resulting evidence coverage and do not multiply work silently.
Northwind decision log
- Bind current caller scope outside model-generated query and tool arguments.
- Preserve intent, evidence identity and mandatory filters through query transformations.
- Evaluate relevance, access handling and bounded work inside the authorized population.
Go deeper: retrieval choices and evaluation populations
- Video lecture: Homework: Few-shot OpenQA with ColBERT retrieval | Stanford CS224U Natural Language Understanding, Christopher Potts. Inspect candidate retrieval as a stage whose output needs evaluation.
- Book chapter: Search Engines: Information Retrieval in Practice, chapter 7: Retrieval Models, W. Bruce Croft, Donald Metzler and Trevor Strohman. Compare query and evidence-ranking choices.
- Book chapter: Search Engines: Information Retrieval in Practice, chapter 8: Evaluating Search Engines, the same authors. Define the population and relevance labels behind a metric.
- Primary document: Filtering, Qdrant contributors. Check the candidate-selection mechanism while keeping caller authorization in the application contract.
Check the mechanism in this lesson
May a HyDE-generated paragraph be quoted as the policy evidence after it helps retrieve a relevant document?
Compare the explanation
No. The generated paragraph is a search intermediate and may contain invented details. Quote and check the retrieved permitted source, preserving its identity and current version.
Carry the decision forward
Reformulations can produce more useful candidates, but Northwind still has a finite request allowance. Page 16 asks what may be selected or compressed without losing the qualification that makes an answer correct.