ModelRefs / Embedding — AI Glossary
Embedding — AI Glossary
A dense vector representation of text, image, or audio that captures semantic meaning in a high-dimensional space.
Overview
Embedding models (text-embedding-3, BGE-M3, Voyage, Cohere Embed) map similar content to nearby points (typically 768–3072 dimensions). They power semantic search, clustering, classification, and RAG retrieval. Embedding quality is the ceiling of RAG retrieval quality.
Reference details
| Topic | rag |
|---|---|
| Last reviewed | 2026-06-24 |
Related terms
How it works
- The text is tokenised and run through an encoder, producing one vector per token, which is not yet an embedding of the passage.
- Those token vectors are pooled into a single fixed-length vector, usually by averaging them or by taking the representation at a designated position, and that pooling choice is part of the model.
- The result is commonly normalised to unit length, which makes the dot product equal the cosine and is why the two similarity measures are interchangeable for most models.
- The reason similar texts land close together is the training objective: pairs known to match are pulled together and mismatched pairs pushed apart, so proximity is a learned property rather than a geometric accident.
- Those negatives are usually other items in the same training batch, which is why embedding models are trained at large batch sizes — the batch is the difficulty of the task.
- Some models are asymmetric and expect a prefix marking a text as a query or as a document, and omitting it places the two sides of a comparison in regions the model was trained to keep apart.
Example: Why cosine similarity, not keyword overlap — and what it costs on identifiers
“How do I reset my password?” and “I forgot my login credentials” share almost no words — keyword search scores them near zero. Their embeddings sit close together, so cosine similarity is high and retrieval finds the right document. The same property is the failure mode: “cancel my subscription” and “renew my subscription” are also close, because they are about the same topic while meaning opposite things. The identifier case is where that costs measurable recall. Suppose 12% of queries contain a SKU, an error code or an exact product name, and the embedding path retrieves the right document for 40% of them while a lexical index manages 95%. The gap is 0.12 x (0.95 - 0.40) = 6.6% of all traffic that a hybrid retriever answers and a dense-only one does not. That figure is what decides whether a second index is worth running — and it is a property of your query mix rather than of the embedding model.
Commonly confused with
An embedding is not a summary and cannot be read back. It is a fixed-length vector, and nothing in it is human-inspectable. Similarity in embedding space means topical relatedness, which is not the same as relevance and definitely not the same as agreement. It is also not a fixed representation of meaning: two models place the same sentence in unrelated coordinate systems, so a vector is only interpretable against the model that produced it and an index cannot mix them.
When to use it
Reach for it when:
- Users phrase the same intent in many different ways
- You need clustering, deduplication or classification over free text
- Recall matters more than exact term matching
- Where the identifier share of queries is small enough that 6.6% of traffic is an acceptable loss
Reach for something else when:
- The query is an identifier — a SKU, error code or name — where lexical search wins outright
- Negation or opposites must be distinguished; embeddings are weak at this
- You need to explain to a user or auditor why a document was returned
- Mixing vectors from two models in one index, which places the same text in unrelated spaces
Referenced by
This term is used by the following ModelRefs references:
Where this appears on ModelRefs
Continue your research
Use these connected ModelRefs sections to compare alternatives, inspect implementation paths, and review the evidence and governance boundaries relevant to Embedding — AI Glossary.
Frequently asked questions
What is Embedding?
A dense vector representation of text, image, or audio that captures semantic meaning in a high-dimensional space.
What concepts are related to Embedding?
Closely related concepts include vector database, semantic search, rag, reranker.