mlsanityData to 7 Oct 2026

Embedding-based In-Context Prompt Training for Enhancing LLMs as Text Encoders

arXiv 2605.01372 ↗First posted 2 May 2026cs.CLcited by 0

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

  1. 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
  2. 2020Language Models are Few-Shot Learnerscited by 32,199
  3. 2019Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformercited by 14,491
  4. 2019RoBERTa: A Robustly Optimized BERT Pretraining Approachcited by 13,266
  5. 2023Llama 2: Open Foundation and Fine-Tuned Chat Modelscited by 12,865
  6. 2020Retrieval-Augmented Generation for Knowledge-Intensive NLP Taskscited by 9,160
  7. 2019Sentence-BERT: Sentence Embeddings using Siamese BERT-Networkscited by 9,049
  8. 2013Efficient Estimation of Word Representations in Vector Spacecited by 4,346
  9. 2016SQuAD: 100,000+ Questions for Machine Comprehension of Textcited by 4,115
  10. 2021Prefix-Tuning: Optimizing Continuous Prompts for Generationcited by 3,878
  11. 2020Dense Passage Retrieval for Open-Domain Question Answeringcited by 3,779
  12. 2021The Power of Scale for Parameter-Efficient Prompt Tuningcited by 3,769
38 more
  1. 2018HotpotQA: A Dataset for Diverse, Explainable Multi-hop Question Answeringcited by 3,686
  2. 2017TriviaQA: A Large Scale Distantly Supervised Challenge Dataset for Reading Comprehensioncited by 2,895
  3. 2023FlashAttention-2: Faster Attention with Better Parallelism and Work Partitioningcited by 2,551
  4. 2021SimCSE: Simple Contrastive Learning of Sentence Embeddingscited by 2,168
  5. 2016MS MARCO: A Human Generated MAchine Reading COmprehension Datasetcited by 1,591
  6. 2018FEVER: a large-scale dataset for Fact Extraction and VERificationcited by 1,362
  7. 2022Text Embeddings by Weakly-Supervised Contrastive Pre-trainingcited by 1,216
  8. 2021Unsupervised Dense Information Retrieval with Contrastive Learningcited by 1,203
  9. 2025Qwen3 Embedding: Advancing Text Embedding and Reranking Through Foundation Modelscited by 1,175
  10. 2023Towards General Text Embeddings with Multi-stage Contrastive Learningcited by 705
  11. 2019ELI5: Long Form Question Answeringcited by 567
  12. 2023C-Pack: Packed Resources For General Chinese Embeddingscited by 556
  13. 2024NV-Embed: Improved Techniques for Training LLMs as Generalist Embedding Modelscited by 466
  14. 2021Sentence-T5: Scalable Sentence Encoders from Pre-trained Text-to-Text Modelscited by 462
  15. 2021Large Dual Encoders Are Generalizable Retrieverscited by 454
  16. 2024LLM2Vec: Large Language Models Are Secretly Powerful Text Encoderscited by 396
  17. 2022One Embedder, Any Task: Instruction-Finetuned Text Embeddingscited by 329
  18. 2023In-Context Learning Creates Task Vectorscited by 302
  19. 2023Fine-Tuning LLaMA for Multi-Stage Text Retrievalcited by 271
  20. 2024Generative Representational Instruction Tuningcited by 227
  21. 2022SGPT: GPT Sentence Embeddings for Semantic Searchcited by 204
  22. 2018An efficient framework for learning sentence representationscited by 197
  23. 2021Mr. TyDi: A Multi-lingual Benchmark for Dense Retrievalcited by 118
  24. 2017DuReader: a Chinese Machine Reading Comprehension Dataset from Real-world Applicationscited by 110
  25. 2025Gemini Embedding: Generalizable Embeddings from Geminicited by 93
  26. 2024ChatQA: Surpassing GPT-4 on Conversational QA and RAGcited by 90
  27. 2025HalluLens: LLM Hallucination Benchmarkcited by 88
  28. 2024Making Text Embedders Few-Shot Learnerscited by 78
  29. 2023Llama2Vec: Unsupervised Adaptation of Large Language Models for Dense Retrievalcited by 77
  30. 2015Towards Universal Paraphrastic Sentence Embeddingscited by 59
  31. 2023T2Ranking: A large-scale Chinese Benchmark for Passage Rankingcited by 59
  32. 2024Social Bias Evaluation for Large Language Models Requires Prompt Variationscited by 39
  33. 2025KaLM-Embedding-V2: Superior Training Techniques and Data Inspire A Versatile Embedding Modelcited by 35
  34. 2023BeLLM: Backward Dependency Enhanced Large Language Model for Sentence Embeddingscited by 32
  35. 2025Task Vectors in In-Context Learning: Emergence, Formation, and Benefitcited by 20
  36. 2024Vector-ICL: In-context Learning with Continuous Vector Representationscited by 13
  37. 2025Training LLMs to be Better Text Embedders through Bidirectional Reconstructioncited by 6
  38. 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.