Research map / Large language models / Language, safety and interpretability
In-Context Learning with Long-Context Models: An In-Depth Exploration
Amanda Bertsch, Maor Ivgi, Emily Xiao, Uri Alon, Jonathan Berant, Matthew R. Gormley, Graham Neubig
Carnegie Mellon University · Tel Aviv University
Read the paperPlace an idea next to itCheck your own paper ↗
AI-extracted. The measured effects below were read by AI from the paper's full text (no summary yet). Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.
Measured effects reported in the paper
| What was changed | Where | Measured | Effect |
|---|---|---|---|
| scale ICL from 10 to 1000 demonstrations | Llama2-80k ICL · 5 classification datasets | accuracy: up to +50.8 points; average +36.8 points | Improved |
| use BM25 retrieval instead of random demonstrations | ICL · Banking-77 | accuracy: gain shrinks from 51.5 points (1-shot) to 4.9 points (1500-shot) | Improved |
| use a single random demonstration set instead of retrieval at ~2000 shots | long-context ICL · classification datasets | accuracy: penalty never more than 5 points, as low as 1.8 points (TREC, 2000-shot) | Hurt |
| add retrieval to long-context ICL on SAMSum | ICL · SAMSum | BERTScore | No clear effect |
| sort demonstrations by label (ablation) | Llama2-32k ICL · Clinic-150 (1169-shot) | accuracy: -25.7 points | Hurt |
| randomly shuffle demonstration order (ablation) | long-context ICL · all datasets | percent predictions changed: flips at 1000-shot less than half of those at 10-shot | Improved |
| full finetuning on drastically more examples than fit in context, versus long-context ICL | Llama2-7b · most datasets | accuracy | Improved |
| LoRA finetuning versus long-context ICL | Llama2-7b · most datasets | accuracy | Hurt |
| finetuning (LoRA or full) versus ICL at same number of examples | Llama2-7b · Clinic-150 | accuracy | Hurt |
| restrict attention among demonstrations to blockwise (sink plus two local blocks) (ablation) | Llama2-32k ICL · Banking-77 | accuracy: 95% of full-attention performance at block size 50; near-zero for b<10 | Mixed |
| add more locally encoded blocks with same small block size (ablation) | blockwise attention ICL · Banking-77 | accuracy: worse than single block for b<10; dramatic increase after about b=10 | Mixed |
| add more demonstrations for frontier models | Claude Sonnet 3.5, Llama 3.1 405B · Clinic-150 | accuracy | Mixed |
Open problems this paper states
- “Focuses on open-source models, mainly the Llama-2 family, so other model families are untested.” → Only a few small or medium open models were tested. (an open problem in in-context learning analysis)
- “Does not consider non-LoRA PEFT methods, and focuses mainly on classification tasks.” → Results come from classification or short outputs, not generation. (an open problem in in-context learning analysis)
Open problems in in-context learning analysis
Which in-context learning methods hold up beyond English classification on small open models, and what do they cost?
- Only a few small or medium open models were tested. · 14 papers state it
- The method needs many extra LLM calls or passes. · 13 papers state it
- Evaluated on English data only, with other languages untested. · 12 papers state it
Closest papers by meaning
- Revisiting In-Context Learning with Long Context Language Models (ACL 2025 · similarity 0.92)
- What In-Context Learning ``Learns'' In-Context: Disentangling Task Recognition and Task Learning (ACL 2023 · similarity 0.91)
- Mixture of Demonstrations for In-Context Learning (NeurIPS 2024 · similarity 0.91)
- In-Context Learning Learns Label Relationships but Is Not Conventional Learning (ICLR 2024 · similarity 0.90)
- Disentangling Latent Shifts of In-Context Learning with Weak Supervision (NeurIPS 2025 · similarity 0.90)
- In-context Vectors: Making In Context Learning More Effective and Controllable Through Latent Space Steering (ICML 2024 · similarity 0.89)
Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.