The Power of Adaptation: Boosting In-Context Learning through Adaptive Prompting

Shuzhang Cai, Twumasi Mensah-Boateng, Xander Kuksov, Jing Yuan, Shaojie Tang

Abstract

Large Language Models (LLMs) have demonstrated exceptional abilities across a broad range of language-related tasks, including generating solutions to complex reasoning problems. An effective technique to enhance LLM performance is in-context learning, which encourages a step-by-step reasoning process by including explanatory examples to guide the model's responses. However, selecting appropriate exemplars for the model poses a challenge, as each dataset demands a distinct set of exemplars to enable the LLM to learn effectively and perform well on the test set. Current studies often rely on uncertainty- or diversity-based selection strategies to select exemplars for annotation and to improve model learning. However, these studies typically employ a non-adaptive approach, selecting a set of exemplars all at once. We argue that this non-adaptive strategy may result in a set of exemplars with high redundancy in terms of the knowledge covered, ultimately reducing their overall informativeness. To address this limitation, we propose Adaptive-Prompt, a novel method that adaptively selects exemplars by leveraging model feedback from previously chosen exemplars. Experimental results show that Adaptive-Prompt significantly enhances LLM performance across a variety of reasoning tasks.

Introduction

In-Context Learning (ICL) has become a cornerstone of prompt engineering, allowing LLMs to solve complex problems by observing a few demonstration examples (exemplars). However, the selection of these exemplars is critical. Suboptimal selection—such as choosing examples that are too simple or highly redundant—wastes the model's limited context window and fails to maximize learning potential.

Existing uncertainty-based methods, like Active-Prompt, select questions the model finds most difficult. However, these methods are typically non-adaptive, selecting a batch of exemplars simultaneously. This often leads to redundancy; for instance, if multiple selected questions cover the same underlying logic, the model receives repetitive information. We propose that exemplar selection should be an iterative process where each new example is chosen based on what the model has yet to master.

Methodology: The Adaptive-Prompt Framework

Adaptive-Prompt introduces an iterative selection mechanism designed to minimize redundancy and maximize the information gain of the exemplar set.

Overview of the Adaptive-Prompt framework showing the iterative selection and annotation process.

The process follows four main steps:

  1. Initialization: The exemplar set starts empty.
  2. Uncertainty Evaluation: For each unlabeled question in the pool, the LLM generates multiple responses (e.g., 10). Uncertainty is calculated using metrics such as Disagreement (the number of unique answers) or Entropy (the probability distribution of answers).
  3. Adaptive Selection: The question with the highest uncertainty, relative to the current exemplar set, is selected.
  4. Annotation: The selected question is manually annotated with a Chain-of-Thought (CoT) reasoning path and added to the exemplar set.

By recalculating uncertainty at every step, the framework ensures that once a concept is "learned" via a new exemplar, similar questions become more certain and are less likely to be selected in subsequent iterations.

Experimental Results

The researchers evaluated Adaptive-Prompt across three reasoning domains: Arithmetic (GSM8K, SVAMP, AQuA), Commonsense (StrategyQA, CSQA), and Symbolic (Last Letter Concatenation). Testing was conducted on GPT-3.5 Turbo and GPT-4o Mini.

Performance comparison of Adaptive-Prompt against various baselines on GPT-3.5 Turbo.

As shown in the results for GPT-3.5 Turbo, Adaptive-Prompt (using both Disagreement 'D' and Entropy 'E' metrics) consistently outperformed standard CoT, Auto-CoT, and the non-adaptive Active-Prompt. On average, the entropy-based variant achieved a 76.0% accuracy, representing a significant improvement over the 75.3% achieved by Active-Prompt.

Key findings include:

  • Redundancy Reduction: The iterative approach effectively filters out redundant questions, leading to a more diverse and informative exemplar set.
  • Model Intelligence Correlation: Performance gains were more pronounced on GPT-3.5 Turbo compared to GPT-4o Mini. This suggests that as models become more capable at zero-shot reasoning, the marginal utility of advanced prompting techniques decreases.
  • Robustness: The method's effectiveness remained consistent regardless of the specific human annotator providing the reasoning chains, highlighting that the selection of the question itself is the primary driver of performance.

Discussion and Limitations

While Adaptive-Prompt offers a clear performance advantage, it comes with increased computational costs. Calculating uncertainty requires multiple API calls for every candidate question in every iteration, which can be expensive and time-consuming for large datasets.

Furthermore, the method showed limited success with smaller models like LLaMA-3-8B. These models often struggle with the increased prompt length and complexity inherent in a large set of adaptive exemplars. Future research will focus on automating the annotation process and developing more efficient uncertainty estimation techniques to reduce the overhead of the iterative loop.

Conclusion

Adaptive-Prompt demonstrates that "how" we select examples is just as important as "what" we select. By treating exemplar selection as an adaptive, feedback-driven process, we can significantly boost the reasoning capabilities of LLMs while making more efficient use of the prompt context.

Summary updated

Abstract

Large Language Models (LLMs) have demonstrated exceptional abilities across a broad range of language-related tasks, including generating solutions to complex reasoning problems. An effective technique to enhance LLM performance is in-context learning, which encourages a step-by-step reasoning process by including explanatory examples to guide the model's responses. However, selecting appropriate exemplars for the model poses a challenge, as each dataset demands a distinct set of exemplars to enable the LLM to learn effectively and perform well on the test set. Current studies often rely on uncertainty- or diversity-based selection strategies to select exemplars for annotation and to improve model learning. However, these studies typically employ a non-adaptive approach, selecting a set of exemplars all at once. We argue that this non-adaptive strategy may result in a set of exemplars with high redundancy in terms of the knowledge covered, ultimately reducing their overall informativeness. To address this limitation, we propose \textsc{Adaptive-Prompt}, a novel method that adaptively selects exemplars by leveraging model feedback from previously chosen exemplars. Experimental results show that \textsc{Adaptive-Prompt} significantly enhances LLM performance across a variety of reasoning tasks.
BibTeX
@inproceedings{cai2025power,
  author = {Shuzhang Cai and Twumasi Mensah-Boateng and Xander Kuksov and Jing Yuan and Shaojie Tang},
  title = {{The Power of Adaptation: Boosting In-Context Learning through Adaptive Prompting}},
  booktitle = {Canadian AI},
  year = {2025},
}
Figure