In-context Learning with Retrieved Demonstrations for Language Models: A Survey
Not on the map. Why?
Abstract (arXiv)
Language models, especially pre-trained large language models, have showcased remarkable abilities as few-shot in-context learners (ICL), adept at adapting to new tasks with just a few demonstrations in the input context. However, the model's ability to perform ICL is sensitive to the choice of the few-shot demonstrations. Instead of using a fixed set of demonstrations, one recent development is to retrieve demonstrations tailored to each input query. The implementation of demonstration retrieval is relatively straightforward, leveraging existing databases and retrieval systems. This not only improves the efficiency and scalability of the learning process but also has been shown to reduce biases inherent in manual example selection. In light of the encouraging results and growing research in ICL with retrieved demonstrations, we conduct an extensive review of studies in this area. In this survey, we discuss and compare different design choices for retrieval models, retrieval training procedures, and inference algorithms.
Key facts. Cited by 70 papers in the map (data through 14 Oct 2026). Builds on 132 of its 175 references that are in the map. First posted on arXiv 21 Jan 2024.
Builds on
132 of 175 references.
References · 132
- 2017Attention Is All You Needcited by 60,361
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,399
- 2020Language Models are Few-Shot Learnerscited by 32,419
- 2022Training language models to follow instructions with human feedbackcited by 15,971
- 2019Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformercited by 14,599
- 2021LoRA: Low-Rank Adaptation of Large Language Modelscited by 14,380
- 2019RoBERTa: A Robustly Optimized BERT Pretraining Approachcited by 13,372
- 2023Llama 2: Open Foundation and Fine-Tuned Chat Modelscited by 13,028
- 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,459
- 2021Training Verifiers to Solve Math Word Problemscited by 10,109
- 2020Retrieval-Augmented Generation for Knowledge-Intensive NLP Taskscited by 9,297
- 2019Sentence-BERT: Sentence Embeddings using Siamese BERT-Networkscited by 9,170
38 more
- 2019BART: Denoising Sequence-to-Sequence Pre-training for Natural Language Generation, Translation, and Comprehensioncited by 5,893
- 2022Self-Consistency Improves Chain of Thought Reasoning in Language Modelscited by 5,708
- 2021Measuring Mathematical Problem Solving With the MATH Datasetcited by 5,371
- 2022PaLM: Scaling Language Modeling with Pathwayscited by 5,326
- 2018GLUE: A Multi-Task Benchmark and Analysis Platform for Natural Language Understandingcited by 4,899
- 2018Think you have Solved Question Answering? Try ARC, the AI2 Reasoning Challengecited by 4,886
- 2023Mamba: Linear-Time Sequence Modeling with Selective State Spacescited by 4,718
- 2022Flamingo: a Visual Language Model for Few-Shot Learningcited by 4,386
- 2013Efficient Estimation of Word Representations in Vector Spacecited by 4,375
- 2016SQuAD: 100,000+ Questions for Machine Comprehension of Textcited by 4,148
- 2019HellaSwag: Can a Machine Really Finish Your Sentence?cited by 4,100
- 2020Dense Passage Retrieval for Open-Domain Question Answeringcited by 3,824
- 2021The Power of Scale for Parameter-Efficient Prompt Tuningcited by 3,795
- 2023QLoRA: Efficient Finetuning of Quantized LLMscited by 3,418
- 2022Scaling Instruction-Finetuned Language Modelscited by 3,024
- 2017TriviaQA: A Large Scale Distantly Supervised Challenge Dataset for Reading Comprehensioncited by 2,955
- 2019PIQA: Reasoning about Physical Commonsense in Natural Languagecited by 2,883
- 2017A Broad-Coverage Challenge Corpus for Sentence Understanding through Inferencecited by 2,682
- 2023A Survey of Large Language Modelscited by 2,576
- 2015Character-level Convolutional Networks for Text Classificationcited by 2,330
- 2019BoolQ: Exploring the Surprising Difficulty of Natural Yes/No Questionscited by 2,183
- 2021SimCSE: Simple Contrastive Learning of Sentence Embeddingscited by 2,173
- 2018Can a Suit of Armor Conduct Electricity? A New Dataset for Open Book Question Answeringcited by 2,164
- 2020REALM: Retrieval-Augmented Language Model Pre-Trainingcited by 2,141
- 2019Language Models as Knowledge Bases?cited by 1,936
- 2015A large annotated corpus for learning natural language inferencecited by 1,847
- 2018CommonsenseQA: A Question Answering Challenge Targeting Commonsense Knowledgecited by 1,822
- 2020mT5: A massively multilingual pre-trained text-to-text transformercited by 1,818
- 2022Challenging BIG-Bench Tasks and Whether Chain-of-Thought Can Solve Themcited by 1,807
- 2016MS MARCO: A Human Generated MAchine Reading COmprehension Datasetcited by 1,605
- 2022Rethinking the Role of Demonstrations: What Makes In-Context Learning Work?cited by 1,434
- 2021Calibrate Before Use: Improving Few-Shot Performance of Language Modelscited by 1,392
- 2022Solving Quantitative Reasoning Problems with Language Modelscited by 1,392
- 2020Making Pre-trained Language Models Better Few-shot Learnerscited by 1,256
- 2022Text Embeddings by Weakly-Supervised Contrastive Pre-trainingcited by 1,253
- 2021What Makes Good In-Context Examples for GPT-3?cited by 1,195
- 2020ColBERT: Efficient and Effective Passage Search via Contextualized Late Interaction over BERTcited by 1,178
- 2021Fantastically Ordered Prompts and Where to Find Them: Overcoming Few-Shot Prompt Order Sensitivitycited by 1,135
50 most cited of 132 All 132 (JSON)
Built on by
Citing papers per year: 2024: 27; 2025: 35; 2026: 8.
70 papers.
Sort:
By area:
- 2024LLaMEA: A Large Language Model Evolutionary Algorithm for Automatically Generating Metaheuristicscited by 97
- 2024What Makes Multimodal In-Context Learning Work?cited by 56
- 2024Visual Prompting in Multimodal Large Language Models: A Surveycited by 54
- 2024Beyond Examples: High-level Automated Reasoning Paradigm in In-Context Learning via MCTScited by 54
- 2024Knowledge Mechanisms in Large Language Models: A Survey and Perspectivecited by 51
- 2025UFO2: The Desktop AgentOScited by 41
- 2024Prompt Optimization with EASE? Efficient Ordering-aware Automated Selection of Exemplarscited by 37
- 2024Mixture of In-Context Prompters for Tabular PFNscited by 33
- 2024AMOR: A Recipe for Building Adaptable Modular Knowledge Agents Through Process Feedbackcited by 25
- 2025TACO: Enhancing Multimodal In-context Learning via Task Mapping-Guided Sequence Configurationcited by 23
- 2025From Few to Many: Self-Improving Many-Shot Reasoners Through Iterative Optimization and Generationcited by 21
- 2024CEB: Compositional Evaluation Benchmark for Fairness in Large Language Modelscited by 18
38 more
- 2024Retrieval Meets Reasoning: Even High-school Textbook Knowledge Benefits Multimodal Reasoningcited by 14
- 2024CTINexus: Automatic Cyber Threat Intelligence Knowledge Graph Construction Using Large Language Modelscited by 14
- 2024Assessing Empathy in Large Language Models with Real-World Physician-Patient Interactionscited by 13
- 2025IC-Cache: Efficient Large Language Model Serving via In-context Cachingcited by 13
- 2025Problem-Solving Logic Guided Curriculum In-Context Learning for LLMs Complex Reasoningcited by 12
- 2025Mimic In-Context Learning for Multimodal Taskscited by 12
- 2024Improving Demonstration Diversity by Human-Free Fusing for Text-to-SQLcited by 10
- 2024Hyperband-based Bayesian Optimization for Black-box Prompt Selectioncited by 10
- 2025Federated Retrieval Augmented Generation for Multi-Product Question Answeringcited by 10
- 2024SPL: A Socratic Playground for Learning Powered by Large Language Modelcited by 9
- 2024Divide, Reweight, and Conquer: A Logit Arithmetic Approach for In-Context Learningcited by 9
- 2026Demo-ICL: In-Context Learning for Procedural Video Knowledge Acquisitioncited by 8
- 2024XAMPLER: Learning to Retrieve Cross-Lingual In-Context Examplescited by 5
- 2024Mixtures of In-Context Learnerscited by 5
- 2024MICAS: Multi-grained In-Context Adaptive Sampling for 3D Point Cloud Processingcited by 5
- 2025Learning to Select In-Context Demonstration Preferred by Large Language Modelcited by 5
- 2024One size doesn't fit all: Predicting the Number of Examples for In-Context Learningcited by 4
- 2025Why is prompting hard? Understanding prompts on binary sequence predictorscited by 4
- 2025PICASO: Permutation-Invariant Context Composition with State Space Modelscited by 4
- 2025DCG-SQL: Enhancing In-Context Learning for Text-to-SQL with Deep Contextual Schema Link Graphcited by 4
- 2025Retrieval-Augmented Generation as Noisy In-Context Learning: A Unified Theory and Risk Boundscited by 4
- 2025Neural Network Reprogrammability: A Unified Theme on Model Reprogramming, Prompt Tuning, and Prompt Instructioncited by 4
- 2024In-Context Transfer Learning: Demonstration Synthesis by Transferring Similar Taskscited by 3
- 2024DemoShapley: Valuation of Demonstrations for In-Context Learningcited by 3
- 2024Comparative Analysis of Demonstration Selection Algorithms for LLM In-Context Learningcited by 3
- 2025Post-Incorporating Code Structural Knowledge into Pretrained Models via ICL for Code Translationcited by 3
- 2025RICo: Refined In-Context Contribution for Automatic Instruction-Tuning Data Selectioncited by 3
- 2025Retrieval-Augmented Review Generation for Poisoning Recommender Systemscited by 3
- 2026Modality-free Graph In-context Alignmentcited by 3
- 2025MateICL: Mitigating Attention Dispersion in Large-Scale In-Context Learningcited by 2
- 2025Spoken Language Understanding on Unseen Tasks With In-Context Learningcited by 2
- 2025Delta-KNN: Improving Demonstration Selection in In-Context Learning for Alzheimer's Disease Detectioncited by 2
- 2025Distilling Many-Shot In-Context Learning into a Cheat Sheetcited by 2
- 2024E-ICL: Enhancing Fine-Grained Emotion Recognition through the Lens of Prototype Theorycited by 1
- 2024DoubleDipper: Improving Long-Context LLMs via Context Recyclingcited by 1
- 2025Explanation based In-Context Demonstrations Retrieval for Multilingual Grammatical Error Correctioncited by 1
- 2025LLMIA: An Out-of-the-Box Index Advisor via In-Context Learning with LLMscited by 1
- 2025Making Large Language Models Better Reasoners with Orchestrated Streaming Experiencescited by 1
50 most cited of 70 All 70 (JSON)
- 2026Retrieval-Based In-Context Learning: A Domain Adaptation Framework5 Oct 2026
- 2026MILO: Efficient Many-shot In-Context Learning with Block-wise Low-rank Compression24 Sep 2026
- 2026Beyond Surface Imitation: Contrastive Modeling for Reasoning Path Alignment in Multimodal In-Context Learning9 Sep 2026
- 2026AAS-RAIL: Improving Information Extraction for Asset Administration Shells through Retrieval-Augmented In-Context Learning7 Sep 2026
- 2026CoDA: Towards Effective Cross-domain Knowledge Transfer via CoT-guided Domain Adaptation21 Apr 2026
- 2026Modality-free Graph In-context Alignment13 Mar 2026
- 2026Regime-aware financial volatility forecasting via in-context learning11 Mar 2026
- 2026Demo-ICL: In-Context Learning for Procedural Video Knowledge Acquisition9 Feb 2026
- 2025From Retrieval to Reasoning: A Framework for Cyber Threat Intelligence NER with Explicit and Adaptive Instructions22 Dec 2025
- 2025Rethinking Label Consistency of In-Context Learning: An Implicit Transductive Label Propagation Perspective13 Dec 2025
- 2025Fairness in Multi-modal Medical Diagnosis with Demonstration Selection20 Nov 2025
- 2025Reflexive Evidence-Based Multimodal Learning for Clean Energy Transitions: Causal Insights on Cooking Fuel Access, Urbanization, and Carbon Emissions19 Nov 2025
38 more
- 2025Distilling Many-Shot In-Context Learning into a Cheat Sheet25 Sep 2025
- 2025KITE: Kernelized and Information Theoretic Exemplars for In-Context Learning19 Sep 2025
- 2025Retrieval-Augmented Review Generation for Poisoning Recommender Systems21 Aug 2025
- 2025Learning-to-Context Slope: Evaluating In-Context Learning Effectiveness Beyond Performance Illusions29 Jun 2025
- 2025Neural Network Reprogrammability: A Unified Theme on Model Reprogramming, Prompt Tuning, and Prompt Instruction5 Jun 2025
- 2025Delta-KNN: Improving Demonstration Selection in In-Context Learning for Alzheimer's Disease Detection4 Jun 2025
- 2025Retrieval-Augmented Generation as Noisy In-Context Learning: A Unified Theory and Risk Bounds3 Jun 2025
- 2025Open-Set Living Need Prediction with Large Language Models3 Jun 2025
- 2025CrossICL: Cross-Task In-Context Learning via Unsupervised Demonstration Transfer30 May 2025
- 2025Learning to Select In-Context Demonstration Preferred by Large Language Model26 May 2025
- 2025DCG-SQL: Enhancing In-Context Learning for Text-to-SQL with Deep Contextual Schema Link Graph26 May 2025
- 2025TACO: Enhancing Multimodal In-context Learning via Task Mapping-Guided Sequence Configuration21 May 2025
- 2025Spoken Language Understanding on Unseen Tasks With In-Context Learning12 May 2025
- 2025RICo: Refined In-Context Contribution for Automatic Instruction-Tuning Data Selection8 May 2025
- 2025MateICL: Mitigating Attention Dispersion in Large-Scale In-Context Learning2 May 2025
- 2025UFO2: The Desktop AgentOS20 Apr 2025
- 2025Selective Demonstration Retrieval for Improved Implicit Hate Speech Detection16 Apr 2025
- 2025Improving In-Context Learning with Reasoning Distillation14 Apr 2025
- 2025Mimic In-Context Learning for Multimodal Tasks11 Apr 2025
- 2025AI Judges in Design: Statistical Perspectives on Achieving Human Expert Equivalence With Vision-Language Models1 Apr 2025
- 2025Making Large Language Models Better Reasoners with Orchestrated Streaming Experiences1 Apr 2025
- 2025Post-Incorporating Code Structural Knowledge into Pretrained Models via ICL for Code Translation28 Mar 2025
- 2025LLMIA: An Out-of-the-Box Index Advisor via In-Context Learning with LLMs10 Mar 2025
- 2025PICASO: Permutation-Invariant Context Composition with State Space Models24 Feb 2025
- 2025Problem-Solving Logic Guided Curriculum In-Context Learning for LLMs Complex Reasoning21 Feb 2025
- 2025Why is prompting hard? Understanding prompts on binary sequence predictors15 Feb 2025
- 2025Explanation based In-Context Demonstrations Retrieval for Multilingual Grammatical Error Correction12 Feb 2025
- 2025Exploring Imbalanced Annotations for Effective In-Context Learning6 Feb 2025
- 2025From Few to Many: Self-Improving Many-Shot Reasoners Through Iterative Optimization and Generation1 Feb 2025
- 2025Federated Retrieval Augmented Generation for Multi-Product Question Answering25 Jan 2025
- 2025IC-Cache: Efficient Large Language Model Serving via In-context Caching22 Jan 2025
- 2024Hyperband-based Bayesian Optimization for Black-box Prompt Selection10 Dec 2024
- 2024Beyond Examples: High-level Automated Reasoning Paradigm in In-Context Learning via MCTS27 Nov 2024
- 2024MICAS: Multi-grained In-Context Adaptive Sampling for 3D Point Cloud Processing25 Nov 2024
- 2024GRL-Prompt: Towards Knowledge Graph based Prompt Optimization via Reinforcement Learning19 Nov 2024
- 2024Mixtures of In-Context Learners5 Nov 2024
- 2024Comparative Analysis of Demonstration Selection Algorithms for LLM In-Context Learning30 Oct 2024
- 2024CTINexus: Automatic Cyber Threat Intelligence Knowledge Graph Construction Using Large Language Models28 Oct 2024
50 newest of 70 All 70 (JSON)
- 2024Beyond Examples: High-level Automated Reasoning Paradigm in In-Context Learning via MCTScited by 54
- 2025From Few to Many: Self-Improving Many-Shot Reasoners Through Iterative Optimization and Generationcited by 21
- 2024Retrieval Meets Reasoning: Even High-school Textbook Knowledge Benefits Multimodal Reasoningcited by 14
- 2025Problem-Solving Logic Guided Curriculum In-Context Learning for LLMs Complex Reasoningcited by 12
- 2025Making Large Language Models Better Reasoners with Orchestrated Streaming Experiencescited by 1
- 2025Improving In-Context Learning with Reasoning Distillationcited by 1
- 2026Beyond Surface Imitation: Contrastive Modeling for Reasoning Path Alignment in Multimodal In-Context Learningcited by 1
- 2025Rethinking Label Consistency of In-Context Learning: An Implicit Transductive Label Propagation Perspectivecited by 0
- 2025From Retrieval to Reasoning: A Framework for Cyber Threat Intelligence NER with Explicit and Adaptive Instructionscited by 0
- 2026CoDA: Towards Effective Cross-domain Knowledge Transfer via CoT-guided Domain Adaptationcited by 0
- 2026Beyond Surface Imitation: Contrastive Modeling for Reasoning Path Alignment in Multimodal In-Context Learning9 Sep 2026
- 2026CoDA: Towards Effective Cross-domain Knowledge Transfer via CoT-guided Domain Adaptation21 Apr 2026
- 2025From Retrieval to Reasoning: A Framework for Cyber Threat Intelligence NER with Explicit and Adaptive Instructions22 Dec 2025
- 2025Rethinking Label Consistency of In-Context Learning: An Implicit Transductive Label Propagation Perspective13 Dec 2025
- 2025Improving In-Context Learning with Reasoning Distillation14 Apr 2025
- 2025Making Large Language Models Better Reasoners with Orchestrated Streaming Experiences1 Apr 2025
- 2025Problem-Solving Logic Guided Curriculum In-Context Learning for LLMs Complex Reasoning21 Feb 2025
- 2025From Few to Many: Self-Improving Many-Shot Reasoners Through Iterative Optimization and Generation1 Feb 2025
- 2024Beyond Examples: High-level Automated Reasoning Paradigm in In-Context Learning via MCTS27 Nov 2024
- 2024Retrieval Meets Reasoning: Even High-school Textbook Knowledge Benefits Multimodal Reasoning31 May 2024
- 2024Visual Prompting in Multimodal Large Language Models: A Surveycited by 54
- 2025TACO: Enhancing Multimodal In-context Learning via Task Mapping-Guided Sequence Configurationcited by 23
- 2025Mimic In-Context Learning for Multimodal Taskscited by 12
- 2026Demo-ICL: In-Context Learning for Procedural Video Knowledge Acquisitioncited by 8
- 2025Fairness in Multi-modal Medical Diagnosis with Demonstration Selectioncited by 1
- 2025AI Judges in Design: Statistical Perspectives on Achieving Human Expert Equivalence With Vision-Language Modelscited by 0
- 2026Demo-ICL: In-Context Learning for Procedural Video Knowledge Acquisition9 Feb 2026
- 2025Fairness in Multi-modal Medical Diagnosis with Demonstration Selection20 Nov 2025
- 2025TACO: Enhancing Multimodal In-context Learning via Task Mapping-Guided Sequence Configuration21 May 2025
- 2025Mimic In-Context Learning for Multimodal Tasks11 Apr 2025
- 2025AI Judges in Design: Statistical Perspectives on Achieving Human Expert Equivalence With Vision-Language Models1 Apr 2025
- 2024Visual Prompting in Multimodal Large Language Models: A Survey5 Sep 2024
- 2025Federated Retrieval Augmented Generation for Multi-Product Question Answeringcited by 10
- 2025Retrieval-Augmented Generation as Noisy In-Context Learning: A Unified Theory and Risk Boundscited by 4
- 2025Retrieval-Augmented Review Generation for Poisoning Recommender Systemscited by 3
- 2026AAS-RAIL: Improving Information Extraction for Asset Administration Shells through Retrieval-Augmented In-Context Learningcited by 0
- 2026AAS-RAIL: Improving Information Extraction for Asset Administration Shells through Retrieval-Augmented In-Context Learning7 Sep 2026
- 2025Retrieval-Augmented Review Generation for Poisoning Recommender Systems21 Aug 2025
- 2025Retrieval-Augmented Generation as Noisy In-Context Learning: A Unified Theory and Risk Bounds3 Jun 2025
- 2025Federated Retrieval Augmented Generation for Multi-Product Question Answering25 Jan 2025
- 2024LLaMEA: A Large Language Model Evolutionary Algorithm for Automatically Generating Metaheuristicscited by 97
- 2024What Makes Multimodal In-Context Learning Work?cited by 56
- 2024Knowledge Mechanisms in Large Language Models: A Survey and Perspectivecited by 51
- 2025UFO2: The Desktop AgentOScited by 41
- 2024Prompt Optimization with EASE? Efficient Ordering-aware Automated Selection of Exemplarscited by 37
- 2024Mixture of In-Context Prompters for Tabular PFNscited by 33
- 2024CEB: Compositional Evaluation Benchmark for Fairness in Large Language Modelscited by 18
- 2024CTINexus: Automatic Cyber Threat Intelligence Knowledge Graph Construction Using Large Language Modelscited by 14
- 2024Assessing Empathy in Large Language Models with Real-World Physician-Patient Interactionscited by 13
- 2025IC-Cache: Efficient Large Language Model Serving via In-context Cachingcited by 13
- 2024Improving Demonstration Diversity by Human-Free Fusing for Text-to-SQLcited by 10
- 2024Hyperband-based Bayesian Optimization for Black-box Prompt Selectioncited by 10
12 most cited of 46 All 46 (JSON)
- 2026Retrieval-Based In-Context Learning: A Domain Adaptation Framework5 Oct 2026
- 2026Modality-free Graph In-context Alignment13 Mar 2026
- 2026Regime-aware financial volatility forecasting via in-context learning11 Mar 2026
- 2025Reflexive Evidence-Based Multimodal Learning for Clean Energy Transitions: Causal Insights on Cooking Fuel Access, Urbanization, and Carbon Emissions19 Nov 2025
- 2025Distilling Many-Shot In-Context Learning into a Cheat Sheet25 Sep 2025
- 2025KITE: Kernelized and Information Theoretic Exemplars for In-Context Learning19 Sep 2025
- 2025Learning-to-Context Slope: Evaluating In-Context Learning Effectiveness Beyond Performance Illusions29 Jun 2025
- 2025Neural Network Reprogrammability: A Unified Theme on Model Reprogramming, Prompt Tuning, and Prompt Instruction5 Jun 2025
- 2025Delta-KNN: Improving Demonstration Selection in In-Context Learning for Alzheimer's Disease Detection4 Jun 2025
- 2025CrossICL: Cross-Task In-Context Learning via Unsupervised Demonstration Transfer30 May 2025
- 2025Learning to Select In-Context Demonstration Preferred by Large Language Model26 May 2025
- 2025DCG-SQL: Enhancing In-Context Learning for Text-to-SQL with Deep Contextual Schema Link Graph26 May 2025
12 newest of 46 All 46 (JSON)