mxbai-embed-large-v1

Model Description

is our powerful English embedding model that provides state-of-the-art performance among efficiently sized models. It outperforms closed source models like OpenAI's text-embedding-ada-002.

The model was trained on a vast dataset of over 700 million pairs using contrastive training and fine-tuned on more than 30 million high-quality triplets using the AnglE loss function. This extensive training enables the model to adapt to a wide range of topics and domains, making it suitable for various real-world applications and Retrieval-Augmented Generation (RAG) use cases.

is well-suited for . This helps you save 32x storage and achieve 40x faster retrieval, while maintaining over 96% of the performance.

achieves top performance on the Massive Text Embedding Benchmark (MTEB), which measures embedding models across seven tasks: classification, clustering, pair classification, re-ranking, retrieval, semantic textual similarity, and summarization. The model's strong performance across these diverse tasks demonstrates its versatility and robustness.

LayersEmbedding DimensionRecommended Sequence LengthLanguage
241024512English

Using a Prompt

For retrieval tasks, the query should be preceded by the prompt: Represent this sentence for searching relevant passages:. For other tasks, the text can be used as-is without any additional prompts.

The prompt parameter is included in the request. By default, we calculate the embeddings using the provided text directly.

Suitable Scoring Methods

  • Cosine Similarity: Ideal for measuring the similarity between text vectors, commonly used in tasks like semantic textual similarity and information retrieval.
  • Euclidean Distance: Useful for measuring dissimilarity between embeddings, especially effective in clustering and outlier detection.
  • Dot Product: Appropriate when embeddings are normalized; used in tasks where alignment of vector orientation is critical.

Limitations

  • Language: is trained on English text and is specifically designed for the English language.
  • Sequence Length: The suggested maximum sequence length is 512 tokens. Longer sequences may be truncated, leading to a loss of information.

Examples

Calculate Sentence Similarities

The following code illustrates how to compute similarities between sentences using the cosine similarity score function.

Information Retrieval

The following code snippet demonstrates the retrieval of information related to a specific query from a given corpus. Note that the prompt Represent this sentence for searching relevant passages: is used for the query.