Navigation

Introduction to AI

Machine Learning

Deep Learning

NLP & LLMs

Computer Vision

Generative AI

Reinforcement Learning

AI Ethics & Governance

Tools & Frameworks

General

MTEB - Benchmarking Text Embedding Models

The Massive Text Embedding Benchmark (MTEB) is a standard suite for comparing text embedding models across many tasks and datasets. It was created because models evaluated on a single task, such as semantic similarity, often generalize poorly to others.

Task Categories

CategoryWhat is measuredMain metric
RetrievalFind relevant documents for queriesNDCG@10
Semantic textual similarityCorrelate similarity with human scoresSpearman correlation
ClassificationTrain a logistic regression on frozen embeddingsAccuracy
ClusteringGroup texts without labelsV-measure
Pair classificationDecide whether two texts are duplicates or relatedAverage precision
RerankingReorder candidate listsMAP
SummarizationMatch summary quality judgmentsSpearman correlation

Extensions add multilingual coverage, domain-specific sets, and long documents.

Running an Evaluation

from mteb import MTEB
from sentence_transformers import SentenceTransformer

model = SentenceTransformer("BAAI/bge-small-en-v1.5")
evaluation = MTEB(tasks=["SciFact", "STSBenchmark"])
results = evaluation.run(model, output_folder="results")

Reading the Leaderboard

  • Check the task type that matches your use case; a model leading overall may not lead on retrieval
  • Consider model size, embedding dimension, and max sequence length, which determine cost and latency
  • Watch for multilingual needs
  • Be skeptical of top scores: some models may have trained on benchmark datasets, inflating results

Practical Selection Process

  1. Shortlist models using MTEB for your task type and language
  2. Build a small evaluation set from your own queries and documents
  3. Compare shortlisted models on that set for recall and ranking metrics
  4. Weigh accuracy against index size and inference cost

Lower-dimensional embeddings (or Matryoshka-truncated ones) can cut storage and search cost substantially with modest quality loss.

Limitations

Benchmarks cannot capture your domain’s vocabulary or query style, and aggregated averages hide per-task variation, so treat MTEB as a filter, not a final verdict.