GRAD: Generative Retrieval-Aligned Demonstration Sampler for Efficient Few-Shot Reasoning
On the map: LLM reasoning → Reasoning benchmarks and evaluation
also in 1 more
Abstract (arXiv)
Large Language Models (LLMs) achieve strong performance across diverse tasks, but their effectiveness often depends on the quality of the provided context. Retrieval-Augmented Generation (RAG) enriches prompts with external information, but its reliance on static databases constrains adaptability and can result in irrelevant demonstrations. In this work, we propose a Generative Retrieval-Aligned Demonstrator (GRAD), a dynamic demonstration-based approach where an LLM model is trained to generate input-specific concise demonstrations. By tailoring demonstrations to each input, our method offers better contextual support than traditional RAG approaches. We demonstrate the superiority of GRAD under budget constraints, where we limit both the number of tokens used per demonstration and the number of tokens used for the final output. Trained solely on a math dataset, GRAD consistently outperforms strong baselines on Qwen2.5-14B across mathematical reasoning and advanced STEM questions, highlighting GRAD's robust generalization to out-of-distribution (OOD) domains such as physics, chemistry, and computer science. Furthermore, we show that demonstrations generated by trained smaller models can effectively guide larger target models, reducing training costs while maintaining competitive accuracy. Overall, this work introduces a scalable demonstration generator model presenting the first step toward a dynamic few-shot learning paradigm in resource-constrained settings. We release the code used for the project.
Key facts. No citing papers in the map yet (data through 7 Oct 2026). Placed in Reasoning benchmarks and evaluation, one of 17 directions in LLM reasoning. Builds on 22 of its 36 references that are in the map. First posted on arXiv 1 Oct 2025.
Builds on
22 of 36 references.
Closest ancestors · 2
Same direction, newest first
- 2023How Many Demonstrations Do You Need for In-context Learning?14 Mar
- 2022Rethinking the Role of Demonstrations: What Makes In-Context Learning Work?25 Feb
Other references · 20
- 2020Language Models are Few-Shot Learnerscited by 32,199
- 2017Proximal Policy Optimization Algorithmscited by 14,441
- 2024DeepSeekMath: Pushing the Limits of Mathematical Reasoning in Open Language Modelscited by 8,851
- 2023Efficient Memory Management for Large Language Model Serving with PagedAttentioncited by 5,767
- 2022Self-Instruct: Aligning Language Models with Self-Generated Instructionscited by 2,674
- 2023Retrieval-Augmented Generation for Large Language Models: A Surveycited by 2,185
- 2021What Makes Good In-Context Examples for GPT-3?cited by 1,184
- 2022Automatic Chain of Thought Prompting in Large Language Modelscited by 684
- 2019MathQA: Towards Interpretable Math Word Problem Solving with Operation-Based Formalismscited by 653
- 2023Larger language models do in-context learning differentlycited by 386
- 2025Reinforcement Learning for Reasoning in Large Language Models with One Training Examplecited by 288
- 2023Scaling Sentence Embeddings with Large Language Modelscited by 83
8 more
- 2025GRPO-LEAD: A Difficulty-Aware Reinforcement Learning Approach for Concise Mathematical Reasoning in Language Modelscited by 81
- 2023Fewer is More: Boosting LLM Reasoning with Reinforced Context Pruningcited by 26
- 2025Adaptive Group Policy Optimization: Towards Stable Training and Token-Efficient Reasoningcited by 20
- 2019Measuring Sentences Similarity: A Surveycited by 9
- 2022Assessing Out-of-Domain Language Model Performance from Few Examplescited by 6
- 2024Auto-Demo Prompting: Leveraging Generated Outputs as Demonstrations for Enhanced Batch Promptingcited by 3
- 2024DoubleDipper: Improving Long-Context LLMs via Context Recyclingcited by 1
- 2025Post-training an LLM for RAG? Train on Self-Generated Demonstrationscited by 1
Built on by
Not cited yet.
Similar, not cited
Close in wording, no citation either way
- 2023Meta-training with Demonstration Retrieval for Efficient Few-shot Learning
- 2023AlignedCoT: Prompting Large Language Models via Native-Speaking Demonstrations
- 2024Learning by Analogy: Enhancing Few-Shot Prompting for Math Word Problem Solving with Computational Graph-Based Retrieval
- 2023Dr.ICL: Demonstration-Retrieved In-context Learning
- 2024Demonstration Notebook: Finding the Most Suited In-Context Learning Example from Interactions
- 2024What Makes In-context Learning Effective for Mathematical Reasoning: A Theoretical Analysis
- 2025Towards an Efficient, Customizable, and Accessible AI Tutor
- 2026To Memorize or to Retrieve: Scaling the Interaction Between Pretraining and Retrieval