用大模型实时优化查询嵌入,提升零样本搜索与分类效果
Task-Adaptive Embedding Refinement via Test-time LLM Guidance

- 通过小样本文档反馈,让大模型动态调整查询嵌入表示
- 在文献检索等任务上实现最高25%的性能提升
- 适合资源受限场景下替代昂贵的大模型流水线
本文探索了基于大语言模型(LLM)指导的查询精炼范式,以拓展嵌入模型在复杂零样本搜索和分类任务中的适用性。该方法利用生成式LLM对少量文档的反馈,实时优化用户查询的嵌入表示,使嵌入能适应目标任务。我们在多个具有挑战性的搜索与分类基准上,对前沿文本嵌入模型进行了广泛实验。结果表明,LLM引导的查询精炼在所有模型和数据集上均带来一致提升,文献检索、意图识别、关键点匹配及细粒度指令遵循任务中相对改进最高达+25%。精炼后的查询显著改善了排序质量,并在语料库中实现更清晰的二元分离,使嵌入空间更好地反映特定查询的细微任务约束。这一方法扩展了嵌入模型在实际部署中的适用范围,为无法负担大规模大模型流水线的场景提供了有力替代方案。代码已开源:https://github.com/IBM/task-aware-embedding-refinement。
原文摘要 · Abstract (English)
We explore the effectiveness of an LLM-guided query refinement paradigm for extending the usability of embedding models to challenging zero-shot search and classification tasks. Our approach refines the embedding representation of a user query using feedback from a generative LLM on a small set of documents, enabling embeddings to adapt in real time to the target task. We conduct extensive experiments with state-of-the-art text embedding models across a diverse set of challenging search and classification benchmarks. Empirical results indicate that LLM-guided query refinement yields consistent gains across all models and datasets, with relative improvements of up to +25% in literature search, intent detection, key-point matching, and nuanced query-instruction following. The refined queries improve ranking quality and induce clearer binary separation across the corpus, enabling the embedding space to better reflect the nuanced, task-specific constraints of each ad-hoc user query. Importantly, this expands the range of practical settings in which embedding models can be effectively deployed, making them a compelling alternative when costly LLM pipelines are not viable at corpus-scale. We release our experimental code for reproducibility, at https://github.com/IBM/task-aware-embedding-refinement.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。