Skip to main content
Back

Superlinked's E5 Guide Exposes the Silent Bug Wrecking Microsoft's Embeddings

Superlinked published a comparative guide to Microsoft's E5 embedding family, revealing benchmark trade-offs, self-hosting costs, and the prefix bug that silently breaks retrieval.

Pro

  • Superlinked published a comparative guide covering five variants of Microsoft's E5 embedding family.
  • Missing the query: and passage: prefixes silently degrades retrieval quality across every E5 variant.
  • Multilingual-e5-large-instruct leads NDCG@10 on 4 of 5 benchmarks, hitting 0.477 on FiQA vs 0.370.
  • e5-base-v2 flagged as value pick; small-v2 is competitive with models 10x its size.
  • Self-hosting hits 53,200 tokens/sec for base-v2 on a single L4 GPU.
  • All variants still capped at a 512 token input window, requiring careful document chunking.

A new technical guide from Superlinked digs into Microsoft's E5 embedding family and lays out the numbers most teams never bother to measure themselves. It walks through five variants side by side, publishes NDCG@10 scores across common retrieval benchmarks, puts a dollar figure on self-hosting each one, and flags a subtle configuration mistake that quietly wrecks retrieval quality in production.

The comparison covers e5-small-v2, e5-base-v2, e5-large-v2, multilingual-e5-large, and multilingual-e5-large-instruct. All five come from Microsoft's "Text Embeddings by Weakly-Supervised Contrastive Pre-training" work and ship under an MIT license, making them a common landing spot for teams looking beyond MiniLM.

The prefix bug that eats your recall

The most useful part of the writeup is a warning about how E5 is trained. Each input needs a role tag, and skipping it doesn't crash anything, it just degrades results silently. Prepend "query: " and "passage: " for asymmetric tasks like open-domain QA and ad-hoc retrieval, and use "query: " on both sides for symmetric tasks such as semantic similarity, paraphrase retrieval, and when using embeddings as features for classification or clustering.

The instruct variant changes the contract entirely. Queries take a one-line task description in an Instruct: {task}\nQuery: {text} format, and documents get no prefix at all. Carrying passage: habits over to the instruct model, or mixing the two schemes, is called out as one of the most common E5 bugs in the wild.

What the tiers actually buy you

The variant table is where the value picks get interesting:

ModelParamsDimsLanguagesCost / 1M tokp50 latency
e5-small-v233M384English$0.003850 ms
e5-base-v2109M768English$0.004258 ms
e5-large-v2335M1024English$0.006787 ms
multilingual-e5-large560M1024~100$0.0074109 ms
multilingual-e5-large-instruct560M1024~100$0.0076107 ms

A few takeaways worth pulling out of the benchmark data:

  • Going from small to base to large barely moves NDCG@10 on several benchmarks. Base-v2 is presented as the value pick, and small-v2 punches well above its 33M parameter weight.
  • The instruct variant is the family's real quality leader, topping four of five benchmarks and posting 0.477 versus 0.370 on FiQA2018 against plain multilingual-e5-large.
  • For English-only workloads, the guide suggests benchmarking stella_en_400M_v5 against your own data before defaulting to e5-large-v2.
  • Multilingual is where E5 is genuinely hard to beat. The multilingual-e5-large model has 24 layers, embeds into 1024 dimensions, and supports 100 languages, and nothing else in Superlinked's catalog matches it at that price point.

The 512 token ceiling still matters

Every variant truncates at 512 tokens. That's the biggest ergonomic limitation compared with newer long-context embedders, and it shapes how you have to chunk documents before indexing. If your pipeline dumps whole pages into encode(), you're silently discarding the tail. The e5-base-v2 model, a 12-layer, 768-dimensional embedder trained with weakly-supervised contrastive pre-training, compares favorably to the e5-large and multilingual-e5-base models, but only if your chunks fit.

Self-hosting comes in under a buck per million

The throughput numbers explain why the E5 family stays popular despite being a few years old. Cluster-level batching delivers 53,200 tokens per second for base-v2 and 29,800 tokens per second for multilingual-e5-large on a single L4, meaning a million typical support tickets at 200 tokens each takes roughly an hour of GPU time and costs under a dollar.

For a quick self-hosted sanity check, the standard sentence-transformers path still works:

from sentence_transformers import SentenceTransformer
model = SentenceTransformer('intfloat/e5-base-v2')
queries = ['query: when was AI founded']
docs = ['passage: Artificial intelligence was founded as a discipline in 1956.']
q = model.encode(queries, normalize_embeddings=True)
p = model.encode(docs, normalize_embeddings=True)
print((q @ p.T) * 100)

The E5 family is a rare case where an older, small BERT-based model still holds a strong spot on the price and latency Pareto frontier. If you're picking an embedder for RAG, semantic search, or clustering, the guide gives you the numbers to make that call without running the benchmarks yourself. And if your existing E5-backed retrieval feels mediocre, the first thing to check is whether you actually added the right prefix.