Efficient Many-Shot In-Context Learning with Task-Level Compression and Instance-Level Retrieval

Masayuki Kawarada, Ukyo Honda, Sho Takase


Abstract
Many-shot in-context learning (ICL) lets large language models exploit hundreds or thousands of demonstrations, but its cost grows with the prompt. We argue that many-shot demonstrations carry two kinds of information: task-level information, such as task structure, which emerges only across many examples, and instance-level information, such as exact input-output associations and rare exceptions, which resides in individual demonstrations. Existing efficiency methods commit all information to a single placement: demonstration retrieval keeps a few demonstrations as raw text, while context compression places the full pool into a compact memory. We study where each kind of information should be placed. On ManyICLBench, each one-sided method falls short on tasks that depend on the information it discards, while combining the two retains much of the full many-shot performance at a much smaller inference budget. Synthetic tasks further show that compressed memory and retrieved examples can complement each other but sometimes interfere.
Anthology ID:
2026.findings-aacl.179
Volume:
Findings of the Association for Computational Linguistics: IJCNLP-AACL 2026
Month:
November
Year:
2026
Address:
Hengqin, China
Editors:
Yue Zhang, Ruifeng Xu, Ayu Purwarianti, Tong Rong, Jun Suzuki
Venue:
Findings
SIG:
Publisher:
Association for Computational Linguistics
Note:
Pages:
3547–3555
Language:
URL:
https://aclanthology.org/2026.findings-aacl.179/
DOI:
Bibkey:
Cite (ACL):
Masayuki Kawarada, Ukyo Honda, and Sho Takase. 2026. Efficient Many-Shot In-Context Learning with Task-Level Compression and Instance-Level Retrieval. In Findings of the Association for Computational Linguistics: IJCNLP-AACL 2026, pages 3547–3555, Hengqin, China. Association for Computational Linguistics.
Cite (Informal):
Efficient Many-Shot In-Context Learning with Task-Level Compression and Instance-Level Retrieval (Kawarada et al., Findings 2026)
Copy Citation:
PDF:
https://aclanthology.org/2026.findings-aacl.179.pdf