LIVEยทThe trends shaping tomorrow's world.
AI

Embedding Models Explained

Embedding models turn text into vectors so software can compare meaning. How they are trained, what dimensions mean, how MTEB works, and how to choose one.

An embedding model is a neural network that turns a piece of content, usually text, into a fixed-length list of numbers called a vector. The model is trained so that content with similar meaning lands close together in that vector space, which lets software compare meaning by measuring distance. Embedding models are the first step in semantic search and in retrieval-augmented generation (RAG): if the embeddings are poor, nothing downstream can fully recover.

What an embedding actually is

Think of an embedding as a set of coordinates. A sentence like "my laptop won't charge" becomes a point described by hundreds or thousands of numbers. A sentence like "battery not detected" becomes another point. A good model puts those two points near each other even though they share no words, and puts "charge a credit card" somewhere else.

No single number in the vector has a human-readable meaning. The meaning lives in the geometry: which points are near which. Software measures that with a similarity function. OpenAI's documentation, for example, ranks search results by the cosine similarity between query and document vectors [9]. The Sentence-BERT paper likewise designed its embeddings to be "compared using cosine-similarity" [1].

The idea is older than today's large models. In 2013, Mikolov and colleagues at Google showed that neural networks could learn useful word vectors from a 1.6-billion-word dataset in under a day [7]. Modern embedding models apply the same principle to whole sentences, passages and, increasingly, images.

How embedding models are trained

Most text embedding models today start from a pretrained Transformer (the same family of architecture behind large language models) and are then trained specifically to produce good vectors.

The bi-encoder idea

The key architectural choice is the bi-encoder: the query and the document are encoded separately, each into its own vector. That separation is what makes embeddings practical. You can embed millions of documents once, store the vectors, and at search time only embed the new query.

Sentence-BERT (SBERT), published at EMNLP 2019, made this concrete. Its authors noted that using plain BERT to find the most similar pair among 10,000 sentences takes about 50 million inference computations, roughly 65 hours. By modifying BERT with siamese and triplet network structures to produce standalone sentence embeddings, SBERT cut that to about 5 seconds while keeping BERT's accuracy [1].

Learning from pairs and negatives

Dense Passage Retrieval (DPR), from EMNLP 2020, showed how far a simple dual-encoder could go for question answering. DPR trains a question encoder and a passage encoder so that a question's vector scores highly, by dot product, against its correct passage [2]. A trick called in-batch negatives makes training efficient: within each training batch, the correct passages for other questions serve as wrong answers. The authors trained their main model with a batch size of 128 plus one extra BM25-retrieved negative per question [2].

The result was a dense retriever that beat a strong Lucene BM25 keyword system by 9 to 19 percentage points in top-20 passage retrieval accuracy on their benchmarks [2]. That paper is a big reason vector search took off.

Asymmetric inputs: queries are not documents

A search query is short and phrased as a need; a document passage is long and phrased as an answer. Many commercial models handle this by asking you to label the input. Cohere's API takes an input_type of search_query or search_document (plus classification and clustering), and Cohere says its embeddings are optimized for these different input types [10]. Voyage AI's API takes query or document; when set, it prepends a short instruction such as "Represent the query for retrieving supporting documents:" before embedding [11].

The practical rule: if your provider offers an input type, use it consistently, and embed queries and documents with the same model.

Dimensions, precision and storage

The length of the vector is its dimension. More dimensions can hold more detail, but each one costs storage and compute.

As of November 2026, some representative defaults from official docs:

Model (provider)

Default dimensions

Other sizes offered

Max input

text-embedding-3-small (OpenAI)

1,536

Shorter via dimensions parameter

8,192 tokens

text-embedding-3-large (OpenAI)

3,072

Shorter via dimensions parameter

8,192 tokens

embed-v5.0-pro (Cohere)

Configurable

256, 512, 768, 1,024, 1,536, 2,048

See Cohere docs

voyage-4 / voyage-4-large (Voyage AI)

1,024

256, 512, 2,048

32,000 tokens

Sources: OpenAI [9], Cohere [10], Voyage AI [11]. Model lineups change often; check the provider's page before you build.

Matryoshka embeddings: one vector, many sizes

Why can some models offer several sizes from the same vector? The technique is called Matryoshka Representation Learning (MRL), after the nesting dolls. The model is trained so that the first few numbers of the vector carry the coarse meaning and later numbers add finer detail. You can cut the vector short and still have a usable embedding. The MRL paper reported embeddings up to 14 times smaller at the same accuracy on ImageNet-1K classification [8]. Cohere says its embed-v5.0-pro uses Matryoshka learning for its "coarse-to-fine representation within a single vector" [10].

OpenAI's docs describe the same capability for its third-generation models: you can "remove some numbers from the end of the sequence," and the recommended way is the dimensions parameter. If you shorten a vector yourself, you must re-normalize it [9].

Quantized vectors

Providers also offer compressed number formats. Cohere and Voyage both support int8, uint8, binary and ubinary outputs alongside full-precision float [10][11]. A binary embedding packs eight dimensions into each byte, so a 1,024-dimension binary vector takes 128 bytes [10]. Voyage notes that float "provides the highest precision / retrieval accuracy" [11], so compression is a trade you should test, not a free win.

Your database has limits too

Your vector database needs to support the dimension you pick. As of November 2026, pgvector's HNSW and IVFFlat indexes support the vector type up to 2,000 dimensions and halfvec up to 4,000 [12]. A 3,072-dimension vector won't fit a pgvector index as a full-precision vector, which is one reason shortened embeddings are popular.

Types of embedding models

Type

How it represents text

Strength

Cost

Single-vector dense (bi-encoder)

One vector per passage

Fast, simple, works with any vector index

May miss rare exact terms

Multi-vector (late interaction, e.g. ColBERT)

One vector per token

Finer-grained matching

Much more storage

Multimodal

Text and images in one space

Search slides, screenshots, figures

Newer, fewer options

Domain-tuned

Trained on finance, law, code

Better on specialist vocabulary

Narrower scope

Multi-vector models. ColBERT, from SIGIR 2020, keeps a vector for every token. At query time, each query token finds its most similar document token (a "MaxSim" operation), and those maxima are summed [3]. The authors reported running two orders of magnitude faster than comparable BERT-based rankers, with competitive effectiveness [3]. The catch is storage: many vectors per passage instead of one.

Multimodal models. Cohere says embed-v5.0-pro can process images and text together, which suits slide decks and document screenshots [10].

Domain models. Voyage lists separate models for finance, law and code retrieval [11].

How to compare models: MTEB and its limits

The standard public yardstick is the Massive Text Embedding Benchmark (MTEB). The original paper covered 8 task types across 58 datasets and 112 languages, and benchmarked 33 models [4]. Its headline finding still matters: "no particular text embedding method dominates across all tasks" [4]. A model that tops clustering may not top retrieval.

The benchmark has grown. MMTEB, a community expansion, spans more than 500 evaluation tasks across 250+ languages and adds instruction following, long-document retrieval and code retrieval [6]. One finding worth noting: while billion-parameter LLM-based models reach the top on some subsets, the authors found the best publicly available model overall was multilingual-e5-large-instruct, with 560 million parameters [6]. Bigger is not automatically better.

Rankings live on the official MTEB leaderboard, a Hugging Face Space maintained by the MTEB team [5]. It updates constantly, so treat any ranking you read in an article (including a future version of this one) as a snapshot.

Three cautions when reading the leaderboard:

  1. Look at the task column that matches your use. For RAG, the retrieval score matters more than the overall average.
  2. Benchmarks are not your data. The BEIR benchmark found that dense retrievers often trail the classic BM25 keyword method when tested zero-shot on domains they weren't trained for [13]. Your support tickets, contracts or part numbers may behave differently from public datasets.
  3. Check the model card. Licence, maximum input length, languages and dimension options decide whether a model is usable before accuracy even enters the picture.

Where embedding models are used

  • Semantic search. Find documents by meaning rather than exact words.
  • RAG. Retrieve relevant passages to ground an LLM's answer. See our explainers on RAG and RAG vs fine-tuning.
  • Classification and clustering. Cohere's API offers dedicated input types for both [10].
  • Recommendations and deduplication. Near-duplicate items have near-identical vectors.

Limitations and risks

  • Exact terms can slip through. The DPR authors observed that BM25 is sensitive to highly selective keywords, while their dense model captured semantic relationships better but could lack capacity for rare salient phrases [2]. That gap is why many teams combine both, an approach we cover in hybrid search.
  • Changing models means re-embedding everything. Vectors from different models are not comparable. Voyage is an exception within a family: it says all embeddings from its 4 series are compatible with each other [11]. In general, plan for a full re-index when you switch.
  • Input limits truncate silently or error. Text beyond a model's maximum input must be split, which is why chunking strategy matters.
  • Similarity is not relevance. Two passages can be close in vector space and still not answer the question. A reranking model is often added as a second stage.
  • Embeddings can encode sensitive data. Treat a vector store with the same access controls as the source documents.

How to choose an embedding model

  1. Start from your task. Retrieval for RAG, classification and clustering reward different models [4].
  2. Shortlist from MTEB's retrieval scores for your languages, then check licence, input length and hosting options [5].
  3. Build a small evaluation set from your own data. A modest set of real queries with known good answers will tell you more than any leaderboard.
  4. Test dimension and precision trade-offs. If the model supports Matryoshka sizes or quantized outputs, measure retrieval quality at smaller sizes before paying for the largest [8][10][11].
  5. Confirm your database limits for dimensions and data types [12].
  6. Plan for re-embedding. Store source text alongside vectors so you can rebuild the index with a new model later.

Outlook

Two trends are visible in official documentation as of November 2026: vendors are converging on flexible-size vectors with compressed formats [9][10][11], and multimodal embeddings that put images and text in one space are moving into mainstream APIs [10]. The MMTEB result that a 560-million-parameter model was the best public performer overall [6] is a reminder that efficient models remain competitive.

Frequently asked questions

What is the difference between an embedding model and an LLM?

An LLM generates text one token at a time. An embedding model outputs a single vector (or a set of vectors) that represents the input's meaning, and generates no text. Both are often built on Transformers, but they are trained for different jobs.

Do I need to use the same embedding model for queries and documents?

Yes. Vectors from different models live in different spaces and can't be meaningfully compared. Some providers also want you to mark inputs as queries or documents so the model can handle the two differently [10][11].

How many dimensions should my embeddings have?

There is no universal answer. Larger vectors can capture more detail but cost more storage and search time. If your model supports shortened (Matryoshka) embeddings, test retrieval quality at several sizes on your own data and pick the smallest that holds up [8][9].

Is the top model on the MTEB leaderboard the best choice?

Not necessarily. MTEB's own authors found no single method dominates across all tasks [4]. Look at the retrieval column for your languages, then confirm on your own queries.

Can embedding models handle images?

Some can. Cohere says its embed-v5.0-pro processes images and text together [10]. Multimodal models are useful for searching slides, scanned pages and screenshots.

Sources

  1. Reimers, N. and Gurevych, I. "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks." EMNLP 2019. https://arxiv.org/abs/1908.10084
  2. Karpukhin, V. et al. "Dense Passage Retrieval for Open-Domain Question Answering." EMNLP 2020. https://arxiv.org/abs/2004.04906
  3. Khattab, O. and Zaharia, M. "ColBERT: Efficient and Effective Passage Search via Contextualized Late Interaction over BERT." SIGIR 2020. https://arxiv.org/abs/2004.12832
  4. Muennighoff, N. et al. "MTEB: Massive Text Embedding Benchmark." arXiv:2210.07316. https://arxiv.org/abs/2210.07316
  5. MTEB. "MTEB Leaderboard." Hugging Face. https://huggingface.co/spaces/mteb/leaderboard
  6. Enevoldsen, K. et al. "MMTEB: Massive Multilingual Text Embedding Benchmark." arXiv:2502.13595. https://arxiv.org/abs/2502.13595
  7. Mikolov, T. et al. "Efficient Estimation of Word Representations in Vector Space." arXiv:1301.3781. https://arxiv.org/abs/1301.3781
  8. Kusupati, A. et al. "Matryoshka Representation Learning." arXiv:2205.13147. https://arxiv.org/abs/2205.13147
  9. OpenAI. "Vector embeddings." https://developers.openai.com/api/docs/guides/embeddings
  10. Cohere. "Introduction to Embeddings." https://docs.cohere.com/docs/embeddings
  11. Voyage AI. "Text embeddings." https://docs.voyageai.com/docs/embeddings
  12. pgvector. README. https://github.com/pgvector/pgvector
  13. Thakur, N. et al. "BEIR: A Heterogenous Benchmark for Zero-shot Evaluation of Information Retrieval Models." NeurIPS 2021 Datasets and Benchmarks. https://arxiv.org/abs/2104.08663