Source-linked AI summary
Prompt Programming for Large Language Models: Beyond the Few-Shot Paradigm
Laria Reynolds, Kyle McDonell
TL;DR
The paper addresses limited methods for controlling and evaluating large language models by studying prompt programming with GPT-3. It finds that simple 0-shot prompts can match or exceed few-shot prompts, and proposes natural-language, serial-reasoning, and metaprompt techniques while identifying design and reliability constraints.
Problem
Existing methods for controlling and evaluating powerful language models are extremely limited despite their downstream success.
Method
The paper studies 0-shot prompting and develops natural-language prompt programming, serial reasoning, and metaprompts that generate task-specific prompts.
Results
Simple 0-shot prompts can match or exceed standard few-shot performance, including a simple colon prompt outperforming an original GPT-3-style 10-shot translation prompt.
Takeaways & Limitations
Few-shot examples often locate tasks already learned by the model, motivating broader natural-language methods for probing and controlling its capabilities.
Takeaways & Limitations
Prompt programming requires substantial human effort because task-agnostic prompts are often less effective than task-specific prompts.
Abstract
from arXiv · showhide
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 existing methods for controlling and evaluating powerful language models are limited, and that prompting can more effectively extract learned behaviors. It reframes few-shot examples primarily as task-location cues and develops broader natural-language prompt-programming methods.
- Current methods for controlling language models are extremely limited despite their success on downstream tasks.
- Prompting can be more effective than fine-tuning or few-shot formats for extracting specific learned behaviors.
- Few-shot examples often locate an already learned task rather than teach the task during runtime.
- The paper proposes communicating task intention and structure through natural language prompt programming.
- It studies 0-shot prompts, prompts that decompose problems before verdicts, metaprompts, and benchmark applications for probing model capabilities.
2 Related work
Related work has largely pursued architectural, sampling, optimization, adapter, or example-selection methods for controlling language models. The paper positions natural-language 0-shot prompt programming as comparatively underformalized and synthesizes decentralized explorations beyond few-shot prompting.
- Prior control methods include novel architectures, advanced sampling, gradient-based prompt optimization, and task-specific adapters.
- Other work improves few-shot prompting by dynamically selecting relevant in-context examples for each task.
- Natural-language 0-shot prompt programming has received little formalized attention compared with these approaches.
- Practical prompt-programming techniques have primarily circulated through blogs and social media.
- The paper gives a brief, non-exhaustive survey because decentralized explorations make compiling all contributions infeasible.
- It synthesizes and expands explorations involving GPT-3 writing, contextual prompting, and procedural problem solving.
3 Investigating few-shot prompting
The paper investigates whether few-shot gains reflect runtime learning or task identification, using translation as an illustrative case. It reports that prompt formatting and examples can substantially alter performance, with simple 0-shot prompts sometimes outperforming few-shot prompts.
- 3 Investigating few-shot prompting: GPT-3’s standard evaluation compared 0-shot, 1-shot, and n-shot prompts, with more examples usually improving performance.
- 3 Investigating few-shot prompting: Few-shot examples may identify the task and encourage response structure rather than teach task performance at runtime.
- 3.1 The success of 0-shot prompts: A single French-to-English translation experiment found that 0-shot prompts could match or exceed standard few-shot performance.
- 3.1 The success of 0-shot prompts: The simple colon prompt outperformed the original GPT-3-style 10-shot prompt on the reported translation task.
- 3.1 The success of 0-shot prompts: Simple formatting changes improved many poor 0-shot prompts, suggesting that baseline 0-shot performance had been underestimated.
- 3.2 Examples don’t always help: In the experiment, the simple colon prompt performed significantly worse with one example than without one because semantic contamination altered how the example was interpreted.
- 3.2 Examples don’t always help: Table 1 reports SacreBLEU-measured BLEU scores across original, reproduced, and custom prompt formats on WMT’14 Fr-En.
- 3.2 Examples don’t always help: Figures 1 and 2 present the Simple Colon and Master Translator prompt formats, with language examples replacing bold text.
4 Prompt programming
Prompt programming treats natural-language prompting as a difficult form of programming grounded in the dynamics of human language. The paper develops anthropomorphic and structural perspectives for designing prompts, while noting assumptions and practical constraints.
- 4 Prompt programming: Rewriting a prompt can significantly change model performance, motivating methods for crafting prompts that yield desired behavior.
- 4 Prompt programming: Prompt engineering is framed as programming in natural language, whose indeterminacy and complexity distinguish it from traditional programming.
- 4.1 The dynamics of language: GPT-3’s self-supervised training approximates the token-prediction dynamics of human-written language.
- 4.1 The dynamics of language: Those language dynamics incorporate cultural, psychological, physical, and behavioral context rather than grammar or semantics alone.
- 4.1 The dynamics of language: Prompt programming is difficult because finding prompts for desired continuations requires modeling intentions, worldly knowledge, tone, implication, association, style, plausibility, and ambiguity.
- 4.1 The dynamics of language: The paper uses an anthropomorphic approach to model how GPT-3 may react as a superposition of virtual human writers, without treating it as human.
- 4.1 The dynamics of language: Humans can still prompt effectively by applying learned heuristics to natural-language dynamics that resist an exact formal theory.
- 4.1 The dynamics of language: The proposed methods can be applied in parallel, with redundancy reinforcing desired behavior.
4.2 Direct task specification: constructing the signifier
Direct task specification uses a 0-shot prompt to invoke a task the model already knows, constructing a signifier rather than teaching the task. Such specifications can compactly encode broad behavior, while demonstration or proxy methods remain alternatives for harder-to-signify behaviors.
- A direct task specification is a 0-shot prompt that tells the model to perform a task it already knows.
- The prompt’s signifier may be a task name, a compound description, or contextual pattern that keys the intended behavior.
- Direct specifications invoke learned functions without explaining how to perform them or providing examples.
- A direct specification can compactly supervene on infinitely many implicit examples, as “translate French to English” does for possible phrase mappings.
- Demonstration and proxy are alternative strategies when a learned behavior lacks an obvious direct signifier.
4.3 Task specification by
Few-shot examples specify tasks through demonstrated input-output patterns, but GPT-3 can apply such patterns even when examples lack context. Examples remain useful when format, descriptive language, or instructive instances make demonstration preferable.
- Few-shot learning presents examples as sequential repetitions of a function with varying parameters, a pattern common in natural language.
- GPT-3 can apply demonstrated task patterns in contrived situations even when examples are stripped of context.
- Examples can be preferable when a task requires a bespoke format or its example language is clearer than a task-description metalanguage.
- Highly instructive examples are another case where task specification by demonstration may be effective.
- Few-shot examples are processed as a whole rather than necessarily as parallel independent training examples.
- Informative context or many examples can clarify that examples are independent function instances rather than a sequential pattern to extrapolate.
4.4 Task specification by memetic proxy
Memetic proxy specification communicates nuanced intentions through culturally familiar characters, situations, or narratives rather than stating every desired behavior directly. Such proxies can bundle assumptions and contextual attributes into a recognizable interaction pattern.
- A memetic proxy uses a character or characteristic situation to stand for a complex or nuanced intention.
- Proxy specification keys behaviors from cultural memespace instead of naming the behavior directly.
- Asking GPT-3 to answer through figures such as Mahatma Gandhi, Ayn Rand, or Eliezer Yudkowsky supplies biases and contextual assumptions with the proxy.
- GPT-3’s ability to simulate well-known figures and draw on cultural information supports proxy-based task specification.
- A teacher-student dialogue can proxy thorough, simple explanations and correction by invoking an archetypal situation where those attributes are implied.
- The teacher-student framing is presented as more stable than directly requesting those attributes because of memetic reinforcement.
4.5 Prompt programming as constraining behavior
Prompt programming treats generation as a problem of constraining possible continuations so that intended behavior is favored and undesired behavior is excluded. The translation example shows progressively stronger wording and syntax can narrow the continuation space.
- GPT-3 may continue an ambiguous prompt in mutually incoherent ways, reflecting any plausible context rather than one person’s intended continuation.
- Prompt programming therefore seeks prompts inconsistent with undesired continuations, not merely prompts compatible with the desired one.
- The initial French-to-English prompt can continue with another French sentence because its structure does not preclude that behavior.
- Adding a newline, clarifying the instruction, and adding quotation marks progressively increase translation reliability but do not eliminate alternative continuations.
- A syntactical constraint is most reliable when any reasonable continuation can only be the desired behavior.
- Many-shot prompts may work because numerous function instances make a further instance more likely than a break from the pattern.
4.6 Serializing reasoning for closed-ended questions
Serializing reasoning lets models work through components before committing to closed-ended answers, but delaying verdicts creates control and formatting challenges.
- Single-token verdicts constrain computation to one feed-forward pass, whereas decomposing difficult tasks may make individually tractable subtasks solvable.
- Forcing an immediate answer deprives the model of scratch space for rephrasing questions, outlining procedures, eliminating choices, or making implicit information explicit.
- GPT-3 barely exceeded random guessing on some closed-ended multitask sections, possibly because the format forced the verdict on the first token.
- Prompt programming seeks serial reasoning without specialized neural architectures, including step-by-step procedures, self-criticism, and question elaboration.
- Prompts should discourage premature verdicts because later computation may otherwise rationalize an already chosen answer rather than improve its accuracy.
- Delayed verdicts require a retrievable output form, while model-generated prompt continuations can derail from the intended task.
- A verdict can be enforced by injecting a prompt fragment when its counterfactual likelihood peaks; shorter fill-in-the-blank sections can further constrain derailment.
4.7 Metaprompt programming
Metaprompt programming addresses the difficulty of designing task-specific prompts by using general intentions to generate prompts tailored to individual questions. The paper illustrates serializing and fill-in-the-blank metaprompts across math, analogy, and expert-question tasks.
- Metaprompt programming: Metaprompts seed a general intention that unfolds into a specific prompt when combined with additional task information.The task question supplies the additional information used to specialize the generated prompt.
- Metaprompt programming: A short phrase such as “This problem asks us to” can prompt a serial explanation of a procedure for solving a problem.The phrase prompts a statement of the problem’s intention before the solution procedure.
- Metaprompt programming: Fill-in-the-blank metaprompt templates constrain responses along a predetermined procedure while allowing task-specific details to be generated.The paper presents this format as an alternative to shorter phrase-based metaprompts.
- Metaprompt programming: Figures 3–5 show metaprompt examples generated with GPT-3 as wrappers around math and SAT analogy questions.The examples were generated with the davinci engine at temperature 0.
- Metaprompt programming: Figure 6 applies a fill-in-the-blank metaprompt to asking an expert how humankind should ensure artificial general intelligence is aligned.The example uses a question about artificial general intelligence alignment as its task input.
5 Directions for future work
The paper identifies future directions for evaluating and prompting powerful language models, while emphasizing that its own analysis is exploratory. It calls for broader benchmarks, automated prompting methods, and tests that distinguish different causes of imperfect performance.
- The paper is exploratory and calls for future research on prompt-programming theory and automated prompting methods.
- Benchmarking: Benchmarks should report scores with and without catastrophic failures when failed attempts can be distinguished from non-attempts.This can reveal whether prompts reliably communicate the task.
- Benchmarking: Meta-prompt templates could enable large-scale evaluations of open-ended reasoning on closed-ended questions beyond simple fact recall.The paper gives math and physics problems as examples.
- Metaprompt evaluation: Metaprompts risk derailment because they rely on multiple autoregressive steps, so their reliability should be tested across tasks and ideally models.The paper suggests exploring fill-in-the-blank templates to control derailment.
- Capability evaluation: Text-based games could test world-modelling, agency, problem solving, information gathering, and social intelligence, including deception.Designing such games reliably requires advanced prompt-programming techniques.