Rachis

Which matching passages should reach the model?

18 November 2026, updated 28 November 2026

Part 4 of 7: Start here

After your application finds passages that match a question, it must choose their order and how many reach the model. The cut is the number of passages the application includes: anything ranked below it is left out of the request, even if it settles the question.

Understanding how search puts matches in order and how a second ranking can reorder them helps you choose how many passages to include. Start with a documented setup, then check whether the passage that settles each question reached the request.

Follow a match into the request

With documents divided into passages, your app can search for relevant text. Search returns matching passages, each with a score: a number the search system assigns for how closely the passage matches the question.

The app sorts the results, keeps a chosen number, and builds a request for the model containing those passages and the question.

Take a traveller who asks whether their travel insurance covers a flight cancelled by a strike. The insurer's application answers from its policy wordings, amendments called endorsements and claims guidance, a collection too large to include in full in one request.

The policy covers flight cancellations but excludes those caused by industrial action. Search finds both clauses. Many cancellation passages match the question's words and fill the top places, while the exclusion ranks below the cut because it says "industrial action" rather than "strike".

The request contains the higher-ranked passages and the question, leaving out that clause. The answer can then describe the cover without mentioning that the strike is excluded.

How search puts matches in order

The first score can come from keyword matching or vector search, which compares numerical representations of text for similarity. Hybrid search combines keyword and vector results.

Microsoft's Azure AI Search uses Reciprocal Rank Fusion to merge ranked lists by adding contributions based on each result's position in each list. The combined order can therefore differ from either original list.

One RAGFlow user reported that correct results ranked low in retrieval testing and in actual use. In their screenshot the correct result had a higher vector similarity than the top-ranked incorrect one, but a low hybrid similarity.

Separate search limits from request limits

Top-k means keeping the k highest-ranked results, where k is a chosen number. An application can set one k for the search results and a smaller one for the request, which is the cut, so it can search wider without including every match.

OpenAI's vector-store search guide documents up to 10 results by default, configurable to 50. These are search-result limits; inspect which passages your app actually puts in the request.

Raising the number of search results does not resolve every selection problem. A builder reported on Hugging Face that raising it still failed to prioritize results from the period the question asked about.

In another RAGFlow report, the author illustrated the problem with a table of ten tasks that each last one day: asking which tasks last one day might return no results or only two of them, while asking about task 8 alone returned the right answer. The author suspected the one-day rows fell outside the top-k results. The missing documents and recall collection gathers related reports.

Try a second ranking before choosing the final passages

Reranking is a second scoring step that reorders passages already found by search. In Sentence Transformers' retrieve-and-rerank approach, the second model is a cross-encoder: it reads the question and each candidate passage together to score the match. This extra scoring takes time, so search first narrows the set.

The reranking model can move the traveller's exclusion higher if it is among the candidates. It cannot recover a passage it never receives.

Azure AI Search's semantic ranker has the same limit: it reranks only the top 50 results from the first ranking and cannot search the full collection again for passages it missed.

Check what the evidence shows

A 2026 study on S&P 500 financial reports found that the share of answers scoring at least 8/10 rose from 33.5% to 49.0% with its reranked setup. A model graded the answers. Its reranking stage also kept a variable number of passages, typically 5 to 10, where the other setup kept a fixed 10.

A 2026 study of research articles and textbooks found that up to 50 hybrid search candidates held 98.75% of the needed textbook evidence. A cross-encoder reranker raised the share in the final five passages from 77.4% to 86.6%. Model-scored answers did not consistently improve with more evidence. The tests searched within a known document, and most textbook reference answers were written by a model.

Inspect the final request

A practical first trial is LlamaIndex's documented example: retrieve 10 passages, rerank them, and keep five.

For a few questions users have asked, record the passage that settles each one. For the traveller, that is the industrial-action exclusion. Save the ranked search results with their scores and positions, the order after reranking, and the exact passages placed in the request.

OpenAI's file search leaves its search results out of the response by default; setting include=["file_search_call.results"] when creating the response returns them.

Check whether the deciding passage is present and at what position. If search found it but it was cut, try a larger candidate set with reranking before increasing the number of passages included in the request. If it never appeared among the search results, inspect the search and any filters.

The next piece covers how an answer cites your documents.

Join the waitlist: one email when there is something to try.

Read the pain map: Retrieval and citations.