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.
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.
Distinguish three artifacts: the canonical corpus record, the representation submitted to the reranker, and the result presented to the reader. A parent document can survive candidate retrieval while a material passage is removed during serialization or truncation. If the interface subsequently renders the full parent from storage, its visible completeness does not establish that the scorer consumed the same content. This is a representation/provenance problem within an otherwise successful retrieval path.
The Sentence Transformers retrieve-and-rerank guide separates efficient candidate generation from cross-encoder scoring, and the CrossEncoder API specifies that inputs exceeding the configured maximum are truncated [1][2]. Our analysis isolates that transformation using an original twelve-position budget. It assumes a deterministic pair scorer, no additional document features and fixed inference settings. No tokenizer, pretrained model or hosted rerank endpoint is executed. The question is what information can reach the score under the stated preprocessing contract, not whether a particular vendor's model would rank a fabricated example correctly. Preserving these boundaries also distinguishes this article from rank-fusion mathematics and aggregate retrieval metrics.
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.
The documented cross-encoder reranking pattern jointly processes a query and candidate rather than relying solely on independently precomputed embeddings [1]. Candidate generation limits the set to be scored, but the candidate identity is not identical to its eventual model representation. Tokenization, task formatting and truncation can intervene before the forward pass. A statement that candidate D was reranked therefore needs an accompanying definition of which representation of D was processed.
For the worked construction, the input is a query sequence followed by a document sequence with BERT-format pair markers. We explicitly choose document-side right truncation while preserving the query. This policy is a toy specification, not an assertion that every CrossEncoder uses the same architecture, truncation side or prompt. Transformers documents several paired-input truncation strategies [3], so the chosen one belongs in the record. Extra metadata can consume budget if it is serialized, but metadata held outside the scorer cannot help the scorer distinguish inputs. These details determine the actual information boundary that a later score and its associated result card must be interpreted against.
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.
Let M=12 be a hypothetical sequence-position limit, Q=3 the query-token count, S=3 the number of special tokens, and D=9 the original document-token count. The versioned BERT documentation gives the pair form [CLS] A [SEP] B [SEP] [4]. Under this specific format, the untruncated length is Q+S+D=15. Preserving Q and the markers leaves document budget B=M-Q-S=6. Right truncation of the document retains D1…D6 and removes D7…D9.
All token identities and limits are stipulated. This calculation neither tokenizes an English sentence nor asserts a maximum for an installed model. It assumes exactly the stated pair format, with no additional prompt or metadata tokens. Another architecture or template needs its own accounting, and a service-side per-document cap need not have the same meaning as M. The representation length must be counted after the relevant tokenization and formatting rules are defined. Omitting special tokens from the budget would incorrectly assign nine document positions to this example and conceal the exact point at which its decisive tail is lost.
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.
Construct documents D+ and D− with identical first six token IDs and different final three IDs. Let preprocessing T preserve the same query and markers and right-truncate the document to six positions. Then T(q,D+)=T(q,D−). For a fixed deterministic scorer f whose only inputs are those equal representations, f(T(q,D+))=f(T(q,D−)). This follows from function evaluation on identical inputs, independently of the model's learned parameters. No numerical relevance score or empirical accuracy result is required for the argument.
The conclusion is deliberately conditional. A full pipeline might introduce external metadata, prior retrieval scores, stochastic operations or tie-breaking rules. Those could produce different final orders, but they would not demonstrate recovery of the omitted tail from the identical pair inputs. The information loss occurs in T. Inspecting corpus text alone misses that boundary because the source records remain distinct. A reproducible investigation therefore links original identity and revision to the retained representation, rather than inferring model exposure from the document eventually shown to the user. The documented truncation behavior motivates this constructed case [2][3]; the identical-input result is original analytical reasoning.
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.
With the same M=12 and S=3, increasing Q from three to five reduces the document budget from six to four positions under the declared preserve-query policy. A feature at D6 moves from retained to excluded without any change to the stored document or the candidate list. This original sensitivity calculation shows how query expansion and representation coverage can interact. It does not determine whether the added query tokens improve relevance enough to outweigh lost document content in a measured application.
The tokenizer policy is essential to that conclusion. In Transformers v4.49.0, only_second truncates the second member of a pair, only_first targets the first, and longest_first removes tokens from the longer member until the constraint is met [3]. The toy additionally specifies right-side document truncation; the cited strategy name alone is not a universal promise about every tokenizer's retained side. A changed policy can instead damage the query or another region of the document. Record the actual retained pair and applicable template, rather than treating max_length as a complete explanation of preprocessing. Cases where required query and formatting alone exceed the budget need explicit handling outside this feasible example.
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.
Parameter semantics must be preserved across implementations. The retrieved Cohere v2 reference distinguishes top_n, which limits returned rerank results, from max_tokens_per_doc, which controls truncation of long document inputs [5]. Neither is interchangeable with the hypothetical total serialized pair limit M used above. A per-document token cap and a model's full sequence-position bound can coexist with additional internal processing, so do not infer one simply by subtracting the other from an assumed context size.
The CrossEncoder API separately describes its maximum input sequence length and per-call processing overrides [2]. A migration that copies a numerical limit but changes tokenizer, format or preprocessing has not held the representation constant. Keep the model revision, library or API version, exact configuration and document revision together. Where the processed tensor is available, inspect it; where it is not, retain the request and the documented limits without pretending to have observed hidden implementation details. Increasing the number of returned results cannot be cited as evidence of more complete per-document reading. The relevant question remains which content the scorer could actually use, under the specific documented and configured path.
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.
Passage-level scoring is a documented retrieval/reranking pattern [1]. For the constructed D1…D9 sequence, define windows W1=D1…D6 and W2=D4…D9. Each has six document tokens and fits Q=3 plus S=3 within M=12. The union covers nine unique positions; the intersection covers D4…D6, or three. Total document-token occurrences across both inputs are twelve, while the two complete pair representations consume 24 positions. These are original representation counts, not execution-time or billing measurements.
Coverage is necessary for the omitted distinction to influence a score but does not establish semantic success. A window should preserve the relationship between a rule and its condition; exposing an isolated exception without its referent can produce a different ambiguity. The maximum useful passage size and overlap depend on the actual tokenizer, formatting, content structure and scorer. No optimum is inferred from the six-position demonstration. Retain parent identity and source offsets for both windows so the selected score can be traced to the exact passage and so any later expansion to surrounding text is explicit. The corpus parent remains an association, not evidence that every part of it was scored together.
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.
Let hypothetical passage scores be s(D1)=0.90, s(D2)=0.85 and s(E1)=0.80, with parent(D1)=parent(D2)=D and parent(E1)=E. A top-two operation on passages yields D1,D2. Define a separate parent aggregation S(P)=max s(c) over scored child passages c of P. Ranking distinct parents under that definition yields D,E with scores 0.90 and 0.80. Deduplicating the already truncated top-two passage list would leave only D, so grouping before the parent cutoff is not equivalent to deduplication afterward.
These arbitrary values illustrate ordering and aggregation only; no calibrated relevance probability is assigned to them. The maximum records the strongest observed child score, not uniform support across the parent or inspection of unsubmitted text. Other aggregation rules require their own meaning and evaluation. CrossEncoder's indexed ranking output can be joined to the submitted items [2], but an application must additionally retain its passage-to-parent mapping, source offsets and aggregation rule. Without that provenance, a full-page result may incorrectly suggest that the model reviewed its whole contents. The example concerns explicit result semantics rather than a universal recommendation to use maximum aggregation.
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.
The relevant factual-evidence boundary is narrower than candidate ordering. Joint query-passage scoring, as described in the retrieval/reranking pattern [1], does not by itself certify that a downstream claim preserves a rule's scope or exceptions. In the constructed example, an answer based on a surviving introduction can omit the condition carried by a removed tail. A later full-document inspection can supply additional evidence, but it must not be retroactively attributed to the earlier scoring input.
For a focused diagnostic, construct paired records that share a prefix and differ in a material suffix, then compare their actual processed representations. Equal representations under the stated deterministic scorer establish the information-loss case without predicting a numerical output. If representations differ, a model evaluation can separately investigate whether the retained distinction affects the result appropriately. Such tests should be accompanied by representative queries and declared judgments before drawing corpus-wide performance conclusions. Here only the abstract representation and aggregation calculations were executed. No claim is made about an empirical failure rate, trained-model sensitivity or the correctness of a production answer. This separation makes a debug record useful rather than turning an illustrative counterexample into an unsupported benchmark.
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.
A reproducible handoff links query and candidate revisions to the actual scoring unit. Include tokenizer/model revision, task template, applicable sequence or document limits, truncation strategy and side, original and retained counts, passage offsets and any parent aggregation. Preserve the returned item index and score alongside that identity. The official documents establish the relevant mechanisms, while the exact recorded representation establishes what the configured implementation submitted [1][2][3][4][5]. If a hosted implementation does not expose internal tensors, state that observation boundary instead of reconstructing them from an assumed tokenizer.
The analytical results are precise: with M=12 and three BERT pair markers, Q=3 leaves six document positions and Q=5 leaves four; two retained-identical pairs cannot be distinguished by the specified deterministic pair-only scorer; two overlapping six-token passages cover nine unique document positions using twelve document occurrences; and parent grouping before a cutoff differs from deduplication after a passage cutoff. None of those results requires inventing a model score. They show why candidate presence, model exposure and displayed completeness should be tracked separately. A later evaluation can then identify whether a change improved retrieval, preserved more decisive context, altered aggregation or simply presented the same score beside more text.
Sources & further reading
Explore the references behind this guide. External pages may change after our review.
- Retrieve & Re-Rank — Sentence Transformers documentationSentence Transformers · Accessed 6 Nov 2026
- CrossEncoder — Sentence Transformers documentationSentence Transformers · Accessed 6 Nov 2026
- Padding and truncation · Hugging FaceHugging Face · Accessed 6 Nov 2026
- BERT · Hugging FaceHugging Face · Accessed 6 Nov 2026
- Rerank API (v2) | CohereCohere · Accessed 6 Nov 2026
Article updated 6 Nov 2026.
Found something we should revisit?
Good explanations get better with thoughtful feedback.