Match each embedding-model selection scenario to the model attribute or check that most determines the right choice.
Same topic, related formats. Practice these next.
Same topic, related formats. Practice these next.
No universal best embedding model. Each deployment has one dominant constraint: language coverage, domain fit, input length, dimension, latency, or off the shelf strength. Pick the model that resolves it.
Imagine choosing a translator for a job. If the documents are in four languages, you hire someone who actually speaks all four, not the smartest English-only translator in town. If the documents are medical reports full of jargon, you hire someone trained in medicine, not a generalist with more credentials. If each document is the size of a novel, you need someone with the stamina to read the whole thing before summarizing, not someone who can only handle short notes. If you need ten thousand translations per second, you build a small fast team rather than calling one expensive consultant. Picking the right text to numbers model is the same. Each scenario has one constraint that dominates everything else, and the trick is naming that constraint before evaluating candidates.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example.
Everything important, quickly.
3 min: enumerate the six constraints, name 2026 reference models for each, explain why MTEB rank alone is the wrong selector for non-English or non-general corpora, and describe how an in-house eval replaces the default.
# Six-constraint selector for embedding models in a RAG project.
# Name the dominant constraint, then pick.
def pick_embedding_model(corpus_profile, ops_profile):
langs = corpus_profile.languages # e.g. {'en', 'fr', 'es', 'zh'}
domain = corpus_profile.domain # 'general' | 'biomed' | 'legal' | 'code'
max_tokens = corpus_profile.max_doc_tokens
dim_budget = ops_profile.max_dim # None or int
p99_ms = ops_profile.p99_latency_ms
if len(langs) > 1:
return "voyage-embed-v3-multilingual" # or Cohere Embed v4 multilingual, BGE-M3
if domain in ("biomed", "legal", "finance"):
return f"fine-tuned-{domain}-embed" # or domain pretrained
if max_tokens > 8000:
return "voyage-embed-v3" # 32K input; Cohere Embed v4 alt
if dim_budget and dim_budget < 512:
return "text-embedding-3-large@256" # Matryoshka truncate
if p99_ms < 50:
return "self hosted bge small onnx" # local, no network hop
return "text-embedding-3-large" # safe MTEB default| Constraint | Primary check | Reference models (2026) |
|---|---|---|
| Multilingual coverage | Trained on the target languages with shared space | Voyage Embed v3 multilingual, Cohere Embed v4, BGE-M3 |
| Specialized domain | Domain pretraining or in-domain fine-tuning | BioBERT-derived, MedCPT, Voyage-finance, fine-tuned base |
| Long inputs (4K+ tokens) | Max input length and truncation behavior | Voyage Embed v3 (32K), Cohere Embed v4 (32K) |
| On-device / tight RAM | Vector dimension and quantization support | text-embedding-3-large@256 (Matryoshka), BGE-small |
| Tight P99 latency | Self-host versus API; ONNX or TensorRT | BGE-small-en ONNX, gte-small local, MiniLM quantized |
| Greenfield English default | MTEB rank as a placeholder until eval exists | Voyage Embed v3, text-embedding-3-large, Cohere Embed v4 |
Real products, models, and research that use this idea.
What an interviewer would ask next. Try answering before peeking at the approach.
Red flags and common mistakes that signal junior thinking. Click to expand.
Picking the top MTEB model without checking whether your corpus matches the benchmark's languages, domain, or input length distribution. MTEB rank is a default, not a decision.
The night-before-the-interview bullets. Scan these on the way to the call.
Primary sources. Skim if you want the original framing.