Free concept playground · no account

Meaning Map

King minus man plus woman, mapped and clickable.

Meaning Map

AvailableFree

Pick three words. The map computes A − B + C on precomputed word vectors and lands the result next to its nearest neighbour — turning “king − man + woman ≈ queen” into a coordinate you can read, not a metaphor.

+=queen
kingqueenmanwomanprinceprincessboygirlfranceparisitalyromegermanyberlinspainmadridjapantokyo
Nearest to [0, 3, 3]
  1. queen0.000
  2. princess1.000
  3. girl3.162
  4. prince4.359
The vector math behind the meaninga coordinate, not a metaphor

Each word is a point in space. The engine did literal arithmetic: vec(king) − vec(man) + vec(woman) = [0, 3, 3], then measured the straight-line (Euclidean) distance to every other word. The closest one — queen at 0.000 away — is the analogy’s answer.

That is all “semantic search” is: relatedness is direction and distance, so meaning becomes a subtraction. Move the same offset (kingman) onto a new word and you jump to the matching neighbour — royalty keeps its gender, a country keeps its capital.

Share on WhatsApp
Was this playground useful?

Meaning Map

Pick three words and watch the map do the arithmetic that every AI search engine runs silently: A − B + C. On a set of precomputed word vectors, king − man + woman lands exactly on queen, and paris − france + italy lands on rome — not by magic, but because each word is a point in space and meaning is a direction you can subtract. You see the target coordinate, the straight-line distance to every other word, and the nearest neighbour that answers the analogy. Runs entirely in your browser (0 uploads, works offline).

How to use it

  1. Load a preset — king − man + woman or paris − france + italy — or pick your own A, B, C from the dropdowns.
  2. Read the equation bar: it shows A − B + C = the nearest word the math produced.
  3. Look at the map: your three input words, the amber target marker where the arithmetic landed, and the dashed line to its nearest neighbour.
  4. Scan the ranked list to see the top four neighbours and their exact Euclidean distances, then open the X-ray to see why the offset works.

What this clears up (the fundamentals)

  • A word is a coordinate, not a string — an embedding turns each word into a point in vector space, so "similar" becomes a measurable distance instead of a vibe.
  • Meaning is a direction you can do algebra on — the offset king − man is roughly the "royalty without the gender" vector; add woman and you arrive at queen. Same trick moves a country to its capital.
  • "Semantic search" is just nearest-neighbour — find the closest points to a query vector. That is the whole engine behind retrieval, RAG, and recommendation, minus the marketing.
  • Distance is the score — the ranked list is sorted by Euclidean distance; the smallest number is the best match. No model is deciding — geometry is.

Where it's used

This is a miatz build-lab concept playable: play the analogy here, then learn to build the embedding lookup, the vector-arithmetic step, and the nearest-neighbour ranking yourself. It sits inside AIE-202's embeddings & vector stores sub-module as the fastest way to feel why retrieval systems work before you wire one up.

FAQ

Why does king − man + woman equal queen?

Because the vectors are placed so that king = royalty + male and queen = royalty + female. Subtracting man removes the "male" part and adding woman adds the "female" part, leaving royalty + female — which is exactly queen's coordinate.

What is the distance number in the ranked list?

The straight-line (Euclidean) distance in the 3D space between the target coordinate and each word. Smaller means closer in meaning; the top of the list — distance 0 for the exact analogies — is the answer.

Are these real word embeddings?

No — they are a small set of hand-chosen vectors designed to make the classic analogies land cleanly and stay readable. Real embeddings have hundreds of dimensions and are learned from text, but the arithmetic and nearest-neighbour idea are identical.

Why are only three words allowed in the analogy?

Analogy arithmetic is defined as A − B + C: take a relationship (A minus B) and apply it to a new word (C). Three inputs are all the "king is to man as ? is to woman" pattern needs.

Is anything uploaded?

No. Every step — the subtraction, the distances, the ranking — happens in your browser against baked-in vectors. Nothing is transmitted, stored, or logged. Turn off your Wi-Fi and it still works.

Limits

This runs on precomputed, illustrative vectors — about eighteen words in three dimensions, hand-placed so the textbook analogies resolve exactly. It is a teaching model, not a live embedding model: you cannot type arbitrary words, dimensions are collapsed to make the picture legible, and real-world embeddings encode far messier relationships. The concept it makes visible — meaning as coordinates, similarity as distance — is exactly what production retrieval systems rely on.

Related

Part of the Demystify Playgrounds. Explore the rest from the Playgrounds home.

Bookmark this page (Ctrl+D, or ⌘D on Mac) — it works offline the next time you need it.

Ninety playgrounds. Zero setup.

Every concept here is playable free, no account — and inside the program you learn to rebuild the machinery yourself.