GistScore: Learning Better Representations for In-Context Example Selection with Gist Bottlenecks

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Gupta, Shivanshu, Rosenbaum, Clemens, Elenberg, Ethan R.
Format: Preprint
Published: 2023
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866916133986107392
author Gupta, Shivanshu
Rosenbaum, Clemens
Elenberg, Ethan R.
author_facet Gupta, Shivanshu
Rosenbaum, Clemens
Elenberg, Ethan R.
contents In-context Learning (ICL) is the ability of Large Language Models (LLMs) to perform new tasks when conditioned on prompts comprising a few task examples. However, ICL performance can be critically sensitive to the choice of examples. To dynamically select the best examples for every test input, we propose Example Gisting, a novel approach for training example encoders through supervised fine-tuning with an attention bottleneck between the inputs and outputs. These gist models form the basis for GistScore, a novel metric for scoring and selecting informative examples. Further, we experiment with two variations: (1) fine-tuning gist models for each dataset and (2) multi-task training a single model on a large collection of datasets. The latter can be used for new tasks out-of-the-box, enabling a training-free ICL pipeline. Evaluations with 21 datasets spanning 9 tasks and 8 diverse LLMs show that our fine-tuned models get state-of-the-art ICL performance with over 20% absolute gain over off-the-shelf retrievers and 5% over the best prior methods. Further, our multi-task model generalizes well to new tasks, datasets, and prompt templates. Selection using this model matches or outperforms prior methods while being three orders of magnitude faster than the strongest training-free baseline.
format Preprint
id arxiv_https___arxiv_org_abs_2311_09606
institution arXiv
publishDate 2023
record_format arxiv
spellingShingle GistScore: Learning Better Representations for In-Context Example Selection with Gist Bottlenecks
Gupta, Shivanshu
Rosenbaum, Clemens
Elenberg, Ethan R.
Computation and Language
In-context Learning (ICL) is the ability of Large Language Models (LLMs) to perform new tasks when conditioned on prompts comprising a few task examples. However, ICL performance can be critically sensitive to the choice of examples. To dynamically select the best examples for every test input, we propose Example Gisting, a novel approach for training example encoders through supervised fine-tuning with an attention bottleneck between the inputs and outputs. These gist models form the basis for GistScore, a novel metric for scoring and selecting informative examples. Further, we experiment with two variations: (1) fine-tuning gist models for each dataset and (2) multi-task training a single model on a large collection of datasets. The latter can be used for new tasks out-of-the-box, enabling a training-free ICL pipeline. Evaluations with 21 datasets spanning 9 tasks and 8 diverse LLMs show that our fine-tuned models get state-of-the-art ICL performance with over 20% absolute gain over off-the-shelf retrievers and 5% over the best prior methods. Further, our multi-task model generalizes well to new tasks, datasets, and prompt templates. Selection using this model matches or outperforms prior methods while being three orders of magnitude faster than the strongest training-free baseline.
title GistScore: Learning Better Representations for In-Context Example Selection with Gist Bottlenecks
topic Computation and Language
url https://arxiv.org/abs/2311.09606