Skip to content

An efficient automated exemplar selection method that uses a neural bandit algorithm to optimize the set of exemplars for in-context learning while accounting for exemplar ordering.

Notifications You must be signed in to change notification settings

ZhaoxuanWu/EASE-Prompt-Optimization

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This is the official code for the paper:

Prompt Optimization with EASE? Efficient Ordering-aware Automated Selection of Exemplars.

Zhaoxuan Wu, Xiaoqiang Lin, Zhongxiang Dai, Wenyang Hu, Yao Shu, See-Kiong Ng, Patrick Jaillet, Bryan Kian Hsiang Low

Prepare the data

We have prepared the data and put the datasets in the folder experiments/data. More information about data processing can be found there as well.

Run our code

To run our code, first install the required conda environment.

conda env create -f environment.yml

We provide the commands to reproduce results from our paper below.

bash experiments/run_template.sh

Note that the code for the baseline methods is also included in this repository. The commands to run them are also included in the experiments/run_template_ucb.sh file.

About

An efficient automated exemplar selection method that uses a neural bandit algorithm to optimize the set of exemplars for in-context learning while accounting for exemplar ordering.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published