Embedding

Also called: vector embedding, text embedding

Filed under AI & modern tech

What Embedding means in practice

Embeddings come from an embedding model. A sentence goes in and a fixed-length list of numbers comes out, often hundreds or a few thousand numbers long. The individual numbers are not readable on their own; what matters is how vectors compare with each other.

You mostly meet the term in semantic search, RAG systems, recommendation engines and vector databases. If a search for “reset password” finds an article called “Forgot your login?”, embeddings are a likely reason.

One nuance: embeddings from different models are not interchangeable. If you switch embedding models, you generally need to re-embed all your content.

Embedding every help article so a search for “reset password” also finds the article titled “Forgot your login?”

Used in a sentence: We store an embedding for every support ticket so we can surface similar past issues.

Often confused with

Token
A token is a chunk of text; an embedding is a numeric representation of meaning. In everyday use, “embedding” usually means one vector for a whole sentence or document.
Vector database
A vector database stores and searches embeddings. The embedding is the data; the database is where it lives.
Keyword search
Keyword search matches exact words. Embedding search matches meaning, so it can find results that share no words with the query.

What are embeddings? →

How it works, examples, and common questions, explained in plain English.

Common questions

What does “embedding” mean in machine learning?

It means mapping something, such as a word, product or user, to a point in a space of numbers so that relationships between items become distances between points. The name reflects placing, or embedding, items inside that space.

What is an embedding model?

An embedding model is an AI model built to turn content into embeddings rather than to write text. It is usually smaller and cheaper to run than a chat model, and providers offer it through a separate API endpoint.

Sources and further reading

  1. Efficient Estimation of Word Representations in Vector Space (Mikolov et al., 2013) — arXiv
  2. Vector embeddings — OpenAI

Read more