Log inStart free
LESSON 22.05 · 6 STAGES · 2 CONTROLS · 3 CHECKSPRO · PREVIEW

Embedding spaces

Watch texts become arrows, then compare them by length and by angle.


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

Go Pro · $8.25/mo
EXPLAINER · 22.05 · EMBEDDINGS3 OF 7 WORDS KNOWN · 6 DIMENSIONS
01
Stage 1 of 6 · Words add up
Each known word adds a row of 6 numbers. The sum is the question's text embedding.
Explain it simply

On the right, each word of the question looks up its row in a word table. A word like how or the has no row, so it adds nothing. The question's embedding, its list of numbers, is the sum of the rows. Each number tells how strongly the text is about one concept.

The question has 7 words. 3 words are in the table. Their rows add up to the question row.

question, texts, word rowsscores, best textdashed cell: 0length 1
the question rowbrewwatercleanscalewarrantytimeq question0.300.201.100.101.00words of the questionbrewwatercleanscalewarrantytimehowoften1.00shouldidescale0.201.00themachine0.300.100.10the question rowbrewwatercleanscalewarrantytimeq question0.300.201.100.101.00words of the questionbrewwatercleanscalewarrantytimehowoften1.00shouldidescale0.201.00themachine0.300.100.10
Toy: the Brew Mini word table, 6 concepts, 7 texts
STAGE 1 / 6
MATH · STAGE 1HOVER A SYMBOL OR A SHAPE
q=∑wew\sy{q}{data}{\mathbf q} = \sum_{w} \sy{w}{data}{\mathbf e_w}
q=(0.30, 0.00, 0.20, 1.10, 0.10, 1.00)\mathbf q = (0.30,\,0.00,\,0.20,\,1.10,\,0.10,\,1.00)

The question vector is the sum of its word vectors.

Common mix-ups

MYTHThe highest dot product always means the closest meaning.

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

Predict, then reveal
3 CHECKS · PRO
Q01Ask about weak coffee with 6 dimensions. Which text gets the highest cosine?

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 2 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.