Measuring meaning with one number
Dot product / cosine as an alignment score: multiply-and-add.
You've reached the end of the free preview. The next lesson needs your pass:
But these were just two numbers, a toy. A real embedding has hundreds. What do they hold?
1.7 A real embedding has 768 numbersCommon questions
What is "Measuring meaning with one number" about?
What question does this lesson answer?
What will I be able to do after this lesson?
What comes next?
What this lesson shows
Dot product / cosine as an alignment score: multiply-and-add.
The question it opens with
How does the machine measure how near two vectors are?
The walkthrough, in the lesson's own words
- Which word is most like cat? Tap your guess on the map.
- Rotate the arrow. When does the meter hit its peak?
- That shrinking shadow on the dial is the score.
- You'll meet this exact move again in attention and RAG.
- Every arrow here is length 1, so the score measures pure direction, it reaches 1 only when two arrows point the exact same way.
- Nearly 1, cat and dog point almost the same way (just 8° apart), the high score the dial's shadow shows.
- A support bot answers from your company docs and pulls in exactly the right paragraph out of thousands. How does it pick that one?
- It scores your question against every chunk with a dot product, the same multiply-and-add you just rotated, and grabs the highest. This is the retrieval step in RAG, and the same scoring drives attention inside the model.
- Multiply each coordinate, then add, every one is a small agree or disagree.
Key takeaway
Similarity is just multiply-and-add, and it returns in attention and RAG.
What you can do after this lesson
You can explain how a model measures meaning with a dot product.
Check yourself: What does the dot product of two word-vectors tell you?
- How aligned (similar) they are(correct)
- How many letters they share
- Which word is longer
- How common each word is
The dot product grows when two vectors point the same way, so it reads as how aligned, and therefore how similar, two words are.
Where it leads: But these were just two numbers, a toy. A real embedding has hundreds. What do they hold?
This is the written summary. The lesson itself is interactive: you predict, drag and operate the mechanism above, and the reveal answers you.