This article discusses Dell's approach to improving internal semantic search by fine-tuning open-source embedding models. The core challenge was addressing retrieval failures on proprietary terminology, leading to a deep dive into data preparation, contrastive learning using InfoNCE loss, and the architectural integration of these models within a multi-agent search system.
Read original on InfoQ ArchitectureDell faced a common enterprise problem: generic embedding models failed to understand internal terminology (e.g., PowerScale, CloudIQ) when performing semantic search on internal documents. This led to poor retrieval-augmented generation (RAG) performance. To overcome this, Dell decided to fine-tune open-source embedding models, a critical architectural decision to enhance the accuracy and relevance of their internal search system.
Embedding models translate human language into numerical vectors, making it machine-understandable. Pre-trained models, while broad, lack domain-specific nuance. Fine-tuning allows these models to learn the specific semantic meaning of terms and relationships within an organization's unique dataset. This is crucial for applications like information retrieval, classification, clustering, and recommendation systems, ensuring that a query about "PowerScale" is correctly associated with relevant internal documents.
The fine-tuning process at Dell utilized contrastive learning, a technique that aims to pull semantically similar items (query and positive document) closer in the embedding space while pushing dissimilar items (query and negative document) further apart. This is achieved using the InfoNCE loss function (Noise-Contrastive Estimation), a standard approach for training embedding models.
InfoNCE_Loss = -log(exp(similarity(query, positive_doc)) / sum(exp(similarity(query, all_docs_in_batch))))To guide the model for different tasks (e.g., clustering vs. question-answering), Dell also employed prefix use. By prepending task-specific prefixes like `search_query:` or `clustering:`, the model learns to generate vectors optimized for that particular intent, resolving potential conflicting reward signals.
The fine-tuned embedding models are a core component of Dell's multi-agent internal search system. This system features a hierarchical architecture with a central orchestrator (supervisor) that routes user questions to various specialized agents. Each agent (e.g., GitHub agent, Confluence agent, Security agent, Database agent) is a model equipped with API tools to interact with specific internal data sources. This modular design keeps context low for individual agents, improving efficiency and scalability. The system is also permission-aware, crucial for enterprise environments.