An embedding is a representation of data — such as words, sentences or images — as a vector of real numbers in a continuous, multi-dimensional space. Its key property: semantically similar objects lie close together in this space, dissimilar ones far apart. This lets a model process meaning and relationships numerically, since algorithms require numbers rather than raw strings.
The concept was popularized by Word2Vec (Mikolov et al., 2013), which introduced efficient methods for computing continuous word vectors from large datasets. The resulting vector analogies, such as "king − man + woman ≈ queen", became famous. Modern, transformer-based models like BERT, by contrast, produce contextual embeddings, where the same word receives a different vector depending on its context.
Embeddings underpin semantic search, recommendation systems and RAG: there, documents are stored as embeddings in a vector database and retrieved by similarity to the query.