NICE: To Optimize In-Context Examples or Not?

Fuente: arXiv
Guardado en:
Detalles Bibliográficos
Autores principales: Srivastava, Pragya, Golechha, Satvik, Deshpande, Amit, Sharma, Amit
Formato: Preprint
Publicado: 2024
Materias:
Acceso en línea:
Etiquetas: Agregar Etiqueta
Sin Etiquetas, Sea el primero en etiquetar este registro!
_version_ 1866907927908974592
author Srivastava, Pragya
Golechha, Satvik
Deshpande, Amit
Sharma, Amit
author_facet Srivastava, Pragya
Golechha, Satvik
Deshpande, Amit
Sharma, Amit
contents 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.
format Preprint
id arxiv_https___arxiv_org_abs_2402_06733
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle NICE: To Optimize In-Context Examples or Not?
Srivastava, Pragya
Golechha, Satvik
Deshpande, Amit
Sharma, Amit
Computation and Language
Artificial Intelligence
Machine Learning
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.
title NICE: To Optimize In-Context Examples or Not?
topic Computation and Language
Artificial Intelligence
Machine Learning
url https://arxiv.org/abs/2402.06733