Embeddings
Embedding models map text (or images) to dense vectors so that semantic similarity becomes geometric distance. They power search, clustering, dedup and RAG.
Evolving: the basics hold, details shift. Reviewed 17 Oct 2026.
Key ideas
- Similarity is usually cosine or dot product; normalize vectors if the model expects it.
- Dimension drives storage and speed. Matryoshka embeddings let you truncate dimensions with modest quality loss.
- Use separate query and document modes if the model supports them (asymmetric retrieval).
- Pick models on the MTEB leaderboard filtered to your task and language, then validate on your own data.
- Changing the embedding model means re-embedding the whole corpus; version your indexes.
Common mistakes
- Mixing vectors from two different embedding models in one index.
- Assuming a general model handles domain jargon, SKUs or codes well; test with real queries.