NICE: To Optimize In-Context Examples or Not?
Not on the map. Why?
Abstract (arXiv)
Recent work shows that in-context learning and optimization of in-context examples (ICE) can significantly improve the accuracy of large language models (LLMs) on a wide range of tasks, leading to an apparent consensus that ICE optimization is crucial for better performance. However, most of these studies assume a fixed or no instruction provided in the prompt. We challenge this consensus by investigating the necessity of optimizing ICE when task-specific instructions are provided and find that there are many tasks for which it yields diminishing returns. In particular, using a diverse set of tasks and a systematically created instruction set with gradually added details, we find that as the prompt instruction becomes more detailed, the returns on ICE optimization diminish. To characterize this behavior, we introduce a task-specific metric called Normalized Invariability to Choice of Examples (NICE) that quantifies the learnability of tasks from a given instruction, and provides a heuristic to help decide whether to optimize instructions or ICE for a new task. Given a task, the proposed metric can reliably predict the utility of optimizing ICE compared to using random ICE. Our code is available at https://github.com/microsoft/nice-icl.
Key facts. Cited by 9 papers in the map (data through 7 Oct 2026). Builds on 32 of its 45 references that are in the map. First posted on arXiv 9 Feb 2024.
Builds on
32 of 45 references.
References · 32
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
- 2020Language Models are Few-Shot Learnerscited by 32,199
- 2022Training language models to follow instructions with human feedbackcited by 15,712
- 2021Training Verifiers to Solve Math Word Problemscited by 9,743
- 2020Scaling Laws for Neural Language Modelscited by 6,411
- 2022Scaling Instruction-Finetuned Language Modelscited by 2,997
- 2017A Broad-Coverage Challenge Corpus for Sentence Understanding through Inferencecited by 2,665
- 2022Rethinking the Role of Demonstrations: What Makes In-Context Learning Work?cited by 1,413
- 2020What Disease does this Patient Have? A Large-scale Open Domain Question Answering Dataset from Medical Examscited by 1,324
- 2021What Makes Good In-Context Examples for GPT-3?cited by 1,184
- 2021Fantastically Ordered Prompts and Where to Find Them: Overcoming Few-Shot Prompt Order Sensitivitycited by 1,122
- 2022Large Language Models Are Human-Level Prompt Engineerscited by 1,020
20 more
- 2021Learning To Retrieve Prompts for In-Context Learningcited by 641
- 2023Automatic Prompt Optimization with "Gradient Descent" and Beam Searchcited by 628
- 2021FinQA: A Dataset of Numerical Reasoning over Financial Datacited by 552
- 2023Larger language models do in-context learning differentlycited by 386
- 2022Dynamic Prompt Learning via Policy Gradient for Semi-structured Mathematical Reasoningcited by 347
- 2022Demystifying Prompts in Language Models via Perplexity Estimationcited by 215
- 2022Active Example Selection for In-Context Learningcited by 195
- 2020MTOP: A Comprehensive Multilingual Task-Oriented Semantic Parsing Benchmarkcited by 156
- 2023What In-Context Learning "Learns" In-Context: Disentangling Task Recognition and Task Learningcited by 149
- 2023Compositional Exemplars for In-context Learningcited by 143
- 2023Unified Demonstration Retriever for In-Context Learningcited by 141
- 2022Diverse Demonstrations Improve In-context Compositional Generalizationcited by 136
- 2020Break It Down: A Question Understanding Benchmarkcited by 131
- 2018NL2Bash: A Corpus and Semantic Parser for Natural Language Interface to the Linux Operating Systemcited by 97
- 2023In-Context Learning with Iterative Demonstration Selectioncited by 74
- 2023In-context Example Selection with Influencescited by 60
- 2022LMPriors: Pre-Trained Language Models as Task-Specific Priorscited by 56
- 2021Few-Shot Text Classification with Triplet Networks, Data Augmentation, and Curriculum Learningcited by 35
- 2023Auto-Instruct: Automatic Instruction Generation and Ranking for Black-Box Language Modelscited by 21
- 2023How Robust are LLMs to In-Context Majority Label Bias?cited by 13
Built on by
Citing papers per year: 2024: 3; 2025: 6.
9 papers.
- 2025LLM Economist: Large Population Models and Mechanism Design in Multi-Agent Generative Simulacracited by 20
- 2024Task Facet Learning: A Structured Approach to Prompt Optimizationcited by 17
- 2025LazyReview A Dataset for Uncovering Lazy Thinking in NLP Peer Reviewscited by 13
- 2025Investigating the Zone of Proximal Development of Language Models for In-Context Learningcited by 6
- 2025Number Representations in LLMs: A Computational Parallel to Human Perceptioncited by 4
- 2025Beyond Scaling: Measuring and Predicting the Upper Bound of Knowledge Retention in Language Model Pre-Trainingcited by 3
- 2024Large Language Models Might Not Care What You Are Saying: Prompt Format Beats Descriptionscited by 2
- 202460 Data Points are Sufficient to Fine-Tune LLMs for Question-Answeringcited by 2
- 2025ASPERA: A Simulated Environment to Evaluate Planning for Complex Action Executioncited by 1
- 2025LLM Economist: Large Population Models and Mechanism Design in Multi-Agent Generative Simulacra21 Jul 2025
- 2025ASPERA: A Simulated Environment to Evaluate Planning for Complex Action Execution21 Jul 2025
- 2025LazyReview A Dataset for Uncovering Lazy Thinking in NLP Peer Reviews15 Apr 2025
- 2025Number Representations in LLMs: A Computational Parallel to Human Perception22 Feb 2025
- 2025Investigating the Zone of Proximal Development of Language Models for In-Context Learning10 Feb 2025
- 2025Beyond Scaling: Measuring and Predicting the Upper Bound of Knowledge Retention in Language Model Pre-Training6 Feb 2025
- 202460 Data Points are Sufficient to Fine-Tune LLMs for Question-Answering24 Sep 2024
- 2024Large Language Models Might Not Care What You Are Saying: Prompt Format Beats Descriptions16 Aug 2024
- 2024Task Facet Learning: A Structured Approach to Prompt Optimization15 Jun 2024