arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2409.15700cs.IRcs.CL
收藏

使文本嵌入器成为少样本学习器

Making Text Embedders Few-Shot Learners

Beijing Academy of Artificial Intelligence(北京人工智能研究院);Beijing University of Posts and Telecommunications(北京邮电大学);Chinese Academy of Sciences(中国科学院);University of Science and Technology of China(中国科学技术大学)

Chaofan Li, MingHao Qin, Shitao Xiao, Jianlyu Chen, Kun Luo, Yingxia Shao, Defu Lian, Zheng Liu

AI总结:

提出bge-en-icl模型,利用LLMs的上下文学习特性将少样本示例整合到查询端生成高质量文本嵌入,在MTEB和AIR-Bench基准上达到SOTA性能。

摘要:

具有纯解码器架构的大型语言模型(LLMs)展示了显著的上下文学习(ICL)能力。这一特性使它们能够通过利用其输入上下文中提供的示例,有效地处理熟悉和全新的任务。认识到这一能力的潜力,我们提出利用LLMs中的ICL特性来增强文本嵌入生成过程。为此,我们引入了一个新模型bge-en-icl,它采用少样本示例来生成高质量的文本嵌入。我们的方法将与任务相关的示例直接整合到查询端,从而在各种任务中带来了显著的改进。此外,我们还研究了如何有效地将LLMs用作嵌入模型,包括各种注意力机制、池化方法等。我们的研究结果表明,保留原始框架通常会产生最佳结果,这凸显了简单即最佳的原则。在MTEB和AIR-Bench基准上的实验结果表明,我们的方法设定了新的最先进(SOTA)性能。我们的模型、代码和数据集可在https://github.com/FlagOpen/FlagEmbedding 免费获取。

英文摘要:

Large language models (LLMs) with decoder-only architectures demonstrate remarkable in-context learning (ICL) capabilities. This feature enables them to effectively handle both familiar and novel tasks by utilizing examples provided within their input context. Recognizing the potential of this capability, we propose leveraging the ICL feature in LLMs to enhance the process of text embedding generation. To this end, we introduce a novel model bge-en-icl, which employs few-shot examples to produce high-quality text embeddings. Our approach integrates task-related examples directly into the query side, resulting in significant improvements across various tasks. Additionally, we have investigated how to effectively utilize LLMs as embedding models, including various attention mechanisms, pooling methods, etc. Our findings suggest that retaining the original framework often yields the best results, underscoring that simplicity is best. Experimental results on the MTEB and AIR-Bench benchmarks demonstrate that our approach sets new state-of-the-art (SOTA) performance. Our model, code and dataset are freely available at https://github.com/FlagOpen/FlagEmbedding .

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑