Lune

NeurIPS2024Top-tier venue

Many-Shot In-Context Learning

Rishabh Agarwal, Avi Singh, Lei Zhang, Bernd Bohnet, Luis Rosias, Stephanie C. Y. Chan, Biao Zhang, Ankesh Anand, Zaheer Abbas, Azade Nova, John D. Co-Reyes, Eric Chu

Abstract

Large language models (LLMs) excel at few-shot in-context learning (ICL) -- learning from a few examples provided in context at inference, without any weight updates. Newly expanded context windows allow us to investigate ICL with hundreds or thousands of examples -- the many-shot regime. Going from few-shot to many-shot, we observe significant performance gains across a wide variety of generative and discriminative tasks. While promising, many-shot ICL can be bottlenecked by the available amount of human-generated examples. To mitigate this limitation, we explore two new settings: Reinforced and Unsupervised ICL. Reinforced ICL uses model-generated chain-of-thought rationales in place of human examples. Unsupervised ICL removes rationales from the prompt altogether, and prompts the model only with domain-specific questions. We find that both Reinforced and Unsupervised ICL can be quite effective in the many-shot regime, particularly on complex reasoning tasks. Finally, we demonstrate that, unlike few-shot learning, many-shot learning is effective at overriding pretraining biases, can learn high-dimensional functions with numerical inputs, and performs comparably to fine-tuning. We also find that inference cost increases linearly in the many-shot regime, and frontier LLMs benefit from many-shot ICL to varying degrees. Our analysis also reveals the limitations of next-token prediction loss as an indicator of downstream ICL performance.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

117 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Many-shot Jailbreaking cites Language Models are Few-Shot Learners
  • On scalable oversight with weak LLMs judging strong LLMs cites Language Models are Few-Shot Learners
  • On scalable oversight with weak LLMs judging strong LLMs cites Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
  • Fantastically Ordered Prompts and Where to Find Them: Overcoming Few-Shot Prompt Order Sensitivity cites Language Models are Few-Shot Learners
  • A Survey on In-context Learning cites Fantastically Ordered Prompts and Where to Find Them: Overcoming Few-Shot Prompt Order Sensitivity
  • A Survey on In-context Learning cites Language Models are Few-Shot Learners
  • A Survey on In-context Learning cites Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
  • ChunkKV: Semantic-Preserving KV Cache Compression for Efficient Long-Context LLM Inference cites Language Models are Few-Shot Learners
  • ChunkKV: Semantic-Preserving KV Cache Compression for Efficient Long-Context LLM Inference cites Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
  • Let's Verify Step by Step cites Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
  • Agentic Context Engineering: Evolving Contexts for Self-Improving Language Models cites Language Models are Few-Shot Learners
  • Agentic Context Engineering: Evolving Contexts for Self-Improving Language Models cites Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers117

  1. A Survey on In-context LearningQingxiu Dong, Lei Li, Damai Dai, Ce Zheng et al.EMNLP 2024 · 479 citations
  2. Agentic Context Engineering: Evolving Contexts for Self-Improving Language ModelsQizheng Zhang, Changran Hu, Shubhangi Upasani, Boyuan Ma et al.ICLR 2026 · 374 citations
  3. Many-shot JailbreakingCem Anil, Esin Durmus, Nina Panickssery, Mrinank Sharma et al.NeurIPS 2024 · 338 citations
  4. On scalable oversight with weak LLMs judging strong LLMsZachary Kenton, Noah Y. Siegel, János Kramár, Jonah Brown-Cohen et al.NeurIPS 2024 · 116 citations
  5. ChunkKV: Semantic-Preserving KV Cache Compression for Efficient Long-Context LLM InferenceXiang Liu, Zhenheng Tang, Peijie Dong, Zeyu Li et al.NeurIPS 2025 · 71 citations

Builds on33

  1. Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah et al.NeurIPS 2020 · 64,255 citations
  2. Chain-of-Thought Prompting Elicits Reasoning in Large Language ModelsJason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma et al.NeurIPS 2022 · 22,562 citations
  3. Let's Verify Step by StepHunter Lightman, Vineet Kosaraju, Yuri Burda, Harrison Edwards et al.ICLR 2024 · 3,045 citations
  4. PEGASUS: Pre-training with Extracted Gap-sentences for Abstractive SummarizationJingqing Zhang, Yao Zhao, Mohammad Saleh, Peter J. LiuICML 2020 · 2,453 citations
  5. Fantastically Ordered Prompts and Where to Find Them: Overcoming Few-Shot Prompt Order SensitivityYao Lu, Max Bartolo, Alastair Moore, Sebastian Riedel et al.ACL 2022 · 1,494 citations

Related papers

  1. Unlabeled Data Can Provably Enhance In-Context Learning of TransformersRenpu Liu, Jing YangNeurIPS 2025 · 3 citations
  2. From Few to Many: Self-Improving Many-Shot Reasoners Through Iterative Optimization and GenerationXingchen Wan, Han Zhou, Ruoxi Sun, Sercan Ö. ArikICLR 2025
  3. Enough Coin Flips Can Make LLMs Act BayesianRitwik Gupta, Rodolfo Corona, Jiaxin Ge, Eric Wang et al.ACL 2025
  4. Universal Self-Adaptive PromptingXingchen Wan, Ruoxi Sun, Hootan Nakhost, Hanjun Dai et al.EMNLP 2023 · 4 citations
  5. In-Context Learning with Iterative Demonstration SelectionChengwei Qin, Aston Zhang, Chen Chen, Anirudh Dagar et al.EMNLP Findings 2024 · 19 citations
Dusk over the sea between two cliffs drawn in fine vertical lines