Introduction
In-Context Learning (ICL) allows Large Language Models (LLMs) to solve new tasks by providing a few examples within a prompt. However, ICL is notoriously sensitive to the specific formatting of these prompts. Researchers often propose "improvements"—such as better example selection or output calibration—but evaluate them using a single, arbitrary prompt template. This paper argues that such practices lead to a "template sensitivity" crisis, where reported gains may simply be artifacts of "lucky" formatting rather than genuine algorithmic progress.
Deconstructing the Prompt Template
To systematically study this phenomenon, the researchers conducted an empirical study across 21 models and 4 classification datasets (SST-2, DBPedia, AGNews, and TREC). They decomposed a "template" into four functional components: the input verbalizer, the output verbalizer, the intra-separator (between input and label), and the inter-separator (between examples).
As illustrated in Figure 1, minor changes in these components can drastically alter model rankings and the perceived effectiveness of different prediction methods like "Direct", "Channel", or "Calibration". A template that favors one model may significantly disadvantage another, making fair benchmarking nearly impossible with a single format.
The Illusion of Progress
The study's findings challenge several common assumptions in ICL research:
- No Universal Best Template: A template that works well for one model (e.g., Llama 2 70B) may perform poorly for another (e.g., Llama 2 13B), even within the same model family.
- Methods Don't Transfer: The "best" template for direct prompting is rarely the best for advanced methods like Calibration or Channel prompting.
- Instruction Tuning Isn't a Cure: Even the latest instruction-tuned models remain highly sensitive to minor formatting changes. In many cases, advanced example selection strategies (like ITM) performed worse than random selection when averaged across multiple templates, suggesting their reported benefits are highly template-dependent.
Robust Evaluation via Template Ensembles
To mitigate template sensitivity, the authors propose Template Ensembles. This method involves averaging a model's predictions across $N$ different random templates at test time to reduce the "luck of the draw" factor.
As shown in Figure 6, using an ensemble of size 5 consistently boosts average performance and dramatically reduces variance. For instance, on the SST-2 dataset, ensembling helped the Falcon 40B model achieve a stable 0.93 accuracy, whereas a single template resulted in a massive standard deviation of 0.17. While Calibration often yields high peak accuracy, it was found to be the most sensitive to template choice, making it the riskiest to evaluate with a single format.
Conclusion
The primary takeaway is a call for more rigorous benchmarking in the NLP community. Relying on a single template for evaluation is insufficient and potentially misleading. While Template Ensembles increase computational cost during inference, they provide a much-needed robust baseline for fairly comparing ICL improvements. Future research should move beyond reporting peak performance on "lucky" templates and instead focus on methods that demonstrate consistent gains across diverse formatting conditions.
Summary updated