ELI Ladder

What are embeddings in AI?

An embedding turns a word, sentence or image into a list of numbers, placed so that things with similar meaning end up close together.

dim 1 dim 2 cat kitten car Toy 2-D embeddings cat (0.9, 0.8) kitten (0.8, 0.9) car (0.9, −0.3) cosine(cat, kitten) ≈ 0.99 → very similar cosine(cat, car) ≈ 0.50 → less similar Small angle = similar meaning. Real embeddings use 1,000+ dimensions.

Rung 1 Explain like I'm 6

Imagine a huge toy room where every toy has a spot on the floor. The puppy and the kitten sit close together because they are both soft pets. The fire truck and the race car are parked together on the other side. If you lose a teddy bear, you look near the other cuddly toys. An embedding is a toy's spot on that floor, written as numbers, so a computer can tell what is similar just by checking how close two spots are.

Rung 2 High-school level

An embedding is a list of numbers (a vector) that stands for the meaning of something: a word, a sentence, a picture or a product. A model is trained so that similar things get similar vectors. "Puppy" and "dog" land near each other, while "puppy" and "invoice" land far apart.

In two dimensions a vector is a point on a graph, like (3, 4). Real embeddings have hundreds or thousands of numbers, so you cannot draw them, but the idea of "close means similar" still holds.

Embeddings power everyday tools:

  • Search that finds pages by meaning, not just matching words.
  • Recommendations: shows or songs whose vectors sit near ones you liked.
  • Embeddings in RAG: a chatbot turns your question into a vector, finds the documents with the closest vectors, and reads them before answering.

A vector database is a store built to find the nearest vectors quickly among millions.

Rung 3 Undergraduate level

Closeness is usually measured with cosine similarity: the cosine of the angle between two vectors.

cos(a, b) = (a · b) / (|a| |b|)

A toy 2-D example (real embeddings are learned, not hand-written):

  • cat = (0.9, 0.8), kitten = (0.8, 0.9), car = (0.9, -0.3)
  • cat · kitten = 0.72 + 0.72 = 1.44; |cat| = |kitten| ≈ 1.204; cosine ≈ 1.44 / 1.45 ≈ 0.99
  • cat · car = 0.81 - 0.24 = 0.57; |car| ≈ 0.949; cosine ≈ 0.57 / 1.143 ≈ 0.50

So "kitten" is much nearer "cat" than "car" is.

How are they learned? word2vec (2013) trained a shallow network to predict a word from its neighbours, and the hidden weights became word vectors [1]. They captured analogies: vector("king") - vector("man") + vector("woman") lands near vector("queen").

Two kinds matter today. Token embeddings are the first layer of an LLM: each token ID looks up a row in a table. Text embeddings compress a whole sentence or passage into one vector, for search and RAG. Sentence-BERT (2019) made these practical by training paired networks so that related sentences get high cosine similarity [2].

Check yourself: Two embeddings have cosine similarity close to 1. What does that suggest?

They point in almost the same direction, so the model treats the two items as very similar in meaning.

Rung 4 Graduate level

A RAG pipeline with embeddings: split documents into chunks, embed each chunk, store the vectors with an index, embed the user's query the same way, retrieve the nearest chunks, and paste them into the LLM's prompt.

Key design choices:

  • Dimension. Qwen3-Embedding (2025) comes in 0.6B, 4B and 8B sizes with 1024, 2560 and 4096 dimensions [3]. More dimensions can hold finer distinctions but cost storage and search time. One million chunks at 4096 float32 numbers is about 16 GB of raw vectors.
  • Truncatable vectors. Matryoshka representation learning (2022) trains the first few dimensions to carry the most information, so you can cut a vector short and trade a little accuracy for big savings [6]. Qwen3-Embedding supports this [3].
  • Bi-encoder vs cross-encoder. Embedding query and document separately (a bi-encoder) lets you precompute document vectors, which is fast. A cross-encoder reranker reads query and document together and is more accurate but too slow for millions of documents. Common practice: retrieve a shortlist with embeddings, then rerank it.
  • Approximate search. Indexes such as HNSW find near neighbours without comparing against every vector, giving up a little recall for large speed gains.
  • Instructions. Newer models accept a task instruction with the query, so the same text can be embedded differently for search versus classification [3].

Quality is usually compared on the MTEB benchmark family, but leaderboard rank on public tasks does not guarantee results on your own documents. Test on a sample of real queries.

Check yourself: Why do many RAG systems rerank after embedding search?

Embedding search is fast but rough; a reranker reads query and document together to order the top few more accurately.

Rung 5 PhD level

Word embeddings rest on the distributional hypothesis: words used in similar contexts have similar meanings. Levy and Goldberg (2014) showed that word2vec's skip-gram objective [1] implicitly factorises a shifted word-context PMI matrix, linking neural embeddings to classic count-based methods.

Modern text embedders are trained contrastively: pull a query towards its matching passage and push it away from others in the batch, ideally including hard negatives that look relevant but are not. Results depend heavily on negative mining and data mix.

Known limits:

  • Single-vector bottleneck. Weller et al. (2025) proved that the number of distinct top-k document sets an embedding model can return is bounded by the embedding dimension. They built LIMIT, a simple-looking dataset on which state-of-the-art embedders fail, and found the limit holds even when vectors are optimised directly on the test set [5].
  • Negation and logic. "Hotels without a pool" often lands near "hotels with a pool".
  • Anisotropy. Learned vectors can crowd into a narrow cone, which distorts cosine similarity.
  • Drift. Vectors from different models, or versions, cannot be compared, so changing models means re-embedding everything.

Open problems: multi-vector and sparse-dense hybrids that escape the bottleneck at acceptable cost, embeddings that follow instructions reliably, and fair performance across languages.

Rung 6 State of the art: what experts work on now

Last checked 18 November 2026.

LLMs became the backbone for embedding models. Google's Gemini Embedding (March 2025) builds on Gemini and reported state-of-the-art results on the Massive Multilingual Text Embedding Benchmark, across multilingual, English and code tasks [4]. Qwen3-Embedding (June 2025) is open-weight; its 8B model ranked first on the MTEB multilingual leaderboard as of 5 June 2025, with a score of 70.58, supports over 100 languages, task instructions and truncatable (Matryoshka) dimensions [3], [6].

The sharpest research result questioned the approach itself. "On the Theoretical Limitations of Embedding-Based Retrieval" (August 2025, accepted to ICLR 2026) showed a hard ceiling set by vector dimension, and its LIMIT benchmark trips up even the best single-vector models [5]. The practical reading: for retrieval that combines many conditions, pair embeddings with rerankers, keyword search or multi-vector methods.

Leaderboards change monthly, so treat any "best embedding model" claim as a snapshot with a date.

Sources

  1. Mikolov et al.: Efficient Estimation of Word Representations in Vector Space (word2vec) (2013)
  2. Reimers and Gurevych: Sentence-BERT (2019)
  3. Qwen: Qwen3 Embedding (2025)
  4. Google: Gemini Embedding: Generalizable Embeddings from Gemini (2025)
  5. Weller et al.: On the Theoretical Limitations of Embedding-Based Retrieval (2025)
  6. Kusupati et al.: Matryoshka Representation Learning (2022)