AdaptMI: Adaptive Skill-based In-context Math Instruction for Small Language Models

Yinghui He, Abhishek Panigrahi, Yong Lin, Sanjeev AroraarXiv 2025 · DOI

Abstract

While large-scale language models thrive on complex, skill-based prompting, Small Language Models (SLMs) often suffer from "cognitive overload," leading to decreased performance on simpler tasks. We introduce AdaptMI (Adaptive Math Instructions), a two-stage framework that dynamically adjusts prompting strategies based on problem difficulty. By using a Process Reward Model (PRM) to identify potential failures, AdaptMI provides targeted skill-based examples only when needed. Our results demonstrate accuracy improvements of up to 7.2% on challenging math benchmarks like MATH and GSM8K across various SLM families.

Introduction

In-context learning (ICL) has become a cornerstone of prompt engineering, yet its effectiveness scales significantly with model size. Recent "skill-based" ICL techniques—which involve predicting required skills and providing relevant examples—have shown great promise for frontier models. However, applying these techniques to SLMs (typically 1B–7B parameters) reveals a "performance gap." While helpful for difficult problems, these dense prompts often cause SLMs to "overthink" easy questions, resulting in verbose and incorrect reasoning.

The AdaptMI Framework

AdaptMI addresses the overthinking problem through a selective, two-stage approach that provides SLMs with exactly as much help as they need.

The AdaptMI framework consists of difficulty detection (Stage 1) followed by adaptive prompting (Stage 2), including the enhanced AdaptMI+ variant.

Stage 1: Difficulty Detection

The framework first evaluates the SLM's response to a standard fixed few-shot prompt. A Process Reward Model (PRM) scores the reasoning steps. If the score is high, the question is deemed "easy," and the initial response is accepted. If the score is low or a reasoning failure is detected, the question is flagged as "difficult."

Stage 2: Adaptive Prompting

For difficult questions, the system switches to a more intensive prompting strategy:

  • AdaptMI: Retrieves relevant examples from a "Skill Bank" based on the problem's general requirements.
  • AdaptMI+: Employs a "teacher" LLM (e.g., GPT-4o-mini) to analyze the SLM's specific failure and identify missing skills. It then provides examples targeted at those specific gaps.

Experimental Results

We evaluated AdaptMI across five SLMs from the Qwen2.5 and Llama-3.2 families on the MATH and GSM8K benchmarks.

Performance Gains

AdaptMI+ consistently outperformed naive skill-based strategies. The most significant improvements were observed in the smallest models, where accuracy increased by up to 6%. Furthermore, an iterative version of AdaptMI+ allowed models to refine their reasoning over multiple rounds, leading to a continuous climb in accuracy.

Accuracy improvements across different iterations for Qwen2.5 models using the AdaptMI+ framework.

Mitigating Overthinking

Analysis showed that standard skill-based prompting on easy questions increased output length without improving accuracy, mirroring "cognitive load" theories. By reverting to simple prompts for easy tasks, AdaptMI maintains high performance while reducing computational overhead and avoiding the reasoning errors associated with unnecessarily long chain-of-thought sequences.

Conclusion

AdaptMI demonstrates that for SLMs, "more" is not always "better" in prompting. By adaptively providing help only where the model struggles, we can bridge the performance gap between small and large models in complex reasoning tasks. Future work will explore using this adaptive pipeline to generate high-quality synthetic data for model distillation.

Summary updated

BibTeX
@misc{he2025adaptmi,
  author = {Yinghui He and Abhishek Panigrahi and Yong Lin and Sanjeev Arora},
  title = {{AdaptMI: Adaptive Skill-based In-context Math Instruction for Small Language Models}},
  year = {2025},
  eprint = {2505.00147},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2505.00147},
}
Figure