When a customer writes “the boiler is losing water” and the manual talks about a “leak in the circuit”, a keyword search finds nothing: they don’t share a single word. Embeddings are the way to search by what a text means rather than how it’s written. Here’s what they are, how similarity is measured, a measured example with field service sentences, what they’re for and where they fail.
In short
- An embedding turns a text into a long list of numbers, in the hundreds or thousands.
- Texts about the same thing end up with similar numbers, even if they share no words.
- Similarity is measured with cosine similarity, from 0 to 1 in practice.
- It measures what a text is about, not whether it says the same: in our test, the opposite sentence came out as the closest.
- They’re stored in a vector database and are the search piece of classic RAG.
What is an embedding?
IBM defines it as a way of representing objects, like text, images or audio, as points in a space with many dimensions, so that their position is meaningful to an algorithm: what’s similar ends up close. In practice, a text embedding is a list of decimal numbers. Microsoft’s documentation explains it like this:

Each number is a coordinate, and each text is a point. Google’s Machine Learning Crash Course illustrates it with dishes placed according to how much of a sandwich, a dessert or a liquid they are: shawarma ends up near the hot dog and far from borscht. And it warns that in a real embedding the dimensions are rarely that understandable: usually nobody can say what number 412 on the list means, only that the distance between two points works as a measure of how alike they are.
The idea isn’t new. IBM recalls that Google published word2vec in 2013, an efficient way of computing embeddings for single words in which synonyms ended up together. Google’s course explains why it works: “horse” and “burro” appear in similar sentences, like riding one down into the canyon, and from that the model infers they mean something similar. Today’s models do the same with whole sentences and documents.
What does it look like with real sentences?
We measured it. On November 14, 2026 we asked a commercial embeddings model for the numbers of six field service sentences, in a single call, and calculated how similar each one is to the first. Each sentence became 1,536 numbers; these are the first of the first sentence, and the similarity of the others, from highest to lowest:
The sentence
“The boiler won’t fire”
Its first numbers, out of 1,536
−0.0286 · 0.0224 · −0.0243 · −0.0009 · −0.0247 · 0.0027 · …
How similar, from 0 to 1
- “The boiler fires up fine now”says the opposite0.71
- “The heating won’t come on”says the same, in other words0.68
- “The boiler is making a strange noise”another boiler fault0.59
- “I’ve been charged twice on my invoice”another topic0.22
- “What time does the office open?”nothing to do with it0.08
The bottom two come out as you’d expect: a billing complaint and a question about opening hours are far from a breakdown. The interesting part is at the top. The sentence that says the same thing in other words, “the heating won’t come on”, scores 0.68, ahead of another boiler fault, so the embedding did understand that boiler and heating go together even without shared words. But the closest of all, at 0.71, is the one that says exactly the opposite. We ran the same test in Spanish and the opposite sentence came first there too, by a wider margin.
How is similarity measured?
The most common way is cosine similarity. Microsoft explains it as the cosine of the angle between two vectors: it doesn’t look at how far apart two points are, but at whether they point in the same direction. It’s 1 when they point the same way, 0 when they have nothing to do with each other, and with text embeddings it almost always lands between the two, as in the example above.
Microsoft also explains why it’s used instead of counting words in common: with long documents, two texts on different subjects end up sharing many words, and the count stops telling them apart. The angle, by contrast, doesn’t depend on the length of the text. There are other measures, like Euclidean distance, the ordinary distance between two points, which IBM mentions as alternatives.
What are they for?
IBM lists the main uses: search by meaning, recommendation systems, sentiment analysis, fraud detection and, the one heard most now, RAG, the technique of searching the documents before a model answers. In classic RAG, each chunk of the documents is turned into an embedding and stored; when a question comes in, it’s turned into one too and the closest chunks are found.
In a field service company, that makes it possible to find the section of the manual that covers what the customer describes even when they put it in their own words, to search past jobs for ones similar to the request that just came in, or to group a year of complaints by reason without reading them one by one. In all three, the embedding does the first sift and something, a person or a model, reads what it found.
Embeddings are stored in a vector database, a database built to quickly find the points closest to another among millions. You no longer need a separate one: Microsoft lists its SQL database and PostgreSQL among those that do it as one more feature.
What are their limits?
The first is the one in the example: they measure the subject, not the exact meaning, and a negation or a nuance can slip through. The second is that the numbers depend on the model that computes them. One model’s numbers can’t be compared with another’s, so changing model means recomputing every stored document.
The third is that similarity search returns loose chunks. If a procedure is spread over three paragraphs, only one may come back, the one most like the question, and the model may answer with half the information. That’s why a good search system isn’t accepted without testing it on real questions and looking at what it finds.
Embeddings or an index?
With thousands of documents, searching by similarity is the only practical way to find anything. With dozens, like the procedures, rates and manuals of a field service company, there’s another option that AI agents have made possible: give the agent an index of what’s there and let it decide what to open, as a person would with a binder.
That’s what Delegic does. Each company document carries a line saying when to read it, the agent reads that index and opens the whole section it needs, instead of a chunk that looks like the question. The comparison between the two, with its diagram, is in what is RAG.
Frequently asked questions
What does embedding mean?
The text is “embedded” in a space of numbers. It’s also called a vector representation.
How many numbers does an embedding have?
It depends on the model. The one in our example gives 1,536 per sentence; there are models with fewer and with more, and the more it has, the more space it takes to store them.
Is an embedding the same as a token?
No. A token is a piece of text, like a word or part of one, which is how a model reads text. An embedding is the list of numbers that represents the meaning of a whole text, a word or a sentence.
What is cosine similarity?
The most common way to measure how similar two embeddings are: the cosine of the angle between the two vectors. The closer to 1, the more alike they are.
Related terms
- RAG: searching the documents before answering.
- Vector database: where embeddings are stored.
- LLM: the model that reads what the search finds.
- Token: the piece of text a model works with.
- Knowledge base: the documents being searched.