TL;DR
This paper introduces a highly efficient method to fine-tune Small Language Models (SLMs) to act as search relevance labelers for enterprise environments. By distilling knowledge from a frontier LLM (GPT-4o) using a novel synthetic data generation pipeline, the authors trained a compact model (Phi-3.5 Mini) that matches or exceeds the performance of its teacher. The resulting SLM is 17× faster and 19× more cost-effective, making large-scale offline evaluation of enterprise search systems practical and affordable.
What Problem Does This Paper Address?
Evaluating search engine performance requires high-quality relevance labels (i.e., determining how well a document matches a user's query). In the enterprise domain—searching through internal emails, chats, and documents—this is incredibly challenging. Unlike web search, enterprise queries are highly context-dependent, ambiguous, and rely heavily on internal organizational knowledge and metadata (e.g., searching for "Juno project plan" vs. a web search for the movie Juno).
Furthermore, strict privacy policies make collecting real user query logs and hiring human annotators difficult and expensive. While frontier Large Language Models (LLMs) can act as automated judges, using them to label hundreds of thousands of document pairs for offline evaluation is computationally prohibitive and slow.
Methods
The authors propose a fully automated, privacy-preserving pipeline to generate synthetic training data and distill an LLM's capabilities into a lightweight SLM.
Initially, the authors tried fine-tuning an SLM directly to generate queries, but found the model suffered from a strong "positivity bias"—it struggled to generate plausible-sounding irrelevant queries (hard negatives).
To solve this, they developed a four-stage pipeline:
- Positive Query Generation: They sampled internal documents and combined them with common enterprise query templates (e.g.,
<author><file_name>). GPT-4o was used to generate realistic queries, followed by a prompt-based revision step to ensure diversity. - Negative Document Mining: They used the traditional BM25 retrieval algorithm to find "hard negatives"—documents that share lexical overlap with the query but are not the actual target document.
- LLM Labeling: GPT-4o scored the resulting query-document pairs on a 0–4 relevance scale.
- SLM Fine-tuning: They fine-tuned Phi-3.5 Mini Instruct on these labeled pairs. Crucially, they utilized multi-task tuning, mixing the synthetic enterprise data with public web search datasets to improve the model's generalization.
Datasets
The study utilized a mix of proprietary and public datasets for training and evaluation:
- Eyes-on Enterprise Documents: 1,500 internal documents used as seeds for synthetic data generation.
- INTERS: A large public multi-task dataset (~250k samples) used for initial multi-task pre-training.
- TREC-CAsT & MS MARCO: Public web search datasets used to expose the model to broader semantic query-passage relationships during fine-tuning.
- Human-Labeled Enterprise Search Dataset: A gold-standard evaluation benchmark consisting of 923 query-document pairs annotated by trained human experts.
Key Insights and Ideas
- The "Positivity Bias" Barrier: Instruction-tuned SLMs are optimized to be helpful, making them inherently bad at generating negative or irrelevant examples when acting as query generators. Separating query generation (LLM) from negative mining (BM25) is essential.
- Quality Over Quantity: When scaling the synthetic training data from 14K to 24K examples, performance gains plateaued. Refining the queries for diversity and phrasing mattered significantly more than simply feeding the model more data.
- Cross-Domain Synergy: Even though the target application was enterprise search, incorporating public web search datasets (like MS MARCO) during fine-tuning made the SLM a more robust and accurate relevance labeler.
Key Results
Evaluated against the human-annotated gold standard, the fine-tuned SLM achieved remarkable results:
- Better Alignment than the Teacher: The fine-tuned Phi-3.5 Mini achieved a full NDCG of 0.953 and a Pairwise Accuracy of 63.81%, marginally outperforming its teacher, GPT-4o (NDCG: 0.944, Accuracy: 62.58%).
- Massive Throughput Boost: The SLM processed 873.33 Requests Per Minute (RPM) on a single A100 GPU, representing a 17× increase over typical LLM-based labeling setups.
- Dramatic Cost Reduction: The SLM was 19× more cost-effective, costing just $0.13 per 1M input tokens compared to GPT-4o's $2.50.
Limitations and Future Work
Because of strict enterprise privacy constraints, the entire pipeline relies on synthetic queries generated from seed documents rather than actual user search logs. While the synthetic queries proved highly effective, they may not capture the full, messy distribution of real-world user behavior. Additionally, the authors limited their evaluation to the Phi-3.5 Mini and GPT-4o architectures; future work could explore how other SLM families (like Llama or Gemma) perform under this distillation framework.
Summary updated