TLDR: CustomIR is a framework for unsupervised adaptation of pre-trained dense embedding models to domain-specific document corpora. It uses large language models (LLMs) to synthetically generate diverse query-document pairs and LLM-verified hard negatives, eliminating the need for human annotation. Experiments show CustomIR consistently improves retrieval effectiveness, allowing smaller models to achieve performance comparable to much larger, more expensive alternatives, thus enabling cheaper RAG deployments.
In the rapidly evolving world of artificial intelligence, dense embedding models have become indispensable for modern information retrieval, especially in applications like Retrieval-Augmented Generation (RAG) pipelines. These models are designed to understand and represent text in a way that allows for efficient searching and matching. However, a common challenge arises when these powerful models are applied to specialized datasets that differ significantly from the broad data they were initially trained on. This often leads to a noticeable drop in performance.
Addressing this critical issue, researchers Nathan Paull and Valkyrie Andromeda introduce CustomIR, a novel framework designed for the unsupervised adaptation of pre-trained language embedding models to specific document collections. The core innovation of CustomIR lies in its ability to fine-tune these models for domain-specific corpora without the need for expensive and time-consuming human annotation.
How CustomIR Works
CustomIR leverages the power of large language models (LLMs) to generate high-quality synthetic data. Here’s a simplified breakdown of its process:
- Synthetic Query Generation: LLMs are used to create diverse queries that are directly grounded in the known target document corpus. This ensures the generated queries are highly relevant to the domain.
- Positive Pairs: These synthetically generated queries are then paired with their corresponding real document chunks from the corpus, forming positive examples for training.
- Hard Negative Mining and Verification: To provide a strong contrastive signal for training, CustomIR identifies “hard negatives” – documents that are similar enough to a query to be challenging, but are not actually relevant. Initially, a method like BM25 is used to mine these negatives. Crucially, an LLM then verifies these mined negatives, filtering out any “false negatives” (documents that were incorrectly identified as irrelevant but are actually relevant). This LLM-based verification step ensures the quality and accuracy of the negative examples.
This entire process eliminates the need for human annotators, making it a scalable and cost-efficient strategy for improving domain-specific performance.
Also Read:
- E2RANK: A Unified Approach for Efficient and Effective Text Retrieval and Reranking
- RaCoT: Enhancing LLM Reasoning Reliability with Pre-Retrieval Contrastive Thinking
Key Benefits and Findings
The researchers conducted experiments on two enterprise communication datasets: Enron emails and internal Valkyrie Slack messages. The results were compelling:
- Consistent Performance Boost: CustomIR consistently improved retrieval effectiveness across both datasets and various embedding models. For instance, smaller models saw significant gains, with Recall@10 improving by up to 2.3 points.
- Smaller Models, Bigger Impact: A particularly noteworthy finding is that CustomIR-adapted smaller models, such as Qwen3-Embed-Sm, were able to rival and, in some cases, even surpass the performance of much larger and more computationally expensive alternatives like Qwen3-Embed-Md and Lg. This means organizations can achieve high-performance information retrieval with more affordable and efficient deployments.
- Importance of LLM Verification: An ablation study confirmed that the LLM-based verification of hard negatives is essential. Simply using BM25-mined negatives without LLM filtering yielded only marginal improvements, highlighting the critical role of quality control in synthetic data generation.
In essence, CustomIR offers a practical and resource-efficient solution for adapting information retrieval systems to specialized domains. By closing the performance gap between compact and large models without requiring human annotation or significant computational overhead, it paves the way for more accessible and powerful RAG deployments in various enterprise settings. For more in-depth details, you can read the full research paper here.


