Home » RAG Reranking at the Context Cutoff

RAG Reranking at the Context Cutoff

Four document cards trade positions while an excluded fifth card stays beyond a solid divider.

A technician asks which gasket fits a Lumen pump after its housing has been replaced. The parts catalog mentions two seals. The original service bulletin says G14. The bulletin for the revised housing says G27. If the answer system can pass only two passages to its generator, which two will it send? In our test, reranking moved the applicable bulletin from fourth to first. Removing it from the shortlist left the same model with a plausible but incomplete pair.

Grade the passage before scoring it

Lumen is a fictional product. The download contains all seven passages, the four candidates offered in each case, their initial order and the passage IDs we accepted as decisive before running the model. For the revised housing, a passage earns credit only if it ties the revised part to G27. For the original, it must establish that G14 applies. Merely sharing the part number is insufficient. For the humidity question, none of the seven gives a limit.

We fixed the context budget at two passages. A cross-encoder scores each question and candidate together, then sorts the existing list. We ran the CPU version of TinyBERT on each complete pair. The initial lists were hand-built so we could change one candidate at a time. You can inspect the procedure and the exact model revision in the download. Retrieve and rerank pipeline · TinyBERT model card.

Question and condition Decisive passage Rank before → after Made the final two?
Revised housing BUL-2 4 → 1 Gained
Revised housing, BUL-2 withheld BUL-2 Absent → absent Missed both times
Original housing BUL-1 1 → 1 Kept
Restart delay WAIT 4 → 1 Gained
Storage humidity None in collection Undefined No supported answer

Read the two revised-housing cases together

With all four candidates present, the new top two were the revised bulletin and the replacement instructions. The technician could cite G27 directly. We then replaced the revised bulletin with a returns slip and kept the other three candidates in their original positions. The model now put the replacement instructions first and the original bulletin second. One tells the technician to record the revision. The other offers G14 for a different housing. Neither justifies ordering a gasket for the revised part.

These two conditions answer different engineering questions. Candidate recall asks whether the four passages include the decisive one. Recall at two asks whether it survives the final cut. With one required passage, each answer is zero or one. The humidity case has no required passage in the collection, so its recall is undefined. The model still ranked the returns slip first. First place alone gives the generator no basis for a humidity limit.

Download the passages, judgments and scores (ZIP)

Decide where the next change belongs

Try hiding the grades and classifying the two misses. For the gasket, the upstream search has an applicable document to recover. Inspect candidate generation, filters and the indexed revision. The hybrid search guide covers how another retrieval path might recover it. For humidity, widening this pool to the whole collection still leaves a gap. The answer should acknowledge the missing specification. When an answer does name a part or a limit, the citation check helps decide whether the quoted text supports that precise claim.

On your own traffic, save the exact passages visible to the scorer after permission checks and truncation. Grade them against the applicable version, then count gains, losses and ties at your actual context budget. Include old revisions and questions with no source answer. This small exercise tested ordering only. It did not run a retriever or generate an answer. A deployment decision also needs representative queries, answer checks and measured latency on the intended hardware.

You may also like