Self-Demos: Eliciting Out-of-Demonstration Generalizability in Large Language Models
Not on the map. Why?
Abstract (arXiv)
Large language models (LLMs) have shown promising abilities of in-context learning (ICL), adapting swiftly to new tasks with only few-shot demonstrations. However, current few-shot methods heavily depend on high-quality, query-specific demos, which are often lacking. When faced with out-of-demonstration (OOD) queries, methods that rely on hand-crafted demos or external retrievers might fail. To bridge the gap between limited demos and OOD queries, we propose Self-Demos, a novel prompting method that elicits the inherent generalizability in LLMs by query-aware demo generation. The generated demos strategically interpolate between existing demos and the given query, transforming the query from OOD to ID. To evaluate the effectiveness of our approach, we manually constructed OOD-Toolset, a dataset in the tool-using scenario with over 300 real-world APIs and 1000 instances, each consisting of three tool-use cases as demos and an OOD query. Thorough experiments on our dataset and two public math benchmarks have shown that our method can outperform state-of-the-art baselines in the OOD setting. Moreover, we conduct a range of analyses to validate Self-Demos's generalization and provide more insights.
Key facts. Cited by 4 papers in the map (data through 7 Oct 2026). Builds on 31 of its 39 references that are in the map. First posted on arXiv 1 Apr 2024.
Builds on
31 of 39 references.
References · 31
- 2020Language Models are Few-Shot Learnerscited by 32,199
- 2021Training Verifiers to Solve Math Word Problemscited by 9,743
- 2022Self-Consistency Improves Chain of Thought Reasoning in Language Modelscited by 5,601
- 2021Measuring Mathematical Problem Solving With the MATH Datasetcited by 5,203
- 2022Large Language Models are Zero-Shot Reasonerscited by 4,323
- 2020Dense Passage Retrieval for Open-Domain Question Answeringcited by 3,779
- 2021Finetuned Language Models Are Zero-Shot Learnerscited by 3,747
- 2023Self-Refine: Iterative Refinement with Self-Feedbackcited by 3,317
- 2022Beyond the Imitation Game: Quantifying and extrapolating the capabilities of language modelscited by 1,970
- 2021WebGPT: Browser-assisted question-answering with human feedbackcited by 1,722
- 2023The Rise and Potential of Large Language Model Based Agents: A Surveycited by 1,422
- 2022Rethinking the Role of Demonstrations: What Makes In-Context Learning Work?cited by 1,413
19 more
- 2021What Makes Good In-Context Examples for GPT-3?cited by 1,184
- 2021Generalizing to Unseen Domains: A Survey on Domain Generalizationcited by 762
- 2022A Survey on In-context Learningcited by 717
- 2021Learning To Retrieve Prompts for In-Context Learningcited by 641
- 2023ToolAlpaca: Generalized Tool Learning for Language Models with 3000 Simulated Casescited by 383
- 2023Can Generalist Foundation Models Outcompete Special-Purpose Tuning? Case Study in Medicinecited by 319
- 2022In-context Examples Selection for Machine Translationcited by 172
- 2022Diverse Demonstrations Improve In-context Compositional Generalizationcited by 136
- 2023Large Language Models as Analogical Reasonerscited by 107
- 2023Can Large Language Models Really Improve by Self-critiquing Their Own Plans?cited by 107
- 2023GPT-4 Doesn't Know It's Wrong: An Analysis of Iterative Prompting for Reasoning Problemscited by 88
- 2020Look at the First Sentence: Position Bias in Question Answeringcited by 83
- 2023Overthinking the Truth: Understanding how Language Models Process False Demonstrationscited by 78
- 2023Dr.ICL: Demonstration-Retrieved In-context Learningcited by 71
- 2022Self-Generated In-Context Learning: Leveraging Auto-regressive Language Models as a Demonstration Generatorcited by 68
- 2022Structured, flexible, and robust: benchmarking and improving large language models towards more human-like behavior in out-of-distribution reasoning taskscited by 56
- 2023How Many Demonstrations Do You Need for In-context Learning?cited by 52
- 2023Self-ICL: Zero-Shot In-Context Learning with Self-Generated Demonstrationscited by 42
- 2022XRICL: Cross-lingual Retrieval-Augmented In-Context Learning for Cross-lingual Text-to-SQL Semantic Parsingcited by 32
Built on by
Citing papers per year: 2024: 1; 2025: 2; 2026: 1.
4 papers.
- 2024Distill Visual Chart Reasoning Ability from LLMs to MLLMscited by 30
- 2025Learning-to-Context Slope: Evaluating In-Context Learning Effectiveness Beyond Performance Illusionscited by 1
- 2025Multi-Layer Attention is the Amplifier of Demonstration Effectivenesscited by 1
- 2026GRaSp: Automatic Example Optimization for In-Context Learning in Low-Data Taskscited by 0
- 2026GRaSp: Automatic Example Optimization for In-Context Learning in Low-Data Tasks8 May 2026
- 2025Multi-Layer Attention is the Amplifier of Demonstration Effectiveness1 Aug 2025
- 2025Learning-to-Context Slope: Evaluating In-Context Learning Effectiveness Beyond Performance Illusions29 Jun 2025
- 2024Distill Visual Chart Reasoning Ability from LLMs to MLLMs24 Oct 2024