ImageNet classification with deep convolutional neural networks
Alex Krizhevsky, Ilya Sutskever et al.
402
Citations
28
Influential Citations
Annual Meeting of the Association for Computational Linguistics
Venue
2023
Year
Leverages proprietary LLMs to generate diverse synthetic data to fine tune open-source decoder-only LLMs for hundreds of thousands of text embedding tasks.
Text embeddings are the backbone of many NLP applications, from search to retrieval-augmented generation. Traditionally, building high-quality embedding models requires massive labeled datasets, which are expensive and language-specific. E5-Mistral-7B flips this paradigm by showing that synthetic data generated by proprietary LLMs can replace human-labeled data entirely, achieving state-of-the-art results with minimal training. This is a game-changer for practitioners who need multilingual, task-agnostic embeddings without the overhead of data collection.
The paper introduces a straightforward pipeline: generate diverse synthetic data using GPT-4 and GPT-3.5, then fine-tune Mistral-7B with contrastive loss. The key innovation lies in the data generation strategy.

Embedding tasks are split into asymmetric (query and document are semantically related but not paraphrases) and symmetric (query and document are paraphrases). For asymmetric tasks, a two-step prompt template first brainstorms a list of tasks, then generates a concrete example. For symmetric tasks, the brainstorming step is omitted since the task is straightforward. Placeholders are inserted into prompts to increase diversity.

In total, 500k examples with 150k unique instructions were generated, 25% from GPT-3.5 and the rest from GPT-4. The data covers 93 languages, with English dominating but low-resource languages having about 1k examples each.

For training, the query is prepended with an instruction template while the document remains unchanged. This allows pre-building the document index and customizing tasks by changing only the query side. The [EOS] token is appended to both query and document, and the last-layer [EOS] vector is used as the embedding. Standard InfoNCE loss with temperature-scaled cosine similarity is applied over in-batch negatives and hard negatives.




The model is fine-tuned for one epoch on a mix of synthetic data and 13 public datasets (e.g., ELI5, HotpotQA, MS MARCO), totaling about 1.8M examples.
On the MTEB benchmark, E5-Mistral-7B with full data outperforms the previous state-of-the-art by 2.4 points. Even when using only synthetic data (no labeled data), performance remains competitive.

Compared to commercial models, it achieves a significant margin, though fair comparison is hindered by lack of transparency.

On the MIRACL multilingual dataset covering 18 languages, the model excels in high-resource languages (especially English) but lags behind mE5-base in low-resource languages, likely due to Mistral-7B's English-centric pretraining.

An ablation study shows that contrastive pre-training has negligible impact on Mistral-7B-based models, unlike XLM-R-large. This suggests that extensive autoregressive pretraining already provides strong text representations, and minimal fine-tuning suffices.

E5-Mistral-7B demonstrates that synthetic data from proprietary LLMs can effectively train open-source embedding models, reducing reliance on expensive labeled datasets. This opens the door for scalable, multilingual embedding systems that can be adapted to new tasks with minimal effort. The finding that autoregressive pretraining reduces the need for contrastive pre-training is also valuable for practitioners, suggesting that large decoder-only LLMs are already strong embedding backbones. However, the English-centric bias of Mistral-7B limits performance in low-resource languages, highlighting the need for more balanced multilingual pretraining or targeted data augmentation.
Alex Krizhevsky, Ilya Sutskever et al.
Ashish Vaswani, Noam Shazeer et al.
Douglas M. Bates, Martin Mächler et al.
Diederik P. Kingma, Jimmy Ba