Presented at ACL 2024, LLM-Embedder is a unified embedding model designed to support the diverse retrieval needs of Large Language Models (LLMs). It acts as a "Swiss Army Knife" for Retrieval-Augmented Generation (RAG), unifying four distinct tasks—knowledge, memory, example, and tool retrieval—into a single model.
Addressing LLM Limitations
While LLMs are powerful, they face three primary constraints: a lack of up-to-date knowledge, limited memory (context windows), and an inability to take action without external tools. RAG addresses these by fetching relevant information from external sources.
Current embedding models often fall into two categories: general-purpose retrievers that are "LLM-blind" (trained on general text similarity) and task-specific retrievers that are effective but narrow. LLM-Embedder bridges this gap by providing a single, versatile model that understands the specific information needs of an LLM across various scenarios.
Technical Innovations
The authors introduce three key methods to optimize retrieval for LLM generation:
- Rank-Aware Reward: Instead of relying on volatile "likelihood" scores, the model is trained based on how much a retrieved document improves the ranking of the desired output among multiple samples. This provides a more stable training signal.
- Graded Distillation: This technique uses contrastive losses to account for both the absolute value of the reward and the relative order of candidates, allowing the model to learn from subtle differences in document quality.
- Multi-Task Learning: To manage diverse tasks without conflict, the authors use self-paced scheduling, homogeneous batching, and diversified instruction prompting (e.g., using unique prefixes to distinguish between searching for a tool versus a conversation memory).
Evaluation and Results
LLM-Embedder was evaluated across a massive collection of datasets, including MSMARCO (knowledge), Multi-Session Chat (memory), FLAN (examples), and ToolBench (tools).
As shown in the radar chart above, LLM-Embedder consistently outperforms both state-of-the-art general embedders and specialized models. Notable achievements include:
- Tool Retrieval: Achieved an NDCG@5 of 0.865 on ToolBench, significantly higher than general models like BGE (0.576).
- Knowledge & Memory: Reduced perplexity in long-range modeling and improved accuracy on knowledge-heavy tasks like PopQA (0.505 vs. BGE's 0.449).
- Cross-Model Generalization: Improvements were observed across various LLMs (e.g., Qwen, Baichuan), despite the embedder being trained specifically on Llama-2 feedback.
Conclusion
LLM-Embedder demonstrates that training embedders on the utility of information to the LLM—rather than just semantic similarity—is crucial. By leveraging rank-aware feedback and multi-task learning, it provides a robust, all-in-one solution for modern RAG systems. Future work may explore the scaling effects of larger architectures beyond the current BERT-base foundation.
Summary updated