06 · AI Fundamentals Lab

How does a computer know that two words mean nearly the same thing?

It turns each word into a list of numbers — a position in space — and then simply measures the distance. Move between words here and watch “firewall” land next to “router” and nowhere near “fire”, even though it is spelled out of “fire” and “wall”.

What you are looking at. This page uses a small hand-built, illustrative vector space: 40 words, each given 7 numbers by hand. Nothing here is live model output. But every similarity, ranking and position on this page is computed for real from those numbers — the arithmetic is exactly what a production system does.
What the seven dimensions mean

Each word gets one number per dimension, from −1 (strongly not this) through 0 (nothing to do with it) to +1 (strongly this).

The honest caveat, up front: these seven dimensions were invented so that you can read them. A real embedding model uses hundreds or thousands of dimensions, learned from text, and none of them has a name a human would recognise — meaning is smeared across all of them at once. What carries over is everything else on this page: the numbers are coordinates, and similarity is the angle between them.

Pick a word, meet its neighbours

Hand-built illustrative space — the ranking below is computed live from the seven numbers, not from live model output.

Quick picks

The 7 numbers

This is the whole word, as far as the computer is concerned. Bars to the right of the centre line are positive, bars to the left are negative.

−10+1

Nearest neighbours

Ranked by cosine similarity: 1.00 means the two lists of numbers point in exactly the same direction, 0.00 means they are unrelated, and a negative score means they point opposite ways.

Embeddings turn meaning into coordinates, so “close together” becomes something a computer can measure.

Search, clustering, deduplication and every RAG retrieval step are the same move underneath: place things in space, then measure the distance. Judge an embedding model by whether the things your users would call similar actually land near each other in your domain — not by how many dimensions it has.

My observations

Kept in this browser tab only, for this session.