Rewriting, filtering and re-ranking 00:00:01 The exception is eighth in line The international return exception starts eighth on a shelf of twenty passages. A fast retriever put it below several ordinary return rules. A second reader has time to compare each shortlisted passage carefully against the question. Query rewriting and expansion change what enters retrieval. Filters determine eligibility. Re-ranking then orders an existing candidate set using a more expensive scoring function. Each stage operates on a different population of passages. Track the identity of passage eight as it rises to the first position. Only the final three go into the model's context. The expensive comparison changed the order of existing candidates. 00:00:43 Run the shortlist through a second reader One candidate contains the exception for international returns. A cheap retriever placed it eighth. A cross-encoder evaluates the question together with each passage. Keep document IDs and scopes intact during reordering. With a fixed prompt budget, moving P8 into the top three changes what the generator can see. Evaluate this stage separately from candidate recall. 00:01:08 Budget candidates and final context A rewrite turns an ambiguous or conversational query into a query suitable for retrieval. Resolve “it” using conversation context while preserving identifiers, dates and exclusions. Compare the rewritten and original searches. A polished paraphrase that drops “before July” can retrieve a confidently wrong policy. Rewrite “Does that apply after July?” with conversation context. Keep the date qualifier and identify exactly which earlier policy “that” refers to. Query expansion generates related formulations and combines the resulting candidate sets. It can improve coverage for synonyms while increasing cost and introducing drift. Cap the number of expansions and retain which formulation retrieved each passage so you can inspect new false positives. Expand “chargeback” into “disputed card charge” and “refund.” Inspect which new passages address disputes and which merely describe ordinary returns. Metadata filters restrict eligible documents by fields such as tenant, product or effective date. Enforce authorization before text reaches the model and again when serving source links as appropriate. Filtering only a tiny post-search shortlist can leave no eligible matches despite relevant documents elsewhere. The global top ten all belong to tenant B. Search tenant A’s eligible collection directly rather than returning an empty list after dropping all ten. Record the correct passage’s rank before and after each stage. This shows whether it was absent from the corpus, removed by a filter, missed by retrieval, demoted by ranking or finally omitted by context packing. 00:02:57 Can rank twenty-one reach a twenty-slot reranker? The correct passage was ranked 21st and only 20 were submitted to the reranker. Can reranking recover it? A reranker orders the candidates it receives. It cannot score an omitted document. A reranker can rescue an overlooked candidate in its input. If the exception never entered the shortlist, repair the first-stage search or its budget before asking the second reader to work harder.