Log inStart free
LESSON 22.14 · 5 STAGES · 3 CONTROLS · 3 CHECKSPRO · PREVIEW

HyDE

An LLM writes a made-up answer, and its vector finds the real document.


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

Go Pro · $8.25/mo
EXPLAINER · 22.14 · HYDE BAYDIRECT TOP LAPTOP REPAIR 0.47
01
Stage 1 of 5 · Ask directly
Each text becomes a tf-idf vector, one cell per word. The question's best match is Laptop repair, a wrong document.
Explain it simply

Each text turns into a row of cells, one cell for each word the search knows. Bold words count, and grey words drop out. A stronger shade means the word weighs more. When a question and its answer use different words, the boxed best match can be the wrong document.

The question row and 6 document rows. The question scores 0.47 with Laptop repair, a wrong document.

question, documentsanswers, search, scoreswrong pickquestion alone
the question alonecosinequestionWhycan'tmylaptopreachtheofficenetworkfromhome?VPNInstalltheVPNclient, signin, andpickagateway.✓Remote workStaffmayworkfromhometwodaysaweek.ExpensesSubmiteachreceiptintheexpenseportalwithin30daysforarefund.Laptop repairIfalaptopbreaks, thehelpdeskshipsaloanerlaptop.KestrelKestreldeploysaservice: runkestrelpushandwatchthecanary.Parental leaveParentsgetsixteenweeksofpaidleave.0.000.340.000.470.000.00the question alonecosinequestionWhycan'tmylaptopreachtheofficenetworkfromhome?VPNInstalltheVPNclient, signin, andpickagateway.✓Remote workStaffmayworkfromhometwodaysaweek.ExpensesSubmiteachreceiptintheexpenseportalwithin30daysforarefund.Laptop repairIfalaptopbreaks, thehelpdeskshipsaloanerlaptop.KestrelKestreldeploysaservice: runkestrelpushandwatchthecanary.Parental leaveParentsgetsixteenweeksofpaidleave.0.000.340.000.470.000.00
Toy: 6 documents · TF-IDF encoder · LLM answers written in advance
STAGE 1 / 5
MATH · STAGE 1HOVER A SYMBOL OR A SHAPE
cos⁡(q,d)=q⋅d∥q∥ ∥d∥\cos(\sy{q}{data}{q}, \sy{d}{data}{d}) = \frac{q \cdot d}{\lVert q \rVert\, \lVert d \rVert}
cos⁡(q,dLaptop repair)=0.47\cos(q, d_{\text{Laptop repair}}) = 0.47

The cosine compares the directions of two vectors.

Common mix-ups

MYTHThe made-up answer must be correct to help.

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

Predict, then reveal
3 CHECKS · PRO
Q01For the network question with the question mixed in, does HyDE find VPN with 1 answer?

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

PRO LESSON · YOU WATCHED STAGE 1 OF 5
Unlock the full explainer
  • 4 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.