Complementary Explanations for Effective In-Context Learning

Xi Ye, Srinivasan Iyer, Asli Celikyilmaz, Ves Stoyanov, Greg Durrett +1 more
11/25/2022
cs.CL

Official code: xiye17/ComplementaryExpl (5 stars, Python, last commit 2023-07-14).

Abstract

Large language models (LLMs) have exhibited remarkable capabilities in learning from explanations in prompts, but there has been limited understanding of exactly how these explanations function or why they are effective. This work aims to better understand the mechanisms by which explanations are used for in-context learning.

Show full abstract

We first study the impact of two different factors on the performance of prompts with explanations: the computation trace (the way the solution is decomposed) and the natural language used to express the prompt. By perturbing explanations on three controlled tasks, we show that both factors contribute to the effectiveness of explanations. We further study how to form maximally effective sets of explanations for solving a given test query. We find that LLMs can benefit from the complementarity of the explanation set: diverse reasoning skills shown by different exemplars can lead to better performance. Therefore, we propose a maximal marginal relevance-based exemplar selection approach for constructing exemplar sets that are both relevant as well as complementary, which successfully improves the in-context learning performance across three real-world tasks on multiple LLMs.

View on arXivView PDF

Code Implementations(1)

Complementary Explanations for Effective In-Context Learning

51Python, ShellMay 22, 20233 years ago

Similar Papers

Cite this paper

@article{ye2022complementary,
  title  = {Complementary Explanations for Effective In-Context Learning},
  author = {Xi Ye and Srinivasan Iyer and Asli Celikyilmaz and Ves Stoyanov and Greg Durrett and Ramakanth Pasunuru},
  year   = {2022},
  eprint = {2211.13892},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2211.13892}
}

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/2211.13892.svg)](https://codeofpaper.com/paper/2211.13892)

Discussion