01 / Reproduce
Run the shortlist experiment
Download and extract the practice ZIP into a fresh folder. It contains check_rerank.py, documents.json, pinned requirements and a README. Use Python 3.10 or newer with compatible package wheels; we tested Windows CPython 3.13.15. Open PowerShell in the extracted folder:
python --version
python -m venv .venv
.\.venv\Scripts\python.exe -m pip install -r requirements.txt
.\.venv\Scripts\python.exe .\check_rerank.py
Get-Content -LiteralPath .\lab-output\report.json
The first run downloads the pinned public model files from Hugging Face, including an approximately 91 MB ONNX weights file, into model-cache. Package installation also needs internet access. The script runs the reranker on your CPU; it does not call a hosted model API. The ZIP contains no model weights. Cache checks can still contact the Hub on later runs.
The fictional question is “What do I need to collect a conference badge for a colleague?” The supplied passages are deliberately small:
- D1: badges are collected at the registration desk in the lobby.
- D2: the workshop starts at 10 a.m.; bring a laptop and registration confirmation.
- D3: the lunch menu includes vegetarian sandwiches and fruit.
- D4: collecting a colleague's badge requires their registration QR code and a signed authorization note.
We authored D4 as the answer passage. The first case supplies D1, D2 and D3. The second supplies those same candidates plus D4. These lists are a controlled stand-in for a retrieval handoff; no search algorithm produced them. Our observed output:
Python 3.13.15 / FastEmbed 0.9.1 / CPU
missing: D1 (3.0408) > D3 (-10.5015) > D2 (-11.2539)
authored answer present=False, rank=None
included: D4 (9.4779) > D1 (3.0408) > D3 (-10.5015) > D2 (-11.2539)
authored answer present=True, rank=1
Report: lab-output\report.json
D1 wins the incomplete shortlist, but its text gives a location rather than the colleague-collection requirements. Once D4 is supplied, it ranks first in this fixture. The expected_present flag is a membership check against our authored answer ID. It is not a model judgment that a question has been answered.
02 / Inspect
Inspect the reranker handoff
A cross-encoder scores a query paired with each candidate passage. FastEmbed exposes this through TextCrossEncoder. In this lab, we collect one score per candidate, attach it to the original ID and text, then sort descending. The reranker supplies scores; our code performs the sorting.
Save this excerpt as inspect_handoff.py beside the downloaded files. It imports the kit's model loader and fixture reader, so use the same environment:
from pathlib import Path
from check_rerank import load_model, read_fixture
fixture = read_fixture("documents.json")
encoder, _, _ = load_model(Path("model-cache"))
candidates = [doc for doc in fixture["documents"]
if doc["id"] in fixture["shortlist"]]
scores = list(encoder.rerank(
fixture["query"], [doc["text"] for doc in candidates]
))
pairs = list(zip(candidates, scores, strict=True))
for doc, score in sorted(pairs, key=lambda pair: -pair[1]):
print(doc["id"], f"{score:.4f}")
Run .\.venv\Scripts\python.exe .\inspect_handoff.py. Our run printed D1, D3, D2 with the same rounded scores as the missing case. D4 never entered this call. Sorting the returned values cannot create an unseen document.
Qdrant's ranking guide makes this candidate-set boundary explicit. Our experiment isolates it. It does not demonstrate why a real retriever would omit D4, or that increasing a candidate limit would fix your system.
03 / Make it your own
Change the wording, keep the audit trail
Try the tested paraphrase in a fresh output directory:
.\.venv\Scripts\python.exe .\check_rerank.py --query "Can I pick up someone else's event pass?" --out adapted-output
D4 still ranked first when included, but its raw score changed from 9.4779 to -10.4235. D1 scored -10.6692 in that included case. The short form “event pass” changed how this model scored the text. The missing case still had no D4. Compare the full reports rather than treating a positive value as an approval gate.
The original model card describes passage ranking and exposes logits in its Transformers example. These raw values are not percentages or a measured probability that the source is correct. This tutorial does not calibrate a score threshold.
To make this useful for your own assistant, start with a few fictional questions and mark the passage that contains each answer. Record the IDs before reranking, the ranked IDs afterward and whether the marked passage survived both steps. Add an unanswerable question too; a first-place result does not establish that any passage answers it. Keep access controls in place when inspecting candidate lists.
For a real system, replace the manually supplied shortlist with the actual retrieval results and preserve IDs, text and source references together. Inspect authorized source content when labeling answers. Then evaluate more queries before selecting a candidate limit or changing the reranker. This integration is a proposed adaptation; we did not run it against a search service.
04 / Boundaries
Keep the evidence in scope
We ran the default and paraphrased queries, the exact excerpt, candidate-ID preservation, finite-score checks, input-hash preservation and malformed-input/overwrite refusals. We reran the exercise from extracted local and public practice ZIPs. Results are from real CPU model inference on four authored English passages. Small numerical differences may occur on other environments.
The script pins model revision a09144355adeed5f58c8ed011d209bf8ee5a1fec, loads onnx/model.onnx from that snapshot, records six model-file hashes and checks query/passage pairs against a 512-token limit before scoring. The model's text window is another reason to inspect what actually reaches a scorer.
No retrieval engine, Qdrant server, LLM answer generation, live assistant, production corpus, multilingual quality, accuracy benchmark, speed, cost, threshold calibration or general reliability was tested. The answer labels were authored. Reranking does not verify source truth, freshness or permission to use a document. This complements our earlier embedding/source-review guide; the experiment here is about a missing candidate and a different model.
05 / Primary sources
Read the primary sources
- FastEmbed reranker tutorial — cross-encoder setup and supported models.
- Qdrant ranking guide — reranking operates on retrieved candidates.
- Exact ONNX model snapshot — files used by this exercise.
- Original MS MARCO model card — passage-ranking task and raw model outputs.
- Hub download guide — revision-pinned snapshots and file selection.
Primary sources checked November 26, 2026. Tested with FastEmbed 0.9.1, ONNX Runtime 1.32.0 and the pins in the kit. This is a practical use of an established open-source tool and model, not a new-release announcement.
06 / Keep it handy
Get the practice and posting files
The practice ZIP contains the runnable script, fictional passages, requirements and README; it downloads the model separately. The posting ZIP contains the original portrait, starter teaser, alt text and full article URL. Social content is prepared for manual posting; it has not been scheduled or published.
Browse more AI Anonymous field notes or talk with JABSystems about your workflow.

