LESSON 22.07 · 5 STAGES · 2 CONTROLS · 2 CHECKSPRO · PREVIEW
Dense retrieval with bi-encoders
Watch documents and a query become vectors, then the closest vectors come back.
Needs22.06 BM25
Pro lesson. Stage 1 is free to watch. Pro opens all 5 stages, 2 controls and 2 checks, in this lesson and every other.
Go Pro · $8.25/moEXPLAINER · 22.07 · SEARCH BAY12 DOCUMENTS · 12 ENCODER CALLS, ONCE
01
Stage 1 of 5 · Encode documents
A bi-encoder runs an encoder on each document once, before any query. Each document becomes a vector of 6 numbers.
Explain it simply
Each row is one help page. The encoder reads the teal words and adds up their meanings, one column per meaning. A word like the or fast has no meaning here, so it adds nothing. This runs once for all 12 pages, before anyone searches.
A table of 12 documents. Each document has a vector of 6 numbers: battery, charging, heat, screen, keys and error. D1 has the vector [1.8, 0, 0, 2.3, 0, 0].
words with a vector, vectorsscore, top 3, relevantwrong in top 3, missedno vector, zero
Toy: 12 help-centre documents and 3 queries, shared with 22.C1; a hand-made 6-concept encoder, not trained
MATH · STAGE 1HOVER A SYMBOL OR A SHAPE
A document vector adds the vectors of its words.
PRO LESSON · YOU WATCHED STAGE 1 OF 5
Unlock the full explainer
- 4 more stages and 2 live controls
- 2 mix-up cards and 2 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.