

0 / 2 embers
0 / 3000 xp
click for more info
Complete a lesson to start your streak
click for more info
Still calibrating
click for more info
Not enough gems
Cost: 6 gems
1: Semantic Search
incomplete
2: Embeddings
incomplete
3: Embedding Models
incomplete
4: Model Selection
incomplete
5: Vector Operations
incomplete
6: Dimensions
incomplete
7: Dot Product Similarity
incomplete
8: Cosine Similarity
incomplete
9: Why Cosine Similarity?
incomplete
10: Generating Text Embeddings
incomplete
11: Document Embeddings
incomplete
12: Query Embeddings
incomplete
13: Same Model
incomplete
14: Implementing Semantic Search
incomplete
15: Locality-Sensitive Hashing
incomplete
16: Vector Databases
incomplete
Back
ctrl+,
Next
ctrl+.
This lesson's interactive features are locked, please to keep using them
Vectors are lists of numbers that represent coordinates in space... cool. 2D space is easy: "3 units right, 2 units up" is [3, 2]. 3D is also pretty easy; we just add a z coordinate: "3 units right, 2 units up, 1 unit forward" is [3, 2, 1].
The problem is that two or three dimensions isn't nearly enough to represent much semantic meaning. Semantic embeddings often have 300+ dimensions.
Yes, I know there aren't 300 dimensions (that we know of?!) in the physical universe, but in the mathematical world of vectors, we can have as many dimensions as we want. It's still just a list of numbers.
"The Great Bear" → [0.2, -0.8, 0.1, 0.7, -0.3, ...]
"Ted" → [0.1, -0.9, 0.2, 0.6, -0.2, ...]
"Backcountry" → [0.8, 0.1, -0.5, 0.2, 0.9, ...]
These vectors might have 300+ dimensions, but the key idea is the same: distance in this space represents semantic similarity.
Visualizing 300 dimensions is basically impossible. Geoffrey Hinton, often considered the "Godfather of AI," suggested that the way to visualize 14-dimensional vectors is to visualize a 3D space and say "Fourteen!" to yourself very loudly... and we're dealing with way more than 14 dimensions here.