Making Text Embedders Few-Shot Learners

Fuente: arXiv
Enregistré dans:
Détails bibliographiques
Auteurs principaux: Li, Chaofan, Qin, MingHao, Xiao, Shitao, Chen, Jianlyu, Luo, Kun, Shao, Yingxia, Lian, Defu, Liu, Zheng
Format: Preprint
Publié: 2024
Sujets:
Accès en ligne:
Tags: Ajouter un tag
Pas de tags, Soyez le premier à ajouter un tag!
_version_ 1866917784462557184
author Li, Chaofan
Qin, MingHao
Xiao, Shitao
Chen, Jianlyu
Luo, Kun
Shao, Yingxia
Lian, Defu
Liu, Zheng
author_facet Li, Chaofan
Qin, MingHao
Xiao, Shitao
Chen, Jianlyu
Luo, Kun
Shao, Yingxia
Lian, Defu
Liu, Zheng
contents 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 .
format Preprint
id arxiv_https___arxiv_org_abs_2409_15700
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Making Text Embedders Few-Shot Learners
Li, Chaofan
Qin, MingHao
Xiao, Shitao
Chen, Jianlyu
Luo, Kun
Shao, Yingxia
Lian, Defu
Liu, Zheng
Information Retrieval
Computation and Language
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 .
title Making Text Embedders Few-Shot Learners
topic Information Retrieval
Computation and Language
url https://arxiv.org/abs/2409.15700