Mind Your Format: Towards Consistent Evaluation of In-Context Learning Improvements

Anton Voronov, Lena Wolf, Max Ryabinin
1/12/2024
cs.CL

No official code found. Best implementation: yandex-research/mind-your-format (7 stars, Apache-2.0, last commit 2024-01-18).

Abstract

Large language models demonstrate a remarkable capability for learning to solve new tasks from a few examples. The prompt template, or the way the input examples are formatted to obtain the prompt, is an important yet often overlooked aspect of in-context learning. In this work, we conduct a comprehensive study of the template format's influence on the in-context learning performance. We evaluate the impact of the prompt template across 21 models (from 770M to 70B parameters) and 4 standard classification datasets. We show that a poor choice of the template can reduce the performance of the strongest models and inference methods to a random guess level. More importantly, the best templates do not transfer between different setups and even between models of the same family. Our findings show that the currently prevalent approach to evaluation, which ignores template selection, may give misleading results due to different templates in different works. As a first step towards mitigating this issue, we propose Template Ensembles that aggregate model predictions across several templates. This simple test-time augmentation boosts average performance while being robust to the choice of random set of templates.

View on arXivView PDF

Code Implementations(1)

Apache-2.0

Mind Your Format: Towards Consistent Evaluation of In-Context Learning Improvements

70Python, Jupyter NotebookJan 12, 20242 years agoApache-2.0
few-shot-learningin-context-learningllm-evaluation

Similar Papers

Cite this paper

@article{voronov2024mind,
  title  = {Mind Your Format: Towards Consistent Evaluation of In-Context Learning Improvements},
  author = {Anton Voronov and Lena Wolf and Max Ryabinin},
  year   = {2024},
  eprint = {2401.06766},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2401.06766v3}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2401.06766.svg)](https://codeofpaper.com/paper/2401.06766)

Discussion