Act 2 · Lesson 7 of 21≈8 minutes○ Saves on this device

The Map Where “King” Lives Near “Queen”: Embeddings

By the end you'll be able to

  • Explain that tokens are represented as positions in a learned space where distance ≈ similarity of use.
  • Explain that the positions were learned from context in the diet, not assigned by definition.
  • Predict the consequence: similar-meaning texts can be found with zero shared keywords.
⚡ 30-second warm-up: reaching back to Act 1, Lesson 2, what makes a topic “thin ice” for an AI assistant?

Little was written about it before the training data was collected: think niche funders, internal policies, local detail. Fluency stays constant; evidence doesn't.

Revisit Lesson 2

Meaning as a place on a map: see how machines find related ideas without sharing a single keyword.

Start with a quiet superpower

This machine has never seen a dictionary. Yet it treats "puppy" as close to "kitten" and far from "engine". It can even tell that "I can't afford the fees right now" belongs with "financial hardship support". Where could that live?

Commit to a prediction

How does it judge that two phrasings mean similar things?

This lesson changes one thing: you'll stop thinking "AI matches keywords". Instead, picture it placing meaning on a learned map. Distance on that map is how related things get found, even with zero shared words.

Discover the mechanism

How it works Coordinates for meaning

Inside the machine, each token is a long list of numbers: coordinates in a space with hundreds of dimensions. Training (Lesson 5) nudged those coordinates so that tokens appearing in similar contexts drifted close together. The result is a geography nobody designed: fruits cluster, cities cluster, and the direction from “Canberra” to “Australia” resembles the direction from “Paris” to “France”. These coordinate-lists are called embeddings.

Whole sentences get coordinates too. That's how a computer can measure that “My laptop won't turn on” sits near “Computer fails to boot”, despite the two sharing almost no words. This single trick powers semantic search, document matching, and the retrieval systems coming in Act 3.

Remember what the distances actually measure: patterns of usage in the training diet, skews and all (Lesson 2). Nearness means "used similarly", and that's not the same as "means the same thing": "hot" and "cold" are close neighbours. The map inherits the world's habits, including its prejudices, a seed that grows into Act 4 (see the map below).

The map below is flattened to two dimensions from hundreds: a necessary lie. In real high-dimensional space, a word can sit near many unrelated neighbourhoods at once, which no paper map can show. And modern embeddings shift with context: “bank” moves toward rivers or money depending on its sentence. The mechanism that moves it is Lesson 8.
Useful mental model The unzoned city

Picture a city where businesses cluster by trade: a legal district, a restaurant strip, a medical precinct, all with no zoning authority. The clustering emerged from countless individual decisions. Directions matter too. The walk from “king” to “queen” points the same way as the walk from “prince” to “princess”.

  • Businesses = words and concepts. Locations = embedding coordinates.
  • Districts = semantic clusters. No zoning authority = learned from data, not assigned.
  • Where it breaks: real cities have two dimensions. This space has hundreds, and "same district" means "used alike", never "endorsed" or "true".

Explore the map yourself

Conceptual illustration: a hand-flattened 2-D sketch of a real idea. Actual embedding spaces have hundreds of dimensions. Choose a word to see its nearest neighbours, then try the two sentence pairs below; one of them is a trap.

A flattened map of word meanings Scatter of words in loose clusters: animals lower left, medical upper left, education upper middle, food lower middle, cities upper right, finance and grants lower right. Selecting a word highlights it and its nearest neighbours.

Sentence similarity (the payoff — and the trap)

Where this bites at work

In the field · Zane

A prospective student writes: “I can't afford the fees right now.” Zane's enquiry system surfaces the financial-hardship support pathway anyway: zero shared keywords, same place on the map. That's embedding search behind an everyday workplace tool, demystified.

His new habit when searching with AI tools: describe what you mean, rather than guessing at magic keywords. The map rewards description.

Now make the call

A colleague reviews Zane's enquiry system and objects: “It returned a result with no matching keywords; the search is broken. Switch it back to exact keyword matching.” What does Zane do?

Apply it to your work

This week, at your desk

Next time you search a knowledge base, CRM, or shared drive with an AI-powered tool, describe what you mean in a full sentence instead of guessing keywords. Note whether the matches improve. You're now using the meaning map deliberately.

Print the AI fact-check checklist

Prove it to yourself

Two quick questions, untimed and retryable. They count toward ★ Mastered (completed, decision, and self-check all correct). This is what stops the feeling of "that made sense" evaporating by next week.

Explain it in your own words

Write two or three sentences for a colleague. Then compare against the rubric below; it checks ideas, not wording. Only you see your note.

  • Mentions the map or space: meaning as coordinates
  • Connects distance to similarity of use
  • States the payoff: matching meaning without matching words

Evidence & review — how we know what this lesson claims
Claim register for Lesson 7
ClaimTypeBasisReview risk
Embeddings place tokens in a learned vector space where proximity tracks distributional similarityHow it worksPrimary research literatureLow
Sentence-level embeddings enable matching without keyword overlapHow it worksPrimary research and production practiceLow
The map inherits skews from the training dietHow it works (empirical)Bias research literatureMedium
This page's 2-D map and similarity scoresTeaching deviceHand-flattened illustration, labelledMedium
The unzoned-city analogyUseful mental modelLimits stated in the lessonLow

Concept review due: January 2027. Product-behaviour claims: quarterly.

Where you are in the machine

You're deep in the engine now: this is the meaning-map layer that Act 3's search tools will reuse. Select any layer for details.

The machine, bottom to top: training data (2) → token pieces (3) → prediction engine (1, 4–9) → the desk (10–11) → senses (12) → live knowledge (13) → tools (14) → memory (15) → agent loops (16) → human judgement (17–21).

Next: the map learns to move

One puzzle remains: “bank” must sit near rivers in one sentence and money in another. Something decides which context matters, and it has the most famous name in modern AI. Lesson 8: attention.