Concepts

Embedding models

3 min readbeginnerUpdated 28 Sept 2026
1 · In one line

An embedding model maps an input to a numeric vector whose distance from another vector can measure relatedness.

1 · What it is

Embedding models convert inputs into vectors that can be compared. OpenAI states that distance between two vectors measures their relatedness.

In Dense Passage Retrieval, each passage has its own dense representation. The system retrieves the passages whose representations are closest to the question representation.

The same pattern also supports clustering and classification. Some embedding models map several supported modalities into one shared embedding space.

2 · Why it exists

Embeddings are used for search, clustering and classification.

Compare meaningSentence-BERT creates sentence embeddings that can be compared with cosine similarity.
Retrieve passagesDense Passage Retrieval uses learned dense representations in a dual-encoder framework.
Share a spaceGemini embedding models can map supported modalities into the same embedding space.
3 · How it works

Follow three inputs from encoding to nearest-neighbour retrieval.

The embedding model calculates a fixed-size vector for each input.
  1. 1 · inputProvide text to the embedding model.
  2. 2 · encodeCalculate one fixed-size vector representation for each input.
  3. 3 · compareMeasure vector relatedness with a similarity or distance function.
  4. 4 · retrieveReturn candidates whose vectors are closest to the query vector.

Embedding similarity calculation is very fast.

4 · Where it's used
WhoWhat they askWhat it works with
Search engineer“Which passages are semantically closest to this query?”Vector similarity
Data analyst“Which items form related groups?”Embedding clusters
RAG developer“Which stored passages should be retrieved before generation?”Dense retrieval
5 · What it solves, and what it doesn't
solves
  • Embeddings provide numeric representations for similarity search.
  • Dual encoders can encode queries and passages for dense retrieval.
  • Supported modalities can be mapped into a shared embedding space.
doesn't solve
  • SQuAD was the exception to DPR consistently outperforming BM25 in its reported comparison.
  • Dense Passage Retrieval reports that its reader had reached human accuracy while its retriever still lagged behind.
6 · Go deeper

Sources used

This explainer is written in original language. The links below support its factual claims.

  1. officialEmbeddings guide, OpenAI · read 28 Sept 2026
  2. officialGemini embeddings, Google AI for Developers · read 28 Sept 2026
  3. paperSentence-BERT - Sentence Embeddings using Siamese BERT-Networks, Reimers and Gurevych · read 28 Sept 2026
  4. paperDense Passage Retrieval for Open-Domain Question Answering, Karpukhin et al. · read 28 Sept 2026
  5. officialSentenceTransformer usage, Sentence Transformers · read 28 Sept 2026