RetICL: Sequential Retrieval of In-Context Examples with Reinforcement Learning

05/23/2023
by   Alexander Scarlatos, et al.
0

Many recent developments in large language models focus on prompting them to perform specific tasks. One effective prompting method is in-context learning, where the model performs a (possibly new) generation/prediction task given one (or more) examples. Past work has shown that the choice of examples can make a large impact on task performance. However, finding good examples is not straightforward since the definition of a representative group of examples can vary greatly depending on the task. While there are many existing methods for selecting in-context examples, they generally score examples independently, ignoring the dependency between them and the order in which they are provided to the large language model. In this work, we propose Retrieval for In-Context Learning (RetICL), a learnable method for modeling and optimally selecting examples sequentially for in-context learning. We frame the problem of sequential example selection as a Markov decision process, design an example retriever model using an LSTM, and train it using proximal policy optimization (PPO). We validate RetICL on math problem solving datasets and show that it outperforms both heuristic and learnable baselines, and achieves state-of-the-art accuracy on the TabMWP dataset. We also use case studies to show that RetICL implicitly learns representations of math problem solving strategies.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
07/27/2023

Metric-Based In-context Learning: A Case Study in Text Simplification

In-context learning (ICL) for large language models has proven to be a p...
research
11/08/2022

Active Example Selection for In-Context Learning

With a handful of demonstration examples, large-scale language models sh...
research
05/23/2023

In-context Example Selection for Machine Translation Using Multiple Features

Large language models have demonstrated the capability to perform well o...
research
04/18/2022

Context-Aware Language Modeling for Goal-Oriented Dialogue Systems

Goal-oriented dialogue systems face a trade-off between fluent language ...
research
02/27/2023

Finding Supporting Examples for In-Context Learning

In-context learning is a new learning paradigm where a language model ob...
research
01/31/2023

What Makes Good Examples for Visual In-Context Learning?

Large-scale models trained on broad data have recently become the mainst...
research
05/24/2023

Estimating Large Language Model Capabilities without Labeled Test Data

Large Language Models (LLMs) have exhibited an impressive ability to per...

Please sign up or login with your details

Forgot password? Click here to reset