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

Query rewriting, expansion and multi-query

Watch three fixes change which help pages a weak query finds.


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.13 · RETRIEVAL BAYRECALL@3 0/2 · TOP D9 D11
01
Stage 1 of 6 · One query
BM25 scores each document by the query words it shares. The top 3 holds 0 of the 2 relevant documents.
Explain it simply

Each row is one help page. A dot marks a right page, and a ring marks one the top three misses. BM25 counts only words a page shares with the query, in bold. The right pages say overheating and warm, not hot. Only the screen page, with computer, and the hot keys page get a score.

Twelve documents with BM25 scores. Only D9 and D11 score, with 0 of the 2 relevant ones.

query termadded term (weight 0.5)score, top 3, relevant page (dot)wrong in top 3 (cross), missed (ring)added terms, feedback pages, query versions 2–4
rankdocumentBM25 score“computer gets too hot”the user querycomputer× 1idf 2.16gets× 1idf 3.26too× 1idf 3.26hot× 1idf 2.16D1Battery drains fast? Lower the screen…D2Battery tips: a cool battery is a battery…D3The laptop charges fast with the USB-C…D4My old laptop from school now shuts down with…D5Error E42 means the laptop cannot find the…D6Fix error E42: open the laptop, reseat the…D7Fan noise and overheating: clean the air…D8If the laptop feels warm, keep it on a desk…1D9Screen flickers? Restart the computer after…2.36D10Printer error E42: the paper tray is empty.2D11Hot keys: press Fn and F2 to dim the screen.2.17D12Keys stick? Clean the keyboard with dry air.the query12 help pagesscore(D9) = 2.36 (computer)rankdocumentBM25 score“computer gets too hot”the user querycomputer× 1idf 2.16gets× 1idf 3.26too× 1idf 3.26hot× 1idf 2.16D1Battery drains fast? Lower the screen…D2Battery tips: a cool battery is a battery…D3The laptop charges fast with the USB-C…D4My old laptop from school now shuts down with…D5Error E42 means the laptop cannot find the…D6Fix error E42: open the laptop, reseat the…D7Fan noise and overheating: clean the air…D8If the laptop feels warm, keep it on a desk…1D9Screen flickers? Restart the computer after…2.36D10Printer error E42: the paper tray is empty.2D11Hot keys: press Fn and F2 to dim the screen.2.17D12Keys stick? Clean the keyboard with dry air.the query12 help pagesscore(D9) = 2.36 (computer)
Toy: the 22.C1 help centre (12 pages, 2 of its queries) and one two-problem query; LLM text is fixed
STAGE 1 / 6
MATH · STAGE 1HOVER A SYMBOL OR A SHAPE
score(d)=∑t∈qidf(t) tf(t,d) (k1+1)tf(t,d)+k1 (1−b+b ∣d∣/avgdl)\sy{s}{out}{\text{score}(d)} = \sum_{\sy{t}{data}{t} \in q} \text{idf}(t)\,\frac{\mathrm{tf}(t,d)\,(k_1 + 1)}{\mathrm{tf}(t,d) + k_1\,(1 - b + b\,|d| / \mathrm{avgdl})}
score(D9)=2.36\text{score}(\text{D}_{9}) = 2.36

Each shared query word adds its rarity, damped by the document's length.

Common mix-ups

MYTHA rewritten query always finds more relevant documents.

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

Predict, then reveal
3 CHECKS · PRO
Q01For two problems, how many queries does fusion need to find all 3 relevant documents?

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.