Demonstration Notebook: Finding the Most Suited In-Context Learning Example from Interactions
Not on the map. Why?
Abstract (arXiv)
Large language models (LLMs) benefit greatly from prompt engineering, with in-context learning standing as a pivital technique. While former approaches have provided various ways to construct the demonstrations used for in-context learning, they often ignore the inherent heterogeneity within datasets, applying the same demonstrations to all reasoning questions. We observed that the effectiveness of demonstrations varies depending on the specific question. This motivates our exploration of using prompt engineering to select appropriate demonstrations. To address the challenge of automatically creating and choosing demonstrations tailored to each question, we propose a novel prompt engineering workflow built around a novel object called the "demonstration notebook." This notebook helps identify the most suitable in-context learning example for a question by gathering and reusing information from the LLM's past interactions. Our experiments show that this approach outperforms all existing methods for automatic demonstration construction and selection (as far as we know), achieving state-of-the-art results on serveral reasoning benchmarks. The method's versatility is further demonstrated by its success in text summarization and prompt compression tasks. Additionally, we contribute a rigorous analysis method to reveal the "demonstrative regime" of a demonstration, providing valuable insights into how demonstrations relate to different question types within a dataset.
Key facts. Cited by 4 papers in the map (data through 14 Oct 2026). Builds on 23 of its 30 references that are in the map. First posted on arXiv 16 Jun 2024.
Builds on
23 of 30 references.
References · 23
- 2020Language Models are Few-Shot Learnerscited by 32,419
- 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,459
- 2021Training Verifiers to Solve Math Word Problemscited by 10,109
- 2022Self-Consistency Improves Chain of Thought Reasoning in Language Modelscited by 5,708
- 2023Tree of Thoughts: Deliberate Problem Solving with Large Language Modelscited by 3,211
- 2018CommonsenseQA: A Question Answering Challenge Targeting Commonsense Knowledgecited by 1,822
- 2022Least-to-Most Prompting Enables Complex Reasoning in Large Language Modelscited by 1,407
- 2022Program of Thoughts Prompting: Disentangling Computation from Reasoning for Numerical Reasoning Taskscited by 1,076
- 2023Graph of Thoughts: Solving Elaborate Problems with Large Language Modelscited by 886
- 2021Are NLP Models really able to Solve Simple Math Word Problems?cited by 878
- 2021Did Aristotle Use a Laptop? A Question Answering Benchmark with Implicit Reasoning Strategiescited by 743
- 2022Automatic Chain of Thought Prompting in Large Language Modelscited by 688
11 more
- 2017Program Induction by Rationale Generation : Learning to Solve and Explain Algebraic Word Problemscited by 650
- 2019SAMSum Corpus: A Human-annotated Dialogue Dataset for Abstractive Summarizationcited by 535
- 2022RLPrompt: Optimizing Discrete Text Prompts with Reinforcement Learningcited by 366
- 2022Dynamic Prompt Learning via Policy Gradient for Semi-structured Mathematical Reasoningcited by 350
- 2020Inductive Biases for Deep Learning of Higher-Level Cognitioncited by 275
- 2022Why Can GPT Learn In-Context? Language Models Implicitly Perform Gradient Descent as Meta-Optimizerscited by 204
- 2023Progressive-Hint Prompting Improves Reasoning in Large Language Modelscited by 147
- 2021Cutting Down on Prompts and Parameters: Simple Few-Shot Learning with Language Modelscited by 139
- 2018Translating a Math Word Problem to an Expression Treecited by 57
- 2020AraGPT2: Pre-Trained Transformer for Arabic Language Generationcited by 55
- 2023Prompt Space Optimizing Few-shot Reasoning Success with Large Language Modelscited by 11
Built on by
Citing papers per year: 2025: 3; 2026: 1.
4 papers.
- 2025Thinking with Nothinking Calibration: A New In-Context Learning Paradigm in Reasoning Large Language Modelscited by 4
- 2025A Unified Theory of Sparse Dictionary Learning in Mechanistic Interpretability: Piecewise Biconvexity and Spurious Minimacited by 3
- 2025CXR-LanIC: Language-Grounded Interpretable Classifier for Chest X-Ray Diagnosiscited by 2
- 2026When Language Overwrites Vision: Over-Alignment and Geometric Debiasing in Vision-Language Modelscited by 1
- 2026When Language Overwrites Vision: Over-Alignment and Geometric Debiasing in Vision-Language Models7 May 2026
- 2025A Unified Theory of Sparse Dictionary Learning in Mechanistic Interpretability: Piecewise Biconvexity and Spurious Minima5 Dec 2025
- 2025CXR-LanIC: Language-Grounded Interpretable Classifier for Chest X-Ray Diagnosis24 Oct 2025
- 2025Thinking with Nothinking Calibration: A New In-Context Learning Paradigm in Reasoning Large Language Models5 Aug 2025
Similar, not cited
Close in wording, no citation either way
- 2023Dr.ICL: Demonstration-Retrieved In-context Learning
- 2024Does In-Context Learning Really Learn? Rethinking How Large Language Models Respond and Solve Tasks via In-Context Learning
- 2022Rethinking the Role of Demonstrations: What Makes In-Context Learning Work?
- 2023Hint-enhanced In-Context Learning wakes Large Language Models up for knowledge-intensive tasks
- 2024Augmenting In-Context-Learning in LLMs via Automatic Data Labeling and Refinement
- 2025Beyond In-Context Learning: Aligning Long-form Generation of Large Language Models via Task-Inherent Attribute Guidelines
- 2025Leveraging In-Context Learning for Language Model Agents
- 2024What Makes In-context Learning Effective for Mathematical Reasoning: A Theoretical Analysis