Dr.ICL: Demonstration-Retrieved In-context Learning
Not on the map. Why?
Abstract (arXiv)
In-context learning (ICL), teaching a large language model (LLM) to perform a task with few-shot demonstrations rather than adjusting the model parameters, has emerged as a strong paradigm for using LLMs. While early studies primarily used a fixed or random set of demonstrations for all test queries, recent research suggests that retrieving semantically similar demonstrations to the input from a pool of available demonstrations results in better performance. This work expands the applicability of retrieval-based ICL approaches by demonstrating that even simple word-overlap similarity measures such as BM25 outperform randomly selected demonstrations. Furthermore, we extend the success of retrieval-based ICL to instruction-finetuned LLMs as well as Chain-of-Thought (CoT) prompting. For instruction-finetuned LLMs, we find that although a model has already seen the training data at training time, retrieving demonstrations from the training data at test time yields better results compared to using no demonstrations or random demonstrations. Last but not least, we train a task-specific demonstration retriever that outperforms off-the-shelf retrievers.
Key facts. Cited by 72 papers in the map (data through 14 Oct 2026). Builds on 28 of its 34 references that are in the map. First posted on arXiv 23 May 2023.
Builds on
28 of 34 references.
References · 28
- 2020Language Models are Few-Shot Learnerscited by 32,419
- 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,459
- 2022PaLM: Scaling Language Modeling with Pathwayscited by 5,326
- 2021On the Opportunities and Risks of Foundation Modelscited by 4,033
- 2022Scaling Instruction-Finetuned Language Modelscited by 3,024
- 2022Emergent Abilities of Large Language Modelscited by 2,512
- 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
- 2021What Makes Good In-Context Examples for GPT-3?cited by 1,195
- 2021An Explanation of In-context Learning as Implicit Bayesian Inferencecited by 938
16 more
- 2023In-Context Retrieval-Augmented Language Modelscited by 702
- 2021Cross-Task Generalization via Natural Language Crowdsourcing Instructionscited by 699
- 2021Learning To Retrieve Prompts for In-Context Learningcited by 648
- 2021Large Dual Encoders Are Generalizable Retrieverscited by 456
- 2022Complexity-Based Prompting for Multi-Step Reasoningcited by 388
- 2022Towards Understanding Chain-of-Thought Prompting: An Empirical Study of What Matterscited by 222
- 2022Demystifying Prompts in Language Models via Perplexity Estimationcited by 216
- 2022Ask Me Anything: A simple strategy for prompting language modelscited by 155
- 2023Compositional Exemplars for In-context Learningcited by 144
- 2022Text and Patterns: For Effective Chain of Thought, It Takes Two to Tangocited by 128
- 2023UPRISE: Universal Prompt Retrieval for Improving Zero-Shot Evaluationcited by 75
- 2022Z-ICL: Zero-Shot In-Context Learning with Pseudo-Demonstrationscited by 70
- 2021Reordering Examples Helps during Priming-based Few-Shot Learningcited by 50
- 2022Decoupling Knowledge from Memorization: Retrieval-augmented Prompt Learningcited by 36
- 2022Cross-Lingual Retrieval Augmented Prompt for Low-Resource Languagescited by 17
- 2023Understanding Finetuning for Factual Knowledge Extraction from Language Modelscited by 13
Built on by
Citing papers per year: 2023: 14; 2024: 23; 2025: 25; 2026: 10.
72 papers.
Sort:
By area:
- 2023Efficient Large Language Models: A Surveycited by 186
- 2025A Survey of Frontiers in LLM Reasoning: Inference Scaling, Learning to Reason, and Agentic Systemscited by 111
- 2023In-Context Learning with Iterative Demonstration Selectioncited by 74
- 2024In-context Learning with Retrieved Demonstrations for Language Models: A Surveycited by 70
- 2025Sampling-Efficient Test-Time Scaling: Self-Estimating the Best-of-N Sampling in Early Decodingcited by 63
- 2023Learning to Retrieve In-Context Examples for Large Language Modelscited by 60
- 2024Revisiting Demonstration Selection Strategies in In-Context Learningcited by 58
- 2023Large Language Model-Aware In-Context Learning for Code Generationcited by 43
- 2025Towards Agentic RAG with Deep Reasoning: A Survey of RAG-Reasoning Systems in LLMscited by 42
- 2024Knowledge Boundary of Large Language Models: A Surveycited by 40
- 2025A Survey of Test-Time Compute: From Intuitive Inference to Deliberate Reasoningcited by 40
- 2023Towards LogiGLUE: A Brief Survey and A Benchmark for Analyzing Logical Reasoning Capabilities of Language Modelscited by 35
38 more
- 2024INMS: Memory Sharing for Large Language Model based Agentscited by 31
- 2023SurrealDriver: Designing LLM-powered Generative Driver Agent Framework based on Human Drivers' Driving-thinking Datacited by 24
- 2025ReLearn: Unlearning via Learning for Large Language Modelscited by 22
- 2025Mitigating Lost-in-Retrieval Problems in Retrieval Augmented Multi-Hop Question Answeringcited by 22
- 2026Beyond Static Summarization: Proactive Memory Extraction for LLM Agentscited by 21
- 2023Incremental Learning of Humanoid Robot Behavior from Natural Interaction and Large Language Modelscited by 19
- 2024DemoRank: Selecting Effective Demonstrations for Large Language Models in Ranking Taskcited by 17
- 2024On the Noise Robustness of In-Context Learning for Text Generationcited by 16
- 2023Cost-Effective In-Context Learning for Entity Resolution: A Design Space Explorationcited by 15
- 2024Assessing Empathy in Large Language Models with Real-World Physician-Patient Interactionscited by 13
- 2023TaskLAMA: Probing the Complex Task Understanding of Language Modelscited by 12
- 2023Ambiguity-Aware In-Context Learning with Large Language Modelscited by 11
- 2024In-Context Learning Demonstration Selection via Influence Analysiscited by 11
- 2025Is Relevance Propagated from Retriever to Generator in RAG?cited by 11
- 2023MDDial: A Multi-turn Differential Diagnosis Dialogue Dataset with Reliability Evaluationcited by 10
- 2024What Makes In-context Learning Effective for Mathematical Reasoning: A Theoretical Analysiscited by 7
- 2025Don't Take Things Out of Context: Attention Intervention for Enhancing Chain-of-Thought Reasoning in Large Language Modelscited by 7
- 2024How Far Can In-Context Alignment Go? Exploring the State of In-Context Alignmentcited by 6
- 2024Prompting with Phonemes: Enhancing LLMs' Multilinguality for Non-Latin Script Languagescited by 6
- 2025The Role of Diversity in In-Context Learning for Large Language Modelscited by 6
- 2025Relic: Enhancing Reward Model Generalization for Low-Resource Indic Languages with Few-Shot Examplescited by 6
- 2023ICXML: An In-Context Learning Framework for Zero-Shot Extreme Multi-Label Classificationcited by 5
- 2024Automatic Combination of Sample Selection Strategies for Few-Shot Learningcited by 5
- 2024XAMPLER: Learning to Retrieve Cross-Lingual In-Context Examplescited by 5
- 2024PromptRefine: Enhancing Few-Shot Performance on Low-Resource Indic Languages with Example Selection from Related Example Bankscited 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
- 2024Self-Demos: Eliciting Out-of-Demonstration Generalizability in Large Language Modelscited by 4
- 2024Evaluating and Safeguarding the Adversarial Robustness of Retrieval-Based In-Context Learningcited by 4
- 2024DemoShapley: Valuation of Demonstrations for In-Context Learningcited by 3
- 2025Selecting Demonstrations for Many-Shot In-Context Learning via Gradient Matchingcited by 3
- 2023Improving Input-label Mapping with Demonstration Replay for In-context Learningcited by 2
- 2023Take One Step at a Time to Know Incremental Utility of Demonstration: An Analysis on Reranking for Few-Shot In-Context Learningcited by 2
- 2024Instruction Tuning with Retrieval-based Examples Ranking for Aspect-based Sentiment Analysiscited by 2
- 2025How Jailbreak Defenses Work and Ensemble? A Mechanistic Investigationcited by 2
- 2025MateICL: Mitigating Attention Dispersion in Large-Scale In-Context Learningcited by 2
- 2025Fine-Grained Emotion Recognition via In-Context Learningcited by 2
- 2024ParaICL: Towards Parallel In-Context Learningcited by 1
50 most cited of 72 All 72 (JSON)
- 2026PULSE: Identifying Demonstration-Utility Features with Sparse Autoencoders26 Sep 2026
- 2026ThinkRetrieve: Retrieval-Augmented Reasoning Traces for Test-Time Scaling11 Aug 2026
- 2026BCL: Bayesian In-Context Learning Framework for Information Extraction17 Jun 2026
- 2026GRIP: Feedback-Guided Prompt Retrieval for Large Multimodal Models10 Jun 2026
- 2026Activation-Based Active Learning for In-Context Learning: Challenges and Insights3 Jun 2026
- 2026Toward Robust In-Context Learning: Leveraging Out-of-distribution Proxies for Target Inaccessible Demonstration Retrieval13 Apr 2026
- 2026UCS: Estimating Unseen Coverage for Improved In-Context Learning13 Apr 2026
- 2026CompactRAG: Reducing LLM Calls and Token Overhead in Multi-Hop Question Answering5 Feb 2026
- 2026Beyond Static Summarization: Proactive Memory Extraction for LLM Agents8 Jan 2026
- 2026FastV-RAG: Towards Fast and Fine-Grained Video QA with Retrieval-Augmented Generation4 Jan 2026
- 2025Beyond One-Size-Fits-All: Personalized Harmful Content Detection with In-Context Learning29 Oct 2025
- 2025Foundation of Intelligence: Review of Math Word Problems from Human Cognition Perspective24 Oct 2025
38 more
- 2025Fine-Grained Emotion Recognition via In-Context Learning8 Oct 2025
- 2025KITE: Kernelized and Information Theoretic Exemplars for In-Context Learning19 Sep 2025
- 2025ALLabel: Three-stage Active Learning for LLM-based Entity Recognition using Demonstration Retrieval9 Sep 2025
- 2025Failures Are the Stepping Stones to Success: Enhancing Few-Shot In-Context Learning by Leveraging Negative Samples31 Jul 2025
- 2025TDR: Task-Decoupled Retrieval with Fine-Grained LLM Feedback for In-Context Learning24 Jul 2025
- 2025Towards Agentic RAG with Deep Reasoning: A Survey of RAG-Reasoning Systems in LLMs13 Jul 2025
- 2025Relic: Enhancing Reward Model Generalization for Low-Resource Indic Languages with Few-Shot Examples19 Jun 2025
- 2025Selecting Demonstrations for Many-Shot In-Context Learning via Gradient Matching5 Jun 2025
- 2025Learning to Select In-Context Demonstration Preferred by Large Language Model26 May 2025
- 2025The Role of Diversity in In-Context Learning for Large Language Models26 May 2025
- 2025MateICL: Mitigating Attention Dispersion in Large-Scale In-Context Learning2 May 2025
- 2025A Survey of Frontiers in LLM Reasoning: Inference Scaling, Learning to Reason, and Agentic Systems12 Apr 2025
- 2025Don't Take Things Out of Context: Attention Intervention for Enhancing Chain-of-Thought Reasoning in Large Language Models14 Mar 2025
- 2025Sampling-Efficient Test-Time Scaling: Self-Estimating the Best-of-N Sampling in Early Decoding3 Mar 2025
- 2025Is Relevance Propagated from Retriever to Generator in RAG?20 Feb 2025
- 2025How Jailbreak Defenses Work and Ensemble? A Mechanistic Investigation20 Feb 2025
- 2025Mitigating Lost-in-Retrieval Problems in Retrieval Augmented Multi-Hop Question Answering20 Feb 2025
- 2025D.Va: Validate Your Demonstration First Before You Use It19 Feb 2025
- 2025ReLearn: Unlearning via Learning for Large Language Models16 Feb 2025
- 2025Explanation based In-Context Demonstrations Retrieval for Multilingual Grammatical Error Correction12 Feb 2025
- 2025Evaluating and Improving Graph to Text Generation with Large Language Models24 Jan 2025
- 2025Semantic Captioning: Benchmark Dataset and Graph-Aware Few-Shot In-Context Learning for SQL2Text6 Jan 2025
- 2025A Survey of Test-Time Compute: From Intuitive Inference to Deliberate Reasoning5 Jan 2025
- 2024Knowledge Boundary of Large Language Models: A Survey17 Dec 2024
- 2024What Makes In-context Learning Effective for Mathematical Reasoning: A Theoretical Analysis11 Dec 2024
- 2024PromptRefine: Enhancing Few-Shot Performance on Low-Resource Indic Languages with Example Selection from Related Example Banks7 Dec 2024
- 2024Prompting with Phonemes: Enhancing LLMs' Multilinguality for Non-Latin Script Languages4 Nov 2024
- 2024Effective Self-Mining of In-Context Examples for Unsupervised Machine Translation with LLMs14 Oct 2024
- 2024DemoShapley: Valuation of Demonstrations for In-Context Learning10 Oct 2024
- 2024Evaluating Linguistic Capabilities of Multimodal LLMs in the Lens of Few-Shot Learning17 Jul 2024
- 2024DemoRank: Selecting Effective Demonstrations for Large Language Models in Ranking Task24 Jun 2024
- 2024How Far Can In-Context Alignment Go? Exploring the State of In-Context Alignment17 Jun 2024
- 2024E-ICL: Enhancing Fine-Grained Emotion Recognition through the Lens of Prototype Theory4 Jun 2024
- 2024Instruction Tuning with Retrieval-based Examples Ranking for Aspect-based Sentiment Analysis28 May 2024
- 2024On the Noise Robustness of In-Context Learning for Text Generation27 May 2024
- 2024Assessing Empathy in Large Language Models with Real-World Physician-Patient Interactions26 May 2024
- 2024Evaluating and Safeguarding the Adversarial Robustness of Retrieval-Based In-Context Learning24 May 2024
- 2024XAMPLER: Learning to Retrieve Cross-Lingual In-Context Examples8 May 2024
50 newest of 72 All 72 (JSON)
- 2025A Survey of Frontiers in LLM Reasoning: Inference Scaling, Learning to Reason, and Agentic Systemscited by 111
- 2025Sampling-Efficient Test-Time Scaling: Self-Estimating the Best-of-N Sampling in Early Decodingcited by 63
- 2025Towards Agentic RAG with Deep Reasoning: A Survey of RAG-Reasoning Systems in LLMscited by 42
- 2025A Survey of Test-Time Compute: From Intuitive Inference to Deliberate Reasoningcited by 40
- 2023Towards LogiGLUE: A Brief Survey and A Benchmark for Analyzing Logical Reasoning Capabilities of Language Modelscited by 35
- 2023SurrealDriver: Designing LLM-powered Generative Driver Agent Framework based on Human Drivers' Driving-thinking Datacited by 24
- 2024What Makes In-context Learning Effective for Mathematical Reasoning: A Theoretical Analysiscited by 7
- 2025Don't Take Things Out of Context: Attention Intervention for Enhancing Chain-of-Thought Reasoning in Large Language Modelscited by 7
- 2026FastV-RAG: Towards Fast and Fine-Grained Video QA with Retrieval-Augmented Generationcited by 1
- 2026ThinkRetrieve: Retrieval-Augmented Reasoning Traces for Test-Time Scalingcited by 0
- 2026ThinkRetrieve: Retrieval-Augmented Reasoning Traces for Test-Time Scaling11 Aug 2026
- 2026FastV-RAG: Towards Fast and Fine-Grained Video QA with Retrieval-Augmented Generation4 Jan 2026
- 2025Towards Agentic RAG with Deep Reasoning: A Survey of RAG-Reasoning Systems in LLMs13 Jul 2025
- 2025A Survey of Frontiers in LLM Reasoning: Inference Scaling, Learning to Reason, and Agentic Systems12 Apr 2025
- 2025Don't Take Things Out of Context: Attention Intervention for Enhancing Chain-of-Thought Reasoning in Large Language Models14 Mar 2025
- 2025Sampling-Efficient Test-Time Scaling: Self-Estimating the Best-of-N Sampling in Early Decoding3 Mar 2025
- 2025A Survey of Test-Time Compute: From Intuitive Inference to Deliberate Reasoning5 Jan 2025
- 2024What Makes In-context Learning Effective for Mathematical Reasoning: A Theoretical Analysis11 Dec 2024
- 2023Towards LogiGLUE: A Brief Survey and A Benchmark for Analyzing Logical Reasoning Capabilities of Language Models2 Oct 2023
- 2023SurrealDriver: Designing LLM-powered Generative Driver Agent Framework based on Human Drivers' Driving-thinking Data22 Sep 2023
- 2025Mitigating Lost-in-Retrieval Problems in Retrieval Augmented Multi-Hop Question Answeringcited by 22
- 2025Is Relevance Propagated from Retriever to Generator in RAG?cited by 11
- 2024Evaluating and Safeguarding the Adversarial Robustness of Retrieval-Based In-Context Learningcited by 4
- 2026CompactRAG: Reducing LLM Calls and Token Overhead in Multi-Hop Question Answeringcited by 1
- 2026CompactRAG: Reducing LLM Calls and Token Overhead in Multi-Hop Question Answering5 Feb 2026
- 2025Is Relevance Propagated from Retriever to Generator in RAG?20 Feb 2025
- 2025Mitigating Lost-in-Retrieval Problems in Retrieval Augmented Multi-Hop Question Answering20 Feb 2025
- 2024Evaluating and Safeguarding the Adversarial Robustness of Retrieval-Based In-Context Learning24 May 2024
- 2023Efficient Large Language Models: A Surveycited by 186
- 2023In-Context Learning with Iterative Demonstration Selectioncited by 74
- 2024In-context Learning with Retrieved Demonstrations for Language Models: A Surveycited by 70
- 2023Learning to Retrieve In-Context Examples for Large Language Modelscited by 60
- 2024Revisiting Demonstration Selection Strategies in In-Context Learningcited by 58
- 2023Large Language Model-Aware In-Context Learning for Code Generationcited by 43
- 2024Knowledge Boundary of Large Language Models: A Surveycited by 40
- 2023Incremental Learning of Humanoid Robot Behavior from Natural Interaction and Large Language Modelscited by 19
- 2024DemoRank: Selecting Effective Demonstrations for Large Language Models in Ranking Taskcited by 17
- 2024On the Noise Robustness of In-Context Learning for Text Generationcited by 16
- 2023Cost-Effective In-Context Learning for Entity Resolution: A Design Space Explorationcited by 15
- 2024Assessing Empathy in Large Language Models with Real-World Physician-Patient Interactionscited by 13
12 most cited of 48 All 48 (JSON)
- 2026BCL: Bayesian In-Context Learning Framework for Information Extraction17 Jun 2026
- 2026Activation-Based Active Learning for In-Context Learning: Challenges and Insights3 Jun 2026
- 2026Toward Robust In-Context Learning: Leveraging Out-of-distribution Proxies for Target Inaccessible Demonstration Retrieval13 Apr 2026
- 2026UCS: Estimating Unseen Coverage for Improved In-Context Learning13 Apr 2026
- 2025Foundation of Intelligence: Review of Math Word Problems from Human Cognition Perspective24 Oct 2025
- 2025Fine-Grained Emotion Recognition via In-Context Learning8 Oct 2025
- 2025KITE: Kernelized and Information Theoretic Exemplars for In-Context Learning19 Sep 2025
- 2025ALLabel: Three-stage Active Learning for LLM-based Entity Recognition using Demonstration Retrieval9 Sep 2025
- 2025Failures Are the Stepping Stones to Success: Enhancing Few-Shot In-Context Learning by Leveraging Negative Samples31 Jul 2025
- 2025TDR: Task-Decoupled Retrieval with Fine-Grained LLM Feedback for In-Context Learning24 Jul 2025
- 2025Selecting Demonstrations for Many-Shot In-Context Learning via Gradient Matching5 Jun 2025
- 2025Learning to Select In-Context Demonstration Preferred by Large Language Model26 May 2025
12 newest of 48 All 48 (JSON)
Similar, not cited
Close in wording, no citation either way
- 2024Does In-Context Learning Really Learn? Rethinking How Large Language Models Respond and Solve Tasks via In-Context Learning
- 2026Demonstrations, CoT, and Prompting: A Theoretical Analysis of ICL
- 2025Refract ICL: Rethinking Example Selection in the Era of Million-Token Models
- 2024Large Language Models Know What Makes Exemplary Contexts
- 2025On the Relationship Between the Choice of Representation and In-Context Learning
- 2023Self-ICL: Zero-Shot In-Context Learning with Self-Generated Demonstrations
- 2023How Many Demonstrations Do You Need for In-context Learning?
- 2024Demonstration Notebook: Finding the Most Suited In-Context Learning Example from Interactions