• A
  • A
  • A
  • ABC
  • ABC
  • ABC
  • А
  • А
  • А
  • А
  • А
Regular version of the site

An Impact of Demonstration Template Choice in In-Context Learning in Large Language Models

Student: Wolf Elena

Supervisor: Alina Khuzieva

Faculty: Faculty of Computer Science

Educational Programme: Modern Computer Science (Master)

Year of Graduation: 2024

In recent years, Large Language Models (LLMs) have become widespread and demonstrated exceptional capabilities in adapting to various tasks through \textit{in-context learning}, which is also known as \textit{few-shot learning}. In this method, few examples are demonstrated to the model instead of detailed explanation of the task. However, the influence of the prompt template — the structure, in which examples are presented to the model — is often overlooked. This paper investigates how different prompt templates affect classification accuracy for 23 large language models, ranging from 770 million to 70 billion parameters, across 4 classification datasets, often used to evaluate new example selection methods. Our findings reveal that suboptimal template choice can drastically reduce accuracy, down to the level of random guessing in some cases. This highlights a significant flaw in the prevalent method for performance evaluation, which may give misleading results. To mitigate it, we propose a "Template Ensemble"\ approach, which aggregates predictions across multiple templates, thereby demonstrating enhanced robustness.

Student Theses at HSE must be completed in accordance with the University Rules and regulations specified by each educational programme.

Summaries of all theses must be published and made freely available on the HSE website.

The full text of a thesis can be published in open access on the HSE website only if the authoring student (copyright holder) agrees, or, if the thesis was written by a team of students, if all the co-authors (copyright holders) agree. After a thesis is published on the HSE website, it obtains the status of an online publication.

Student theses are objects of copyright and their use is subject to limitations in accordance with the Russian Federation’s law on intellectual property.

In the event that a thesis is quoted or otherwise used, reference to the author’s name and the source of quotation is required.

Search all student theses