How AI turns words into numbers that capture meaning, so a “vendor proposal” and a “supplier quote” end up close together.
After tokenising, each word is just an ID number, like a file number. Embeddings give each word a position instead, so related words sit close together.
A hospital analogy. A file number such as Patient #4827 is useful for filing and tells you nothing else. Two consecutive numbers may have nothing in common. An embedding is closer to a seating plan where people with similar needs sit together.
Where do the positions come from? The model learns them by reading a huge amount of text. Words that appear in similar company, such as “vendor” and “supplier” near “proposal” and “contract”, end up close together. Nobody places them by hand.
What it makes possible. Searching by meaning, finding passages that answer a question, grouping similar documents, and spotting things that look unlike the rest.
The IDs and positions on this page are illustrative examples.
The older approach gave each word one switch in a huge row. Embeddings use a compact list of numbers where every one carries meaning.
The numbers in the embedding rows are illustrative. Real embeddings are typically hundreds to a few thousand numbers long, and no single number has a meaning a person can read.
Drag to rotate, scroll to zoom, and click a word to see its closest neighbours.
It is a simplified picture. Real embeddings have hundreds to a few thousand dimensions, and a person cannot see that. Techniques that flatten them to three dimensions keep neighbours roughly together but distort the exact distances.
The word positions here are hand-placed for teaching. They are not output from a real model.
The question and every passage become positions on the map. The passages closest to the question score highest.
Closest passages · longer bar = closer in meaning · illustrative scores
Click any result to see why it scored the way it did.
| Measure | In plain words |
|---|---|
| Cosine similarity | Compares the direction two lists of numbers point in. Closer to 1 means more similar. A common choice for text. |
| Straight-line distance | How far apart the two positions are. Smaller means more similar. |
| Dot product | Multiply and add. Larger means more similar. |
Example pairs (illustrative scores, 0 to 1): vendor and supplier 0.92 · budget and expenditure 0.88 · leave entitlement and annual leave allowance 0.84 · PDPA and data protection 0.79 · vendor and contract 0.71 · vendor and patient 0.18 · vendor and scalpel 0.08.
Meaning-based matching is what lets a question find the right part of a document in your Space, even when the wording is different.