The useful part, up front

What you’ll take away

  • A retrieved document, its actual scoring input and the displayed result can contain different amounts of text.
  • Account for query and formatting tokens before assigning the remaining document budget.
  • Two different documents can become identical scorer inputs when a decisive tail is removed.
  • Passage scoring exposes smaller units; retain their source offsets and an explicit rule for parent results.
  • A score explains an ordering under its input policy, not a complete factual review of the original page.
01

The result card can show more text than the scorer received

A search result can display the full title and text of a document even when a ranking model saw only part of it. Imagine two fictional help pages with the same opening description and different final eligibility rules. Both pages reach the candidate list. Before scoring, the system shortens each page to fit an input limit, removing the final rule. A result card that later loads the original page can hide that loss: the reader sees the complete document, while the score was based on a smaller representation. Finding the right page and preserving its decisive sentence are separate successes.

This is a practical question for reranking, the second scoring stage after an initial search. Sentence Transformers documents a retrieval stage that supplies candidates and a cross-encoder stage that scores query-document pairs. Its API also documents truncating inputs that exceed the configured sequence length. [1][2] We will follow a small, invented token budget to see what can disappear between those stages. The example uses abstract token positions, not a real model's vocabulary or measured scores. Keeping the stored document, the actual scoring input and the displayed result distinct makes an apparently strange ranking easier to investigate.

Keep three versions of the document distinct. Original investigation framework. Seeing the whole page in a result does not establish that the scorer received it whole.
Original investigation framework. Seeing the whole page in a result does not establish that the scorer received it whole. · Ameer Journal — original explanatory diagramOriginal editorial illustration; no third-party artwork reused.
02

The query shares the scoring input with the candidate

An initial search can compare independently prepared query and document representations to find possible matches. A cross-encoder instead examines the query and candidate together when producing its score. The Sentence Transformers guide explains this joint attention across the pair and uses the first search to keep the number of pairs manageable. [1] That second look can be useful, but it still operates on the information actually supplied. It is not an instruction to search the whole original collection again or a promise to recover text removed before scoring.

For our fictional service, the query and one document enter a single limited sequence. The service keeps the full query and shortens the document if necessary. This is one declared input policy; other systems may allocate space differently. Titles, separators, templates or task instructions can also occupy positions when they are part of the chosen format. Before blaming a score, write down the exact pair that was constructed. A page being present in a shortlist tells you its identity survived retrieval. It does not tell you whether the model received its opening, its relevant middle passage, its final exception, or some transformed combination of those pieces.

03

Count the markers as well as the two pieces of text

Use a fictional maximum of 12 input positions. Our already-tokenized query occupies three positions. We choose the documented BERT pair layout: one classification marker, the query, a separator, the document and a final separator. [4] The three markers occupy three more positions. That leaves 12 minus three minus three, or six positions for document tokens. A nine-token document needs 15 positions with the same query and markers, so it does not fit this invented limit without some change. Twelve is a teaching number, not a published context limit for a real model.

Our chosen policy retains document positions D1 through D6 and removes D7 through D9. The letters label token positions that already exist; they do not imply that every English word is one token. If the decisive exception occurs in the removed tail, it cannot contribute through this input. Also avoid counting only the visible query and document words while forgetting the format. In this particular pair layout the markers consume space, and a different model's format may use a different amount. The useful calculation is the budget of the actual serialized representation, including all required pieces, before assuming the full document reached the model.

A fixed total budget is shared by query, markers and document. Original abstract token counts using BERT pair formatting. The twelve-position cap is fictional, not a real model specification.
Original abstract token counts using BERT pair formatting. The twelve-position cap is fictional, not a real model specification. · Ameer Journal — original explanatory diagramOriginal editorial illustration; no third-party artwork reused.
04

Two different documents can become the same scoring input

Now give our fictional documents the same first six token IDs. Their last three positions differ, with a decisive rule in that tail. One complete document permits a fictional action under its stated conditions; the other does not. Under the six-position document budget, both are shortened to the identical retained prefix. The query and format markers are also identical. A scorer receiving only that identical input has no access to the removed distinction. Showing the full pages afterward does not retroactively add it to the calculation.

For a deterministic scorer with the same settings, identical full inputs produce the same score. A later tie-breaker might still put one document first because of its identifier or original order, but that does not show the scorer understood the hidden rule. We are not predicting a real model's score or asserting that every ranking system is deterministic. The example establishes a narrower point: a preprocessing step can erase the information needed to distinguish two candidates before model quality even enters the question. Recording the retained token IDs or an appropriate content fingerprint can reveal that collision when the original documents look obviously different to a human reader.

05

A longer query can leave less room for the evidence

Keep the same 12-position limit and three format markers, but expand the query from three tokens to five. Under our policy of preserving the whole query, the document now has only four positions available: 12 minus five minus three. A clue at document position D6 that survived the earlier input is now removed. Adding detail to a query may help express the need, yet it can also change what document content fits. In this constructed example, that tradeoff follows directly from a shared fixed budget; it is not a claim that shorter queries always rank better.

The truncation rule decides where the loss happens. Transformers v4.49.0 documents an only-second strategy for shortening the second sequence, and a longest-first strategy that removes from the longer sequence of a pair as needed. It also documents shortening only the first sequence. [3] Those policies can retain different information. A policy that cuts the query may remove its key condition instead; simply moving the loss to the other side does not solve the information problem. State which sequence may be shortened, how much was actually retained, and whether the remaining pair still contains the question and evidence the score is expected to evaluate.

06

A result-count limit and a text-length limit control different things

Two settings can both contain a number without limiting the same object. In the retrieved Cohere v2 API reference, top_n limits how many ranked results are returned, while max_tokens_per_doc limits document text before longer documents are truncated. [5] Asking for more results does not, by the meaning of that result-count setting, enlarge each document's text allowance. Similarly, our fictional total pair budget of 12 positions is not the same kind of parameter as a hosted service's per-document limit. The name, unit and documented scope belong beside the value.

This matters when moving between tools or updating a pipeline. A locally configured cross-encoder and a hosted reranking endpoint need not apply the same format, tokenizer or limit. Copying a familiar number from one to the other does not reproduce the earlier input. Check the actual documentation and inspect whatever representation evidence the implementation exposes. Keep the published version or retrieval date with the settings record. The API reference is evidence of its described behavior at that time, not proof that every reranker shares the same policy. Our small arithmetic example explains why input accounting matters; it does not substitute for those implementation-specific details.

Two distinct tails disappear behind an identical prefix. Original hypothetical pair-only deterministic scorer. Both full documents use the same query; only the removed tail differs.
Original hypothetical pair-only deterministic scorer. Both full documents use the same query; only the removed tail differs. · Ameer Journal — original explanatory diagramOriginal editorial illustration; no third-party artwork reused.
07

A passage can fit, but its boundary still matters

One option is to score smaller passages instead of a whole long page. The Sentence Transformers guide includes examples that split source articles into paragraphs before retrieval and reranking. [1] Return to our invented nine-token document and six-token document allowance. We could submit positions D1 through D6 as one passage, then D4 through D9 as another. Each passage fits with the three-token query and three markers. The second now includes the previously removed tail. This changes what is available to inspect; it does not promise the model will interpret that tail correctly.

The two passages overlap by three tokens, so together they submit 12 document-token occurrences from nine unique positions. Adding the query and markers to both produces 24 total input positions across two scoring calls. The overlap preserves some shared context but also repeats work. A condition can still become misleading if its rule and exception land in separate passages. Choose boundaries that keep the relevant relationship together, then verify the actual passage. There is no universal best overlap hidden in these numbers. They simply make the tradeoff visible: expose the needed evidence, retain enough context to interpret it, and account for the extra pairs being scored.

08

A strong passage score is not a review of its whole parent page

Suppose a separate invented ranking assigns three passages these ordering scores: D1 gets 0.90, D2 gets 0.85 and E1 gets 0.80. D1 and D2 belong to the same parent document D; E1 belongs to document E. These are made-up values, not model outputs or probabilities. Returning the top two passages gives two passages from D. Returning the top two distinct parent documents requires an additional grouping rule, such as giving each parent its highest passage score. Under that declared rule, the parent order is D followed by E. The two operations answer different requests.

The choice also changes what the score means. A parent score of 0.90 under the maximum rule says that one of its scored passages received 0.90. It does not say every section of D was equally relevant, that all exceptions were read, or that its factual claims were checked. Keep the selected passage and its location attached to the parent result. Sentence Transformers returns document indices with scores, providing the identity needed to relate a result to the submitted unit. [2] If your application changes that unit from passage to parent page, its grouping and display logic should preserve the explanation rather than silently expanding what the score appears to cover.

Top passages and top distinct parent pages are different results. Made-up ordering values, not model outputs or probabilities. Max-per-parent grouping before cutoff yields D, E.
Made-up ordering values, not model outputs or probabilities. Max-per-parent grouping before cutoff yields D, E. · Ameer Journal — original explanatory diagramOriginal editorial illustration; no third-party artwork reused.
09

Check the sentence behind the ranking before using it as support

A ranking score helps order candidates; the later answer still needs evidence that matches its claim. In our fictional help-page case, the relevant question is not merely whether the page mentions the right feature. It is whether the retained passage contains the rule, the condition and the exception needed to answer the query. If a system uses a highly ranked opening paragraph to support a claim governed by the missing final sentence, the ordering has not resolved that evidence gap. Reading the full page afterward can reveal the problem, but the check is additional work with its own outcome.

A useful diagnostic pair keeps the beginning of two documents identical and changes only a decisive later condition. First inspect whether the actual scoring inputs remain different. If preprocessing makes them identical, the problem is already visible before running a scorer. If both conditions survive, evaluate whether the ranking and later answer handle them correctly. This is a proposed test design, not a claim that such an experiment was performed here. Record observed failures separately from hypothetical ones, and keep ordinary questions in the evaluation too. A carefully chosen edge case can explain a mechanism without estimating how frequently that mechanism affects the real collection.

10

Save the input boundary, not just the final score

For each investigated result, keep the query, candidate identity, document revision and the exact unit submitted for scoring. Record the tokenizer and model version, formatting, applicable length limits, truncation rule and the amount of text retained. If the system scores passages, retain their parent mapping and source locations. If it returns parents, record how passage scores were combined and when the result-count cutoff was applied. The documented APIs expose different parts of this path, so distinguish what you observed from what you know only through documentation. [1][2][3][5]

Our twelve-position example gives a compact reason for that record. A three-token query plus three markers leaves six document positions; a five-token query leaves four. Two different full documents can therefore become the same input, while a complete-looking result card conceals the change. Passage scoring can expose omitted material, but needs context, identity and an explicit grouping rule. When comparing configurations, hold the query set, corpus revisions and candidate identities fixed wherever possible, then inspect the representation changes as well as ranking results. That way a new score leads back to evidence about what changed, instead of implying that every word of a returned page must have been understood.

Trace the score back to the exact unit that was submitted. A proposed review record, not a production benchmark. Record observed inputs separately from documented hidden behavior.
A proposed review record, not a production benchmark. Record observed inputs separately from documented hidden behavior. · Ameer Journal — original explanatory diagramOriginal editorial illustration; no third-party artwork reused.
Follow the evidence

Sources & further reading

Explore the references behind this guide. External pages may change after our review.

  1. Retrieve & Re-Rank — Sentence Transformers documentation
    Sentence Transformers · Accessed 6 Nov 2026
  2. CrossEncoder — Sentence Transformers documentation
    Sentence Transformers · Accessed 6 Nov 2026
  3. Padding and truncation · Hugging Face
    Hugging Face · Accessed 6 Nov 2026
  4. BERT · Hugging Face
    Hugging Face · Accessed 6 Nov 2026
  5. Rerank API (v2) | Cohere
    Cohere · Accessed 6 Nov 2026

Article updated 6 Nov 2026.

Found something we should revisit?

Good explanations get better with thoughtful feedback.

Suggest a correction