Embedding

noun /ɪmˈbɛdɪŋ/ machine learning

Definition

An embedding is a learned numerical representation of an object—such as a word, sentence, image, user, or product—as a point in a multidimensional vector space.

What it represents

Instead of storing an item only as a name or identifier, an embedding expresses useful features and relationships as a sequence of numbers. Items that are similar in meaning or behavior are generally placed near one another in the vector space, while unrelated items are placed farther apart.

How it is created

A machine-learning model learns embeddings from examples. During training, it adjusts the vector values so they become useful for a particular objective—predicting surrounding words, matching questions with answers, recognizing images, or recommending products. The individual dimensions usually do not have simple human-readable labels; meaning is distributed across the vector as a whole.

Similarity and retrieval

Once objects are embedded, their semantic similarity can be estimated mathematically. Measures such as cosine similarity, dot product, or Euclidean distance compare their vectors. Vector databases use these measurements to retrieve the nearest items efficiently, even when the user's wording does not exactly match the stored text.

Common uses

  • Semantic search that retrieves results by meaning rather than exact keywords.
  • Retrieval-augmented generation, where relevant documents are selected before an AI model answers.
  • Recommendation systems that match users with products, music, films, or other content.
  • Clustering, classification, anomaly detection, deduplication, and visualization.

Example

The sentences “How do I reset my password?” and “I cannot access my account” share few exact words, but a good text-embedding model places them close together because they express related intent.