Embedding-based In-Context Prompt Training for Enhancing LLMs as Text Encoders
Not on the map. Why?
Abstract (arXiv)
Large language models (LLMs) have been widely explored for embedding generation. While recent studies show that in-context learning (ICL) effectively enhances the representational capability of LLMs by prepending a few task-related demonstrations, it causes substantial token overhead due to the increased sequence length. In this work, we propose EPIC, a novel embedding-based in-context prompt training strategy that leverages ICL to generate high-quality embeddings while reducing computational burden during both training and inference. This approach replaces discrete text demonstrations with their corresponding continuous embeddings, which not only encourages the LLM to align semantically-related text pairs during contrastive learning, but also requires the model to interpret demonstration embeddings as part of the in-context prompt. Consequently, EPIC-trained models achieve excellent embedding performance both with or without in-context prompts at inference time. Comprehensive experiments demonstrate that our method establishes new state-of-the-art results on the MTEB benchmark, surpassing frontier models trained solely on publicly available retrieval data. Extensive ablation studies further validate the effectiveness and necessity of our mechanism.
Key facts. No citing papers in the map yet (data through 7 Oct 2026). Builds on 51 of its 64 references that are in the map. First posted on arXiv 2 May 2026.
Builds on
51 of 64 references.
References · 51
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
- 2020Language Models are Few-Shot Learnerscited by 32,199
- 2019Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformercited by 14,491
- 2019RoBERTa: A Robustly Optimized BERT Pretraining Approachcited by 13,266
- 2023Llama 2: Open Foundation and Fine-Tuned Chat Modelscited by 12,865
- 2020Retrieval-Augmented Generation for Knowledge-Intensive NLP Taskscited by 9,160
- 2019Sentence-BERT: Sentence Embeddings using Siamese BERT-Networkscited by 9,049
- 2013Efficient Estimation of Word Representations in Vector Spacecited by 4,346
- 2016SQuAD: 100,000+ Questions for Machine Comprehension of Textcited by 4,115
- 2021Prefix-Tuning: Optimizing Continuous Prompts for Generationcited by 3,878
- 2020Dense Passage Retrieval for Open-Domain Question Answeringcited by 3,779
- 2021The Power of Scale for Parameter-Efficient Prompt Tuningcited by 3,769
38 more
- 2018HotpotQA: A Dataset for Diverse, Explainable Multi-hop Question Answeringcited by 3,686
- 2017TriviaQA: A Large Scale Distantly Supervised Challenge Dataset for Reading Comprehensioncited by 2,895
- 2023FlashAttention-2: Faster Attention with Better Parallelism and Work Partitioningcited by 2,551
- 2021SimCSE: Simple Contrastive Learning of Sentence Embeddingscited by 2,168
- 2016MS MARCO: A Human Generated MAchine Reading COmprehension Datasetcited by 1,591
- 2018FEVER: a large-scale dataset for Fact Extraction and VERificationcited by 1,362
- 2022Text Embeddings by Weakly-Supervised Contrastive Pre-trainingcited by 1,216
- 2021Unsupervised Dense Information Retrieval with Contrastive Learningcited by 1,203
- 2025Qwen3 Embedding: Advancing Text Embedding and Reranking Through Foundation Modelscited by 1,175
- 2023Towards General Text Embeddings with Multi-stage Contrastive Learningcited by 705
- 2019ELI5: Long Form Question Answeringcited by 567
- 2023C-Pack: Packed Resources For General Chinese Embeddingscited by 556
- 2024NV-Embed: Improved Techniques for Training LLMs as Generalist Embedding Modelscited by 466
- 2021Sentence-T5: Scalable Sentence Encoders from Pre-trained Text-to-Text Modelscited by 462
- 2021Large Dual Encoders Are Generalizable Retrieverscited by 454
- 2024LLM2Vec: Large Language Models Are Secretly Powerful Text Encoderscited by 396
- 2022One Embedder, Any Task: Instruction-Finetuned Text Embeddingscited by 329
- 2023In-Context Learning Creates Task Vectorscited by 302
- 2023Fine-Tuning LLaMA for Multi-Stage Text Retrievalcited by 271
- 2024Generative Representational Instruction Tuningcited by 227
- 2022SGPT: GPT Sentence Embeddings for Semantic Searchcited by 204
- 2018An efficient framework for learning sentence representationscited by 197
- 2021Mr. TyDi: A Multi-lingual Benchmark for Dense Retrievalcited by 118
- 2017DuReader: a Chinese Machine Reading Comprehension Dataset from Real-world Applicationscited by 110
- 2025Gemini Embedding: Generalizable Embeddings from Geminicited by 93
- 2024ChatQA: Surpassing GPT-4 on Conversational QA and RAGcited by 90
- 2025HalluLens: LLM Hallucination Benchmarkcited by 88
- 2024Making Text Embedders Few-Shot Learnerscited by 78
- 2023Llama2Vec: Unsupervised Adaptation of Large Language Models for Dense Retrievalcited by 77
- 2015Towards Universal Paraphrastic Sentence Embeddingscited by 59
- 2023T2Ranking: A large-scale Chinese Benchmark for Passage Rankingcited by 59
- 2024Social Bias Evaluation for Large Language Models Requires Prompt Variationscited by 39
- 2025KaLM-Embedding-V2: Superior Training Techniques and Data Inspire A Versatile Embedding Modelcited by 35
- 2023BeLLM: Backward Dependency Enhanced Large Language Model for Sentence Embeddingscited by 32
- 2025Task Vectors in In-Context Learning: Emergence, Formation, and Benefitcited by 20
- 2024Vector-ICL: In-context Learning with Continuous Vector Representationscited by 13
- 2025Training LLMs to be Better Text Embedders through Bidirectional Reconstructioncited by 6
- 2025Negative Matters: Multi-Granularity Hard-Negative Synthesis and Anchor-Token-Aware Pooling for Enhanced Text Embeddingscited by 3
50 most cited of 51 All 51 (JSON)
Built on by
Not cited yet.