Text embeddings are really playing a pivotal role in retrieving semantically similar text for RAG implementations and in-context learning at inference.
This study focusses on creating high quality text embeddings by only using synthetic data and only executing 1,000 training iterations.
Generally available LLMs were used to generate synthetic data for 100,000+ of text embeddings across a multitude of tasks and languages.
Experiments demonstrate that our method achieves strong performance on highly competitive text embedding benchmarks without using any labeled data. — Source
Embedding-based retrieval is the foundational component of retrieval-augmented generation (RAG). RAG has been proven as a highly effective approach to allow LLMs to reference dynamic external knowledge at inference without training the base model.
The study wanted to solve for the challenge of creating large amounts of weak-supervised text pairs, building complex training pipelines or manual collection of datasets which need to be annotated.
The two overheads to collecting data for large RAG implementations are:
There a few considerations to keep in mind…
To generate diverse synthetic data, the study developed a taxonomy that categorises embedding tasks into several groups, and then apply different prompt templates to each group.
As illustrated below…
Below the statistics of the synthetic data. The task type and language representation of the generated synthetic data are shown.
To again emphasise the scale of this exercise, with 500,000 examples and 150,000 unique instructions using Azure OpenAI Service, among which 25% were generated by GPT-35-Turbo and others are generated by GPT-4.
The total token consumption was about 180,000,000.
In terms of data quality, the study found that portions of GPT-35-Turbo outputs did not strictly follow the guidelines specified in the prompt templates.
Nevertheless, the overall quality remained acceptable, and preliminary experiments have demonstrated the benefits of incorporating this data subset.
The paper highlights the significant improvement in text embeddings’ quality by leveraging Large Language Models (LLMs), particularly proprietary ones like GPT-4.
The taxonomy to generate diverse synthetic data across multiple languages is insightful, and can be useful on a smaller scale.
Future direction includes enhancing multilingual performance, exploring open-source LLMs for synthetic data generation, and investigating methods to improve inference efficiency and reduce storage costs for LLM-based text embeddings.
Previously published on Medium.