This is the invisible building block behind smart search, recommendation and RAG. You will probably never handle one directly, but understanding the principle explains why some tools find what you are looking for even when you use different words.
Definition
An embedding is the translation of a text into a series of numbers representing its meaning. Two texts close in meaning produce close series, even with no words in common.
The underlying idea is that every text can be placed on a map. "Unpaid invoice" and "payment reminder" end up side by side. "Unpaid invoice" and "pie recipe" end up at opposite ends. That map has hundreds of dimensions instead of two, but the principle of distance is the same.
This is what separates meaning-based search from keyword search. A classic engine looking for "refund" ignores a paragraph about "return of sums paid". An embedding search finds it.
What it is actually for
| Use | What it gives you |
|---|---|
| Internal search | Finding a document by subject, not by exact words |
| RAG | Selecting relevant extracts before answering |
| Automatic classification | Sorting incoming requests by theme without hand-written rules |
| Duplicate detection | Spotting two product records describing the same thing differently |
| Recommendation | Suggesting content close to what was just viewed |
What these share: they all rest on comparison, never on generation. An embedding writes nothing, it measures closeness.
What to know before using them
They are far cheaper than generation. Turning a text into an embedding costs a fraction of a written answer. That is what makes RAG economically viable.
An embedding model is not swapped lightly. Your whole base has to be recomputed with the same model, otherwise the distances stop meaning anything. It is a commitment.
They are stored in a suitable database. Vector databases exist for this: quickly finding nearest neighbours among millions of entries.
Closeness in meaning is not relevance. An extract can be close to the subject without containing the answer. This is why a good RAG system returns several extracts rather than one.
Frequently asked questions
Do you need to understand the mathematics?
No. Remember the map and the distance: two texts close in meaning are close on the map. That is enough to make the right tooling decisions.
Can an embedding be converted back into text?
Not faithfully. It is not reversible encryption. Research has shown, however, that part of the original content can sometimes be reconstructed: an embedding of sensitive data must therefore be protected like the data itself.
Do embeddings handle several languages?
Multilingual models place a French sentence and its English translation at almost the same spot on the map. That is very useful for searching a bilingual corpus with a single query, provided you chose a model designed for it.
Where does this get used in a real project?
Almost always inside a RAG system, rarely on its own. It is the complete assembly you need to learn to tune, and our n8n course builds it step by step rather than staying theoretical.