用小模型高效生成企业搜索相关性标签,速度提升17倍且成本降为1/19。
Fine-tuning Small Language Models as Efficient Enterprise Search Relevance Labelers
- 用大模型生成合成查询与负样本,构建高质量标注数据集
- 蒸馏后的小模型在相关性判断上媲美甚至超过教师大模型
- 适合需要快速迭代的企業搜索系统,尤其看重效率与成本
在企业搜索中,大规模构建高质量数据集仍面临标注数据获取困难的挑战。为此,我们提出一种高效微调小型语言模型(SLMs)进行相关性标注的方法,实现高吞吐、领域定制的标注,其质量可媲美甚至优于当前最先进的大语言模型(LLMs)。为克服企业领域高质量、易获取数据集稀缺的问题,本方法采用合成数据生成策略:利用LLM从种子文档生成真实的企业查询,通过BM25检索难负样本,并由教师LLM赋予相关性评分。由此生成的数据集被蒸馏至小型语言模型,形成紧凑的相关性标注器。我们在一个包含923对标注的企业查询-文档对的高质量基准上进行评估,结果显示,蒸馏后的SLM与人工判断的一致性达到或超过教师LLM。此外,该方法将处理吞吐量提升17倍,同时成本降低为原来的1/19。该方法支持企业级检索应用的可扩展、低成本相关性标注,助力实际场景中的快速离线评估与迭代。
原文摘要 · Abstract (English)
In enterprise search, building high-quality datasets at scale remains a central challenge due to the difficulty of acquiring labeled data. To resolve this challenge, we propose an efficient approach to fine-tune small language models (SLMs) for accurate relevance labeling, enabling high-throughput, domain-specific labeling comparable or even better in quality to that of state-of-the-art large language models (LLMs). To overcome the lack of high-quality and accessible datasets in the enterprise domain, our method leverages on synthetic data generation. Specifically, we employ an LLM to synthesize realistic enterprise queries from a seed document, apply BM25 to retrieve hard negatives, and use a teacher LLM to assign relevance scores. The resulting dataset is then distilled into an SLM, producing a compact relevance labeler. We evaluate our approach on a high-quality benchmark consisting of 923 enterprise query-document pairs annotated by trained human annotators, and show that the distilled SLM achieves agreement with human judgments on par with or better than the teacher LLM. Furthermore, our fine-tuned labeler substantially improves throughput, achieving 17 times increase while also being 19 times more cost-effective. This approach enables scalable and cost-effective relevance labeling for enterprise-scale retrieval applications, supporting rapid offline evaluation and iteration in real-world settings.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。