Under the hood · 3 of 8

How does a model know a coach is like a bus?

A model keeps every word piece as a list of numbers, and words used in similar places get similar lists. Here those lists are learned in your browser from 44 short sentences: count which words appear near which, then squeeze the counts into a few numbers per word.

Learned from 44 sentences about buses, food, animals, weather and places:

One word, as numbers

A map of all 87 words

Their numbers flattened to two directions. Words that sit close are used alike; shaded islands are the five topics. Click a word, or point at a dot.

Search six notices, two ways

More numbers per word, until it stops helping

Solid: a word's 3 closest share its topic. Dashed: meaning search puts the right notice first.

By meaning By shared words Your word and its closest
Numbers per word (dimensions): 6 1 to 32
Pick a word in the first panel or on the map, and a question in the search. Words the 87-word vocabulary never saw are skipped.

Loading the engine…

Numbers per word

–

Out of 87 directions the counts could keep.

Neighbours on topic

–

A word's 3 closest words share its topic.

Meaning search

–

Questions whose right notice comes first.

You know a word by its neighbours

Count which words appear near each word. Bus and coach both appear near ticket, driver and station, so their counts look alike.

Squeeze the counts into a few numbers

The count table has a column for every word. Breaking it into its main directions keeps the pattern in a handful of numbers per word: its embedding.

Close in numbers, close in use

Two words whose numbers point the same way are used alike. The angle between them (cosine similarity) is the measure most meaning searches use.

The trap

Close in numbers means used alike, which usually lines up with meaning alike. Opposites like early and late appear in the same kinds of sentence, so they end up neighbours too: try "early" above.

Open Under the hood for the three steps that turn sentences into numbers.

Why knowing this helps you

Embeddings power search by meaning, in your own tools and in local document setups. A few things to know when you rely on them.

Search by meaning

Embedding search finds passages that say the same thing in other words. It is what lets a document assistant answer "earliest coach" from a page about the first bus.

Mind the opposites

Words used in the same places sit together even when they mean opposite things. Check meaning-search results where early and late, or allowed and banned, both match.

Same model, same space

Vectors from different embedding models do not line up. Search with the same model that embedded your documents, and re-embed everything when you switch.

Mix it with keywords

Names, codes and exact numbers match better by keyword. Many setups run both searches and combine the results.

Checked on 2026-10-06 against Levy and Goldberg (2014) on counting and prediction reaching the same space, the Qwen3 Embedding report on how search embedding models are trained, and Anthropic's Contextual Retrieval post on mixing keyword and meaning search.

Where this goes next

Next: sampling settings

At the other end, the model turns its numbers back into odds for every token. Settings decide which one it picks.

Then: LoRA

Settings change how it picks. To change what it knows, you change the model itself, without retraining all of it.

Every count, vector, similarity and map position on this page comes from a C engine compiled to WebAssembly, learned in your browser from the 44 sentences above. Real models learn far richer spaces from far more text.