Source-linked AI summary

Prompt Programming for Large Language Models: Beyond the Few-Shot Paradigm

Laria Reynolds, Kyle McDonell

arXiv:2102.07350v1cs.CLcs.AI

TL;DR

Current methods for controlling large language models on specific tasks are limited, complicating evaluation of their capabilities. The paper examines natural-language prompt programming, including metaprompts that have models generate task-specific prompts. It finds that simple 0-shot prompts can match or exceed few-shot performance.

  • Problem

    Current methods for controlling large language models on specific tasks are limited, and new methods are needed to evaluate their capabilities and extract useful work.

    Source: §1 · p. 1
  • Method

    The paper explores natural-language prompt programming, including metaprompts that use a model to generate task-specific prompts.

    Source: §1 · p. 2, §4.7 · p. 7
  • Results

    Simple 0-shot prompts matched or exceeded standard few-shot performance in the examined tasks and prompts.

    Source: §1 · p. 2, §3.1 · pp. 2–3
  • Takeaways & Limitations

    Few-shot examples may primarily locate an already learned task rather than teach it during runtime, motivating a reconsideration of prompts for controlling and evaluating language models.

    Source: §1 · p. 1

    Prompt programming requires substantial human time to design task-specific prompts, while automated methods for doing so are lacking.

    Source: §4.7 · p. 7

Abstract

from arXiv · show

Prevailing methods for mapping large generative language models to supervised tasks may fail to sufficiently probe models' novel capabilities. Using GPT-3 as a case study, we show that 0-shot prompts can significantly outperform few-shot prompts. We suggest that the function of few-shot examples in these cases is better described as locating an already learned task rather than meta-learning. This analysis motivates rethinking the role of prompts in controlling and evaluating powerful language models. In this work, we discuss methods of prompt programming, emphasizing the usefulness of considering prompts through the lens of natural language. We explore techniques for exploiting the capacity of narratives and cultural anchors to encode nuanced intentions and techniques for encouraging deconstruction of a problem into components before producing a verdict. Informed by this more encompassing theory of prompt programming, we also introduce the idea of a metaprompt that seeds the model to generate its own natural language prompts for a range of tasks. Finally, we discuss how these more general methods of interacting with language models can be incorporated into existing and future benchmarks and practical applications.

1 Motivation

The paper argues that prompting can better extract learned behaviors from language models by locating tasks in their learned capabilities, rather than relying on few-shot examples to teach tasks at runtime. It motivates natural-language prompt programming as a way to communicate task intentions and structure and probe model capabilities.

  • Although GPT-3 achieved state-of-the-art performance across varied tasks without fine-tuning using few-shot prompts, current methods for controlling models remain limited [3] [12].Before GPT-3, evaluation and use typically involved fine-tuning on part of a task dataset [12]; the authors call for new methods to evaluate capabilities and extract useful work.Source: §1 · p. 1
  • Alternative prompts without examples or instructions can match or outperform few-shot prompts, which the authors argue primarily locate tasks in GPT-3’s existing learned-task space rather than teach them at runtime [3].The paper reports that simple 0-shot prompts can match or exceed the few-shot paradigm and argues that prompting can be more effective than fine-tuning or few-shot prompting at extracting specific learned behaviors.Source: §1 · pp. 1–2
  • The authors propose pursuing task location through prompt programming that communicates task intention and structure in natural language, the modality of self-supervised model training.They motivate this approach by observing that language models are trained to approximate how humans write and should therefore be controlled from the perspective of human natural language use.Source: §1 · p. 1
  • The paper explores natural-language semiotics, prompts that decompose problems before verdicts, metaprompt programming that has models write task-specific prompts, and ways to incorporate these methods into benchmarks [3].These methods are intended to better probe large language model capabilities.Source: §1 · p. 2

2 Related work

Prior prompt-control research largely used machine-learning methods and few-shot example selection, while natural-language, zero-shot prompt programming remained mostly informal. This work synthesizes decentralized explorations to help formalize effective techniques.

2 Related work

  • Prior work controlled generation with conditional architectures, advanced sampling, prompt optimization, and task-specific adapters, and improved few-shot prompting through dynamic example selection.A survey of recent methods is cited as.Source: §2 · p. 2
  • Natural-language, zero-shot prompt-programming techniques had received little formal study and were mainly shared through blogs and social media.The passage identifies OpenAI API and AI Dungeon users as the communities sharing these techniques.Source: §2 · p. 2
  • Informal explorations included Gwern’s GPT-3 demonstrations and prompt methods, Sabeti’s study of prompt context and writing quality, and Robertson’s step-guiding math dialogue.Gwern demonstrated fiction, poetry, parody, and PDF-cleaning tasks.Source: §2 · p. 2
  • KaryoKleptid used AI Dungeon dialogues to guide GPT-3 through problem steps and procedures such as brute-force checking, with impressive math results.The authors describe their work as synthesizing and expanding these pioneering explorations toward formalizing effective natural-language prompt programming.Source: §2 · p. 2

3 Investigating few-shot prompting

In a French-to-English translation experiment, a simple 0-shot prompt outperformed the original-style 10-shot prompt. The analysis argues that examples may guide GPT-3 to a task it already knows rather than teach it the task at runtime.

3 Investigating few-shot prompting

  • Although often interpreted as runtime learning [3], few-shot examples may identify the task and guide response structure; translation can rely on vocabulary and grammar already embedded in GPT-3.The authors propose testing whether examples are necessary to access that existing knowledge.Source: §3 · p. 2

3.1 The success of 0-shot prompts

  • A 0-shot French-to-English prompt using only the language names and a colon performed better than the original-style 10-shot prompt.The study reports that 0-shot prompts could match or exceed standard few-shot performance; no score values are provided in the passages.Source: §3.1 · p. 2, Table 1 · p. 3
  • Simple natural-language formatting improved many poorly performing 0-shot prompts, especially on question-and-answer benchmarks, suggesting their baseline performance was underestimated [3].Source: §3.1 · p. 3
  • Recognizing GPT-3’s existing repertoire of functions can improve understanding and control of its capabilities and motivate more general prompt programming.Source: §3.1 · p. 3

3.2 Examples don’t always help

  • On the simple-colon translation prompt, 1-shot performed worse than 0-shot because GPT-3 treated example semantics as relevant content, an effect also seen in low-shot prompts across tasks.Source: §3.2 · p. 3

3.1 The success of 0-shot prompts

  • The translation comparison used WMT’14 Fr-En BLEU scores, but API constraints required replacing the unreproducible 64-shot test with a 10-shot test.The passage also notes that model-size relationships and differences in reproduced results were uncertain.Source: Table 1 · p. 3

4 Prompt programming

Because rewriting prompts can substantially change model performance, this section treats prompting as natural-language programming and develops methods for specifying, constraining, and generating prompts.

4.1 The dynamics of language

  • GPT-3’s self-supervised next-token training makes it approximate recorded human language, whose cultural, psychological, and physical context makes prompt programming intrinsically complex [3].The authors argue that prompt programmers can draw on human-learned heuristics, while exact theory of language dynamics remains intractably difficult.Source: §4.1 · p. 4

4.2 Direct task specification: constructing the signifier

  • A direct 0-shot specification uses a signifier to call a task behavior the model has already learned, without explaining the task or providing examples.Signifiers can be task names, compound instructions, or contextual cues; a compact specification can implicitly cover many instances.Source: §4.2 · p. 5

4.3 Task specification by demonstration

  • Few-shot demonstrations exploit GPT-3’s learned pattern of repeated functions, especially when bespoke formats or instructive examples communicate tasks better than descriptions.Examples are processed as part of the whole prompt, so informative context can clarify whether they are independent instances rather than a sequence to extrapolate.Source: §4.3 · p. 5

4.4 Task specification by memetic proxy

  • GPT-3’s nuanced grasp of analogies supports using cultural figures or archetypal dialogue as proxies to encode complex intentions and reinforce desired traits.Narrative context can further shape behavior.Source: §4.4 · pp. 5–6

4.5 Prompt programming as constraining behavior

  • Because GPT-3 can continue an ambiguous prompt in mutually incoherent ways, effective prompt programming constrains undesired continuations, not merely permits desired ones.For translation, progressively clarifying the instruction and quoting the input improves reliability, while a syntactic constraint can make only the intended continuation reasonable.Source: §4.5 · p. 6

4.6 Serializing reasoning for closed-ended questions

  • Prompted serial reasoning can give models tractable sub-tasks and scratch space, and prompts can discourage premature verdicts without specialized architectures.This approach responds to closed-ended formats that force an immediate answer and can yield weak performance; seeds can prompt stepwise analysis or consideration of answer choices.Source: §4.6 · pp. 6–7
  • Serial reasoning creates control challenges: generation can derail or omit a retrievable verdict, so the authors propose injecting a verdict fragment when its conditional likelihood peaks.A fill-in-the-blank template with shorter generated sections is another proposed way to keep the model on track.Source: §4.6 · p. 7

4.7 Metaprompt programming

  • Because task-agnostic prompts demand substantial human effort and may underperform, metaprompts seed the model to generate task-specific prompts from general intentions and task information.A metaprompt can be a short phrase that elicits a procedure or a fill-in-the-blank template that constrains the procedure while leaving task-specific details to the model.Source: §4.7 · p. 7

5 Directions for future work

The authors present prompt programming as an exploratory field needing research into its theory and automated prompting methods. They envision an interdisciplinary discipline of theoretical study and quantitative analysis as natural-language interaction makes programming accessible to more people.

5.1 Disentangling meta-learning and task location

  • BLEU’s dataset mean obscures score distributions, and zero-shot translation failures were often catastrophic rather than attempted.The authors hypothesize that excluding these failures would make 0- and 64-shot performance more similar, while 1-shot performance may be worse due to content leakage and faulty generalization.Source: §5.1 · pp. 8–9

5.2 New methods for benchmarking

  • More powerful language models make broader benchmarking methods both possible and necessary.Source: §5.2 · p. 9

5.2.1 Isolating catastrophic failures

  • Benchmarks should report scores both with and without catastrophic failures when failed attempts can be distinguished from tasks not attempted.This can reveal why performance is imperfect and identify prompts that do not reliably communicate the task.Source: §5.2.1 · p. 9

5.2.2 Metaprompts for evaluations

  • Effective metaprompt templates could automate evaluation of closed-ended questions that permit open-ended reasoning, including math and physics problems.Because autoregressive steps risk derailment, metaprompts should be tested across applicable tasks and models, and fill-in-the-blank controls further explored.Source: §5.2.2 · p. 9

5.2.3 Language models for evaluations

  • Language models may evaluate open-ended benchmark answers: GPT-3 was more reliable at spotting bizarre or erroneous passages than generating nonbizarre, error-free ones.The authors note that for some tasks, such as NP-complete problems, verifying a solution is easier than producing one.Source: §5.2.3 · p. 9

5.2.4 Games

  • Prewritten text-based games could probe world-modeling and agency, including problem solving, information gathering, social intelligence, and prediction of virtual-world consequences.Designing games to reliably test intended capabilities requires advanced prompt programming and may become increasingly important for safety evaluation as AI systems gain agency.Source: §5.2.4 · p. 9
Loading 2102.07350v1…