Learning vs Retrieval: The Role of In-Context Examples in Regression with Large Language Models
Not on the map. Why?
Abstract (arXiv)
Generative Large Language Models (LLMs) are capable of being in-context learners. However, the underlying mechanism of in-context learning (ICL) is still a major research question, and experimental research results about how models exploit ICL are not always consistent. In this work, we propose a framework for evaluating in-context learning mechanisms, which we claim are a combination of retrieving internal knowledge and learning from in-context examples by focusing on regression tasks. First, we show that LLMs can solve real-world regression problems and then design experiments to measure the extent to which the LLM retrieves its internal knowledge versus learning from in-context examples. We argue that this process lies on a spectrum between these two extremes. We provide an in-depth analysis of the degrees to which these mechanisms are triggered depending on various factors, such as prior knowledge about the tasks and the type and richness of the information provided by the in-context examples. We employ three LLMs and utilize multiple datasets to corroborate the robustness of our findings. Our results shed light on how to engineer prompts to leverage meta-learning from in-context examples and foster knowledge retrieval depending on the problem being addressed.
Key facts. Cited by 5 papers in the map (data through 14 Oct 2026). Builds on 24 of its 41 references that are in the map. First posted on arXiv 6 Sep 2024.
Builds on
24 of 41 references.
References · 24
- 2017Attention Is All You Needcited by 60,361
- 2020Language Models are Few-Shot Learnerscited by 32,419
- 2023Llama 2: Open Foundation and Fine-Tuned Chat Modelscited by 13,028
- 2024Gemini 1.5: Unlocking multimodal understanding across millions of tokens of contextcited by 3,224
- 2022Rethinking the Role of Demonstrations: What Makes In-Context Learning Work?cited by 1,434
- 2021What Makes Good In-Context Examples for GPT-3?cited by 1,195
- 2022What Can Transformers Learn In-Context? A Case Study of Simple Function Classescited by 715
- 2023NLP Evaluation in trouble: On the Need to Measure LLM Data Contamination for each Benchmarkcited by 348
- 2023Transformers as Statisticians: Provable In-Context Learning with In-Context Algorithm Selectioncited by 298
- 2024Leak, Cheat, Repeat: Data Contamination and Evaluation Malpractices in Closed-Source LLMscited by 229
- 2024Large Language Models(LLMs) on Tabular Data: Prediction, Generation, and Understanding -- A Surveycited by 159
- 2023What In-Context Learning "Learns" In-Context: Disentangling Task Recognition and Task Learningcited by 152
12 more
- 2023Large Language Models Are Latent Variable Models: Explaining and Finding Good Demonstrations for In-Context Learningcited by 149
- 2023The Learnability of In-Context Learningcited by 127
- 2022Ground-Truth Labels Matter: A Deeper Look into Input-Label Demonstrationscited by 116
- 2023Uncovering mesa-optimization algorithms in Transformerscited by 100
- 2023A Theory of Emergent In-Context Learning as Implicit Structure Inductioncited by 86
- 2023Extrapolating Large Language Models to Non-English by Aligning Languagescited by 69
- 2023Understanding In-Context Learning in Transformers and LLMs by Learning to Learn Discrete Functionscited by 63
- 2023Transformers Implement Functional Gradient Descent to Learn Non-Linear Functions In Contextcited by 63
- 2024From Words to Numbers: Your Large Language Model Is Secretly A Capable Regressor When Given In-Context Examplescited by 57
- 2023In-context Learning and Gradient Descent Revisitedcited by 20
- 2024LLM In-Context Recall is Prompt Dependentcited by 15
- 2024What Do Language Models Learn in Context? The Structured Task Hypothesiscited by 13
Built on by
Citing papers per year: 2025: 3; 2026: 2.
5 papers.
- 2025Relational Transformer: Toward Zero-Shot Foundation Models for Relational Datacited by 39
- 2025Extracting Probabilistic Knowledge from Large Language Models for Bayesian Network Parameterizationcited by 15
- 2025The Atlas of In-Context Learning: How Attention Heads Shape In-Context Retrieval Augmentationcited by 11
- 2026Information Abundance Paradox: Long-Context Training Undermines Parametric Knowledgecited by 1
- 2026DUALVIEW: Leveraging Broad and Output-Specific Evidence for LLM-based Multi-Output Text Regressioncited by 0
- 2026DUALVIEW: Leveraging Broad and Output-Specific Evidence for LLM-based Multi-Output Text Regression13 Oct 2026
- 2026Information Abundance Paradox: Long-Context Training Undermines Parametric Knowledge12 Aug 2026
- 2025Relational Transformer: Toward Zero-Shot Foundation Models for Relational Data7 Oct 2025
- 2025Extracting Probabilistic Knowledge from Large Language Models for Bayesian Network Parameterization21 May 2025
- 2025The Atlas of In-Context Learning: How Attention Heads Shape In-Context Retrieval Augmentation21 May 2025