atlas

Research map / Large language models / Language, safety and interpretability

Making Text Embedders Few-Shot Learners

ICLR 2025 · Large language models › Language, safety and interpretability · approach: In-context learning analysis · 3 citations (OpenAlex)

Read the paperCheck your idea against 108,967 papers

AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.

Proposes bge-en-icl, which puts few-shot task examples into the query side of a Mistral-7B LLM embedder trained with contrastive loss, reaching SOTA on MTEB and AIR-Bench.

Problem

LLM-based text embedders generalize poorly to unseen task instructions and complex retrieval tasks; the paper asks whether in-context learning can make embeddings more adaptable.

Approach

Few-shot query-passage examples are prepended to the query during contrastive fine-tuning (with a randomized 0-5 example sampling from in-batch pairs), so the LLM's ICL ability is used to generate task-adapted embeddings, while keeping the original causal attention and last-token [EOS] pooling.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Add few-shot examples to query promptsbge-en-icl · MTEB (public data only)Avg.: 64.67 -> 66.08; ↑1.41Helped
Add few-shot examples to query promptsbge-en-icl · MTEB (full data)Avg.: 71.24 -> 71.67; ↑0.43Helped
Add few-shot examples to query promptsbge-en-icl · AIR-Bench 24.04 QAnDCG@10 Avg.: 52.93 -> 54.36; 1.43 pointsHelped
Add few-shot examples to query promptsbge-en-icl · AIR-Bench 24.04 Long-DocRecall@10 Avg.: 74.86 -> 75.98; 1.08 pointsHelped
Train with three fixed examples (ablation)bge-en-icl · MTEB, zero-shotAvg.: 64.83 -> 61.50; decrease of 3.33 pointsHurt
Train with three fixed examples (ablation)bge-en-icl · MTEB, few-shotAvg.: 64.83 -> 65.46; 0.63 pointsHelped
Train with a variable number of in-batch examples (ablation)bge-en-icl · MTEB, zero-shotAvg.: 64.83 -> 64.67; decrease of 0.16 pointsNo clear effect
Train with a variable number of in-batch examples (ablation)bge-en-icl · MTEB, few-shotAvg.: 64.83 -> 66.08; ↑1.25Helped
Replace last token pooling with mean pooling while retaining causal attention (ablation)bge-en-icl without ICL · MTEBAvg.: 64.83 -> 61.03Hurt
Replace causal attention with bidirectional attention (ablation)bge-en-icl, few-shot · MTEBAvg.: 66.08 -> 65.74Hurt
Add a passage-side summary prompt (ablation)bge-en-icl, zero-shot · MTEBAvg.: 64.67 -> 61.61Hurt
Add a passage-side summary prompt (ablation)bge-en-icl, few-shot · MTEBAvg.: 66.08 -> 61.74Hurt

Surprising findings

Limitations

Experimental setup

Datasets: ELI5 HotpotQA FEVER MSMARCO NQ NLI SQuAD TriviaQA Quora Duplicate Questions MIRACL Mr.TyDi DuReader

Benchmarks: MTEB AIR-Bench MIRACL FR-MTEB PL-MTEB C-MTEB

Metrics: nDCG@10 Recall@10 Recall@100 average score across MTEB tasks

Baselines: E5-mistral-7b-instruct GritLM-7B SFR-Embedding Linq-Embed-Mistral voyage-large-2-instruct NV-Embed-v1 gte-Qwen2-7B-instruct stella_en_1.5B_v5 LLM2Vec-Mistral-supervised text-embedding-3-large

Builds on: E5-mistral LLM2Vec GritLM NV-Embed InfoNCE

Closest papers by meaning

Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.

Open scime draft

Get the next scime Dispatch and a monthly field update

Free. We send a confirmation link first; every email has a one-click unsubscribe. Privacy