← AI Terminology
Embedding Model
An embedding model maps text, images, or other inputs into fixed-size vectors that place similar items close together for search, clustering, and retrieval.
Sentence transformers and vendor embedding APIs are the workhorses of RAG.
Sentence transformers and vendor embedding APIs are the workhorses of RAG.
Why It Matters in AI
Every semantic search stack is only as good as its embedding model. Domain mismatch (legal, code, medical) needs the right embedder. Choosing, evaluating, and versioning embedding models is foundational ML product work.
Key Points
| Aspect | Description |
|---|---|
| APIs | OpenAI, Cohere, Voyage; open: E5, BGE, GTE |
| Dims | Typically 384–3072; affects storage and speed |
| Eval | MTEB leaderboard, domain recall@k |
| Types | Text, multimodal, code-specialised embedders |
| Related | Vector DB, cosine similarity, dense retrieval |
| Training | Contrastive learning on pairs/triplets |
Simple Analogy
A translator that turns any sentence into GPS coordinates on a meaning map — similar sentences land in nearby neighbourhoods.
Common Usage Examples
SentenceTransformer('all-mpnet-base-v2')- OpenAI
text-embedding-3-large - MTEB to pick models
- Re-embed corpus when changing models
Summary
In short: An embedding model converts inputs into vectors for similarity — the encoder that makes semantic search and RAG possible.