AI
New technique merges multiple in-context learning experts to boost LLM performance
Researchers propose a mixture-of-experts approach to in-context learning that handles demonstrations more efficiently and shows up to 13% accuracy gains on classification tasks.
Researchers have introduced a fresh approach to improving how language models learn from examples without fine-tuning, called Mixtures of In-Context Learners (MoICL). The method addresses key limitations of traditional in-context learning by intelligently combining multiple specialized demonstration sets rather than treating all examples the same way.
How MoICL works differently#
Standard in-context learning feeds demonstration examples directly to large language models to guide their predictions. This approach faces two major constraints: it doesn't distinguish between individual demonstrations, and it creates quadratic computational complexity that rapidly consumes available memory and context window capacity. MoICL reframes the problem by treating different subsets of demonstrations as separate experts and learning how to weight and merge their output distributions optimally based on a training dataset.
Empirical performance gains#
Testing across datasets revealed meaningful improvements. The approach outperformed established baselines on 5 of 7 classification benchmarks, with gains reaching +13% accuracy compared to standard in-context learning and other strong methods like LENS. Beyond raw accuracy, MoICL also improves the efficiency frontier—it can achieve equivalent performance using fewer demonstrations and shorter inference time.
Robustness to real-world challenges#
A particularly valuable attribute is resilience to messy data. The technique showed substantial improvements when handling:
- Out-of-domain demonstrations: up to +11% accuracy gain
- Imbalanced datasets: improvements as high as +49%
- Noisy examples: gains up to +38%
The system can also actively filter problematic demonstrations from training sets, making it practical for less curated data sources.
Why this matters#
MoICL offers a more expressive framework for learning from examples that sidesteps the memory exhaustion and context limitations plaguing conventional in-context learning approaches. By framing the problem through a mixture-of-experts lens, it creates room for more sophisticated demonstration handling without sacrificing computational efficiency.

