Concepts
Embedding models
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.
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.
Follow three inputs from encoding to nearest-neighbour retrieval.
- 1 · inputProvide text to the embedding model.
- 2 · encodeCalculate one fixed-size vector representation for each input.
- 3 · compareMeasure vector relatedness with a similarity or distance function.
- 4 · retrieveReturn candidates whose vectors are closest to the query vector.
Embedding similarity calculation is very fast.
| Who | What they ask | What 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 |
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.
- officialEmbeddings guide, OpenAI · read 28 Sept 2026
- officialGemini embeddings, Google AI for Developers · read 28 Sept 2026
- paperSentence-BERT - Sentence Embeddings using Siamese BERT-Networks, Reimers and Gurevych · read 28 Sept 2026
- paperDense Passage Retrieval for Open-Domain Question Answering, Karpukhin et al. · read 28 Sept 2026
- officialSentenceTransformer usage, Sentence Transformers · read 28 Sept 2026