Share your thoughts, 1 month free Claude Pro on usSee more
WorkDL logo mark

Making Text Embedders Few-Shot Learners

About

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 .

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

Related benchmarks

TaskDatasetResultRank
Text EmbeddingMTEB English v2
Mean Score69.36
68
Information RetrievalBEIR
Average NDCG@100.632
62
Sentence Embedding EvaluationMTEB (test)
Classification Score88.62
55
Text EmbeddingMTEB
MTEB Score66.08
45
Information RetrievalFIQA BEIR (test)
nDCG@1059.7
32
Information RetrievalNFCorpus BEIR
nDCG41.9
22
Information RetrievalFEVER BEIR
nDCG0.928
22
Information RetrievalQuora BEIR
nDCG@1091
17
Information RetrievalDBPedia-Entity BEIR
NDCG@1051.6
17
Information RetrievalHotpotQA BEIR
NDCG@1085.1
17
Showing 10 of 24 rows

Other info

Follow for update