Glossary · 2 min

Embeddings: What They Are and How They Work

What are embeddings

Embeddings are numerical representations of data. An artificial intelligence model turns a text, an image or a sound into a vector, that is, a list of numbers, so that two similar items produce vectors that are close together. An embedding works like a fingerprint: you cannot rebuild the original from it, but you can compare it with others.

How they work

The model that generates embeddings has been trained on a huge number of examples and has learned which features matter. Two sentences that say the same thing in different words, or two photos of the same object taken from different angles, end up with similar numbers.

Each model produces vectors of a fixed length. To compare two items, you calculate the distance or similarity between their vectors: the closer they are, the more alike the items. That is why every item you want to compare must go through the same model.

What embeddings are used for

  • Search by meaning: finding documents that answer a question even if they do not share the same words.
  • RAG: giving a language model the fragments of your documents that best answer the query.
  • Visual recognition: identifying an object by comparing its image with others already registered.
  • Clustering and recommendations: grouping similar items or suggesting similar products.

Embeddings and vector databases

Embeddings are stored in a vector database, which is built to quickly find the vectors closest to a given one. When a query comes in, it is turned into an embedding with the same model and the database returns the most similar results with a similarity score. That score lets you set a threshold: if nothing passes it, the item is treated as unknown instead of forcing a match.

A practical advantage is that adding a new item means calculating its embedding and storing it. There is no need to retrain the model.

A simple example

A company wants its internal assistant to answer from its own manuals. It splits the manuals into fragments, calculates the embedding of each one and stores them. When an employee asks a question, the question is turned into an embedding, the closest fragments are retrieved and the language model answers based on them. That is how a RAG system works.

Embeddings to recognize dishes at a buffet

In MBO Smart Buffet, the system DPI built for MBO, Meta's DINOv3 model turns the photo of each tray into a 384-number fingerprint. The backend searches for that fingerprint in Qdrant, with a similarity threshold configurable per hotel, to find out which dish it is. The detector only learns what a tray is; the embedding works out the dish. That is why adding a new dish means photographing it, not retraining.

Frequently asked questions

It is a list of numbers that an AI model generates from a text, an image or a sound. Similar items produce embeddings that are close together.

Latest posts

Start today

Is there a process eating up your team's hours?

In a 30-minute demo we show you how it would work with your own documents and data.