24
Lesson 24 · 2 min
Embeddings: meaning as a map
An embedding turns a word or sentence into a list of numbers, so things with similar meaning sit close together.
Computers cannot compare meanings directly. So we convert text into numbers, called an embedding. Think of it as a position on a huge map.
On this map, "doctor" lands near "nurse" and "hospital", far from "football". "Cheap flights to Bangkok" lands near "low-cost plane tickets Thailand", even with no shared words.
This is how modern search finds what you mean, not just what you typed. It powers recommendations, duplicate detection, and lets chatbots find the right page in your documents.
Try it below: tap any word on the map to see its nearest neighbours, then try the word maths.
A map of meaning
An AI stores each word as a point. Words that mean similar things end up close together. Tap a word.
- Animals
- Food
- Vehicles
- Feelings
- Countries
- People
Tap any word to see its three closest neighbours.
Word maths: directions mean something too.
The dashed arrow is the step from “man” to “woman”. Take the same step from “king” and see where you land. This is how search and chatbots find things that mean the same, even when the words differ.
Do it now
Test meaning-based search
- 1.Explore the map above and find a word whose neighbours surprise you.
- 2.In your email or a notes app with AI search, search for an idea using different words than you wrote.
- 3.Notice whether it still finds the right item. That is embeddings at work.
Words from this lesson
- Embedding
- A list of numbers that captures what a piece of text or image means, so similar meanings get similar numbers.
- Vector database
- A database that stores embeddings so a system can quickly find the items closest in meaning to a question.
- RAG
- Having an AI look up relevant passages from your documents first, then answer using them, so replies are more accurate.