Skip to content
Sign in

Lab

Embedding Explorer

Enter sentences and see their positions in a vector space.

An embedding turns text into a vector so that distance in space stands in for difference in meaning. Type phrases (one per line), watch where they land in a 2D projection, and inspect how similar the model considers each pair.

123456

Points are numbered as in the list. The focused phrase is solid; its nearest neighbour is half-toned. Axes are the top two principal components, directions, not units.

1
2
3
4
5
6

Cosine similarity measures the angle between two vectors: near 1 means they point the same way (similar), near 0 means unrelated. Distance in the plot approximates that relationship.

Honest note: this lab embeds text with character-trigram feature hashing, a real technique, but one that captures surface similarity (shared letters, morphology like run/running), not learned meaning. A trained embedding model would place true synonyms close together even with no letters in common. Vectors here are deterministic, so the same phrase always lands in the same place.

Challenge

Add three lines: run, running, and sprint. Which two does this lab rank as most similar, and why is sprint (a true synonym of run) left out? What would a real, trained embedding model do differently?