Share your thoughts, 1 month free Claude Pro on usSee more
WorkDL logo mark

Dr.ICL: Demonstration-Retrieved In-context Learning

About

In-context learning (ICL), teaching a large language model (LLM) to perform a task with few-shot demonstrations rather than adjusting the model parameters, has emerged as a strong paradigm for using LLMs. While early studies primarily used a fixed or random set of demonstrations for all test queries, recent research suggests that retrieving semantically similar demonstrations to the input from a pool of available demonstrations results in better performance. This work expands the applicability of retrieval-based ICL approaches by demonstrating that even simple word-overlap similarity measures such as BM25 outperform randomly selected demonstrations. Furthermore, we extend the success of retrieval-based ICL to instruction-finetuned LLMs as well as Chain-of-Thought (CoT) prompting. For instruction-finetuned LLMs, we find that although a model has already seen the training data at training time, retrieving demonstrations from the training data at test time yields better results compared to using no demonstrations or random demonstrations. Last but not least, we train a task-specific demonstration retriever that outperforms off-the-shelf retrievers.

Man Luo, Xin Xu, Zhuyun Dai, Panupong Pasupat, Mehran Kazemi, Chitta Baral, Vaiva Imbrasaite, Vincent Y Zhao• 2023

Related benchmarks

TaskDatasetResultRank
Natural Language InferenceaNLI
Accuracy36.1
107
Toxicity DetectionToxigen
Score77.43
95
Sentiment AnalysisSST
Accuracy78.26
75
Toxicity DetectionImplicit Hate
Accuracy63.1
52
Sentiment AnalysisSemEval
Score63.82
46
Natural Language InferenceCNLI
Accuracy47.2
42
Natural Language InferenceWANLI
Accuracy (WANLI)42.77
42
Sentiment AnalysisDynaSent
Accuracy68.4
42
Toxicity DetectionAdv
Accuracy57.04
42
Named Entity Recognitionwnut
Accuracy56.03
40
Showing 10 of 11 rows

Other info

Follow for update