How Many Demonstrations Do You Need for In-context Learning?
Jiuhai Chen, Lichang Chen, Chen Zhu, Tianyi Zhou

TL;DR
This paper investigates the necessity of multiple demonstrations in in-context learning with large language models, revealing that a single correct demo often suffices and that more demos can sometimes hinder performance due to demo interference.
Contribution
It demonstrates that using only one correct demo can outperform multiple-demo setups and uncovers dataset biases and demo interference effects affecting ICL performance.
Findings
Single correct demo often matches multi-demo performance.
Using more demos can degrade accuracy due to interference.
Most demos in datasets are correct for many queries, biasing results.
Abstract
Large language models (LLMs) are capable to perform complex reasoning by in-context learning (ICL) when provided with a few input-output demonstrations (demos) and more powerful when intermediate reasoning steps ("chain of thoughts (CoT)") of the demos are given. Is it necessary to use multi-demo in ICL? In this paper, we study ICL using fewer demos for each test query on the tasks in~\cite{wei2022chain}. Surprisingly, we do not observe significant degradation when using only one randomly chosen demo. To study this phenomenon, for each test query, we categorize demos into "correct demos" leading to the correct answer, and "wrong demos" resulting in wrong answers. Our analysis reveals an inherent bias in those widely studied datasets: most demos are correct for a majority of test queries, which explains the good performance of using one random demo. Moreover, ICL (with and w/o CoT) using…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsTopic Modeling · Advanced Graph Neural Networks · Machine Learning and Data Classification
MethodsTest
