Log inStart free
LESSON 22.09 · 6 STAGES · 3 CONTROLS · 3 CHECKSPRO · PREVIEW

Reranking with cross-encoders

Watch a cross-encoder rescore the top search results, one word pair at a time.


Pro lesson. Stage 1 is free to watch. Pro opens all 6 stages, 3 controls and 3 checks, in this lesson and every other.

Go Pro · $8.25/mo
EXPLAINER · 22.09 · SEARCH BAYBI-ENCODER · 6 RETRIEVED · 6 CANDIDATES
01
Stage 1 of 6 · First stage
A fast bi-encoder scores all 12 pages. The top 6 become candidates for a slower second look.
Explain it simply

Reading every page with a careful model would be slow. So a fast model goes first and ranks all 12 pages. The bi-encoder turns the query and each page into one vector and compares the two. Only the pages above the dashed cut go on.

A list of 12 pages ranked by the bi-encoder. The candidates above the cut are D4, D2, D5, D1, D6, D3.

query, pages, wordscut at N candidatesscores, matches, relevantwrong in top 3, missed, no matchskipped word
first stage · bi-encoder“battery drains fast”4D1Battery drains fast? Lowe…0.622D2Battery tips: a cool batt…0.966D3The laptop charges fast w…0.301D4My old laptop from school…0.973D5Error E42 means the lapto…0.645D6Fix error E42: open the l…0.53–D7Fan noise and overheating…0.00–D8If the laptop feels warm,…0.00–D9Screen flickers? Restart…0.00–D10Printer error E42: the pa…0.00–D11Hot keys: press Fn and F2…0.00–D12Keys stick? Clean the key…0.00top 6first stage · bi-encoder“battery drains fast”4D1Battery drains fast? Lowe…0.622D2Battery tips: a cool batt…0.966D3The laptop charges fast w…0.301D4My old laptop from school…0.973D5Error E42 means the lapto…0.645D6Fix error E42: open the l…0.53–D7Fan noise and overheating…0.00–D8If the laptop feels warm,…0.00–D9Screen flickers? Restart…0.00–D10Printer error E42: the pa…0.00–D11Hot keys: press Fn and F2…0.00–D12Keys stick? Clean the key…0.00top 6
Toy: 12 help-centre documents and 3 queries, shared with 22.C1; the cross-encoder is hand-set, not trained
STAGE 1 / 6
MATH · STAGE 1HOVER A SYMBOL OR A SHAPE
s1=cos⁡(q,d), keep the top N\sy{s}{out}{s_1} = \cos(\sy{q}{data}{\mathbf{q}}, \sy{d}{data}{\mathbf{d}}),\ \text{keep the top } \sy{n}{param}{N}
s1(D4)=0.97, N=6s_1(\text{D4}) = 0.97,\ N = 6

Score every page fast, then keep the best N.

Common mix-ups

MYTHA reranker can find pages the first stage missed.

The fix, and 1 more mix-up with the diagram to show them, come with Pro.

Predict, then reveal
3 CHECKS · PRO
Q01With 3 candidates, can reranking change which pages are in the top 3?

Make your guess, then test it in the diagram. All 3 checks come with Pro.

PRO LESSON · YOU WATCHED STAGE 1 OF 6
Unlock the full explainer
  • 5 more stages and 3 live controls
  • 2 mix-up cards and 3 predict-then-reveal checks
  • Watch it as a narrated video, in three voices
  • Every Pro lesson and capstone · 656 in total

$99 a year, or $15 a month. Cancel any time.