Fantastically Ordered Prompts and Where to Find Them: Overcoming Few-Shot Prompt Order Sensitivity
By Yao Lu, Max Bartolo, Alastair Moore, Sebastian Riedel, Pontus Stenetorp. 2021
1,596 citations recorded by the source corpus.
When primed with only a handful of training samples, very large, pretrained language models such as GPT-3 have shown competitive results when compared to fully-supervised, fine-tuned, large, pretrained language models. We demonstrate that the order in which the samples are provided can make the difference between near state-of-the-art and random guess performance: essentially some permutations are “fantastic” and some not. We analyse this phenomenon in detail, establishing that: it is present across model sizes (even for the largest current models), it is not related to a specific subset of samples, and that a given good permutation for one model is not transferable to another. While one could use a development set to determine which permutations are performant, this would deviate from the true few-shot setting as it requires additional annotated data. Instead, we use the generative nature of language models to construct an artificial development set and based on entropy statistics of the candidate permutations on this set, we identify performant prompts. Our method yields a 13% relative improvement for GPT-family models across eleven different established text classification tasks.
Subfields: Artificial Intelligence, Information Systems, Prompting & Reasoning
How researchers see this paper
The researchers whose trusted networks rank it highest, strongest advocate first. Every researcher gets a different order.
In Artificial Intelligence
- Mohit Bansal
- Luke S. Zettlemoyer
- Percy Liang
- Yejin Choi
- Jianfeng Gao
- Hannaneh Hajishirzi
- Noah A. Smith
- Graham Neubig
In Information Systems
- Percy Liang
- Hannaneh Hajishirzi
- Tushar Khot
- Ashish Sabharwal
- Luke S. Zettlemoyer
- Chitta Baral
- Yongfeng Zhang
- Peter Clark
In Prompting & Reasoning
- Luke S. Zettlemoyer
- Hannaneh Hajishirzi
- Denny Zhou
- Timo Schick
- Swaroop Mishra
- Hinrich Schütze
- Yejin Choi
- Chitta Baral
Citations in the corpus
- Self-Consistency Improves Chain of Thought Reasoning in Language Models (2022, methodology): “…we consider ensembling by: (1) prompt order permutation: we randomly permute the exemplars in the prompt 40 times to mitigate model’s sensitivity to prompt order (Zhao et al., 2021; Lu et al., 2021); and (2) multiple sets of prompts (Gao et al., 2021): we manually write 3 different sets of prompts.”
- OPT-IML: Scaling Language Model Instruction Meta Learning through the Lens of Generalization (2022, background): “Various approaches have proposed better prompting ways to improve generalization performance (Wei et al., 2022b; Lu et al., 2021).”
- OPT: Open Pre-trained Transformer Language Models (2022, background): “Results vary significantly and unpredictably with the selection of the prompt (Lu et al., 2021), and models do not seem to understand the prompts as fully as we expect (Webson and Pavlick, 2021).”
- Unnatural Instructions: Tuning Language Models with (Almost) No Human Labor (2022, background): “…as GPT-3 are known to be sensitive to slight variations in prompt content, resulting in performance differences when provided with different demonstrations sampled from the same dataset (Liu et al., 2022b) and when permuting the in-context demonstrations (Kumar and Talukdar, 2021; Lu et al., 2022).”
- Large Language Models Are Human-Level Prompt Engineers (2022, neutral): “However, LLMs require careful prompt engineering, either manually (Reynolds & McDonell, 2021) or automatically (Gao et al., 2021; Shin et al., 2020), as models do not seem to understand the prompts in the same way a human would (Webson & Pavlick, 2021; Lu et al., 2021).”
- Cutting Down on Prompts and Parameters: Simple Few-Shot Learning with Language Models (2021, methodology): “This is in contrast to in-context learning, which holds all model weights fixed but is heavily influenced by small prompt modifications (Zhao et al., 2021; Lu et al., 2021).”
- Cross-Task Generalization via Natural Language Crowdsourcing Instructions (2021, methodology): “EXAMPLES correspond to prompting setups in the recent literature (Le Scao and Rush, 2021; Lu et al., 2021).”
- Large Language Models are Zero-Shot Reasoners (2022, methodology): “For the few-shot approaches, since the order of in-context examples could affect the results [Lu et al., 2022], we run each experiment only once with a fixed seed across all methods and datasets, for fair comparisons with the zero-shot methods.”
- PromptChainer: Chaining Large Language Model Prompts through Visual Programming (2022, background): “To invoke the desired functionalities, users need to write prompts [1, 11, 12] that are appropriate for the task.”
- Rethinking the Role of Demonstrations: What Makes In-Context Learning Work? (2022, background): “At the same time, some work reports brittleness and over-sensitivity for in-context learning (Lu et al., 2021; Zhao et al., 2021; Mishra et al., 2021a).”
- Reframing Human-AI Collaboration for Generating Free-Text Explanations (2021, background): “In-context learning methods have been shown to have high variance based on hyperparameters including example order, number of examples given, and which examples are given (Jiang et al., 2020; Zhao et al., 2021; Lu et al., 2022).”
- AI Chains: Transparent and Controllable Human-AI Interaction by Chaining Large Language Model Prompts (2021, background): “They tend to favor certain prompt formats, paraphrases [45, 51], or even certain information in the input.”
- Rationale-Augmented Ensembles in Language Models (2022, background): “…that task performance can be improved by sampling multiple language model outputs for ensembling, (2) prompt-order ensembling, where previous work (Lu et al., 2021; Zhao et al., 2021) has shown that task performance is sensitive to the order of the exemplars in the prompts, and (3)…”
- Few-shot Mining of Naturally Occurring Inputs and Outputs (2022, methodology): “Our method provides a way to collect large amounts of training data using a small set of labeled seed examples, and allows for more direct control over what the model learns compared to relatively brittle prompts (Lu et al., 2021).”
- True Few-Shot Learning with Language Models (2021, methodology): “…prompts that would arise from using accuracy in the context of such limited data (e.g. Marginalizing out example order The order of training examples impacts the generalization of LMs [7], so we treat order as a random factor R that we marginalize over to evaluate the generalization of a prompt A .”
- GPT Understands, Too (2021, background): “The few-shot performance is sensitive to lots of factors (e.g., the order of training examples, random seed, and prompt patterns), and thus suffers from high variance (Zhao et al., 2021a; Lu et al., 2021; Zhang et al., 2020).”
- MetaICL: Learning to Learn In Context (2021, methodology): “Moreover, it can have high variance and poor worst-case accuracy (Perez et al., 2021; Lu et al., 2021).”