Paper · 2021-02-15 · cs.CL, cs.AI
Prompt Programming for Large Language Models: Beyond the Few-Shot Paradigm
Position paper arguing few-shot examples mostly locate a task GPT-3 already knows rather than teach it. On WMT'14 Fr-En, a 0-shot "French: ... English:" prompt reaches 33.3 BLEU on Curie vs 27.9 for a reproduced 10-shot GPT-3-style prompt. Proposes natural-language prompt techniques: constraining continuations, persona proxies, serialized reasoning and self-generated metaprompts.
Prompt engineeringIn-context learningChain-of-thought promptingpromptinggpt-3zero-shotevaluation
AI-compiled by claude-opus-5-5 on 2026-10-18, not yet reviewed by a human. Every claim cites its source; check it when a detail matters.
In plain words
When GPT-3 came out, the standard way to get it to do a task was to paste a few solved examples into the prompt and let it continue the pattern. People read the improvement from more examples as the model "learning" the task on the fly. This paper argues that, at least for tasks like translation, the examples mostly tell the model which skill it already has you want, a bit like telling a multilingual friend "now say it in English" rather than teaching them English.
The evidence is one small experiment: French-to-English translation with GPT-3 models through OpenAI's API. A prompt with no examples at all, just "French:" before the sentence and "English:" after it, scored about as well as or better than a prompt with ten examples in the original GPT-3 style. Adding a single example to that simple prompt actually made it worse, because the model treated the example as part of an ongoing story.
The rest of the paper is a set of practical ideas for writing prompts as natural language: name the task directly, invoke a familiar character or situation (a teacher and a student, a famous expert) to carry a lot of implied instructions, write the prompt so that the only sensible continuation is the one you want, and make the model write out steps before giving an answer. It also introduces "metaprompts": short generic openers such as "Let's solve this problem by splitting it into steps." that make the model write its own task-specific reasoning procedure.
It is an exploratory, mostly qualitative paper. Only the translation result is measured; the reasoning and metaprompt ideas are shown with a handful of single examples.
TL;DR
- Claims few-shot examples in GPT-3 mainly perform task location (pointing at an already-learned task) rather than meta-learning §1 §3.
- Only quantitative evidence: WMT'14 Fr-En BLEU with API models Babbage and Curie; the 0-shot "Simple colon" prompt gets 23.5 / 33.3 BLEU vs 25.1 / 27.9 for a reproduced 10-shot GPT-3-style prompt, and the "Master translator" 0-shot prompt gets 26.5 / 32.9 tab. 1.
- 1-shot with the Simple colon format drops to 18.0 / 27.6, which the authors attribute to the model reading the example as part of the narrative ("semantic contamination") §3.2 tab. 1.
- Proposes qualitative prompt-programming techniques: direct task signifiers, demonstration, memetic proxies (personas, archetypal dialogues), prompts that rule out unwanted continuations, serialized reasoning before the verdict, and metaprompts §4.2–§4.7.
- Suggests benchmark changes: report scores with and without catastrophic failures, metaprompt-based evaluation, LM-based evaluation, and text games §5.2.
Problem
GPT-3 was evaluated with 0-, 1- and n-shot prompts, and 0-shot often scored under half of many-shot §3. The usual reading is that the model learns from the examples at run time §3. The authors argue this underestimates 0-shot ability because the original 0-shot prompts were poorly worded, and that a better theory of prompting is needed both to control models and to evaluate them fairly §1 §3.1. A second problem is that closed-ended benchmarks force the answer into the first generated token, which allows only one forward pass of computation; they suspect this partly explains near-random scores on some sections of the multitask (MMLU) benchmark §4.6.
Method
This is a position/exploratory paper. There is no trained model; all experiments are prompts sent to OpenAI's API.
Translation experiment §3.1 tab. 1
- Task: WMT'14 French→English, scored with SacreBLEU tab. 1.
- Models: API engines Babbage and Curie, which the authors map to the 6.7B and 13B GPT-3 models; the mapping is inferred because OpenAI did not publish the API model sizes tab. 1.
- Prompt formats:
- "Reproduced OpenAI" 0/1/10-shot: the original GPT-3 paper's format, reproduced "according to those exact specifications" tab. 1. The format itself is not reprinted in this paper.
- "Simple colon", 0/1/10-shot fig. 1:Pseudocode
French: <example_source_phrase> English: <example_target_phrase> [... more examples for few-shot ...] French: <source_phrase> English: - "Master translator", 0-shot only, quoted verbatim because the wording is the method fig. 2: "A French phrase is provided:
<source_phrase>" on one line, then "The masterful French translator flawlessly translates the phrase into English:" and the model continues.
- 64-shot could not be run because of API constraints; 10-shot was used instead tab. 1.
Prompt-programming framework §4
The model approximates how humans continue text, so a prompt should be one that a human writer would continue in the desired way §1 §4.1. But the output distribution covers every author who could plausibly continue the prompt, not one author, so prompting is partly subtractive §4.1 §4.5. Techniques, meant to be combined (more redundancy reinforcing the target behavior is better) §4.1:
- Direct task specification §4.2: a 0-shot signifier that names or implies an already-known task: a task name ("translate"), a compound description, or a purely contextual pattern like the Simple colon format. It says what, not how.
- Specification by demonstration §4.3: few-shot examples, useful when a bespoke format is needed or examples are easier to express than the task description. Examples are read jointly, not as independent training samples; framing them in a context that makes their independence explicit, or using many of them, mitigates contamination.
- Specification by memetic proxy §4.4: invoke a character or archetypal situation that implies the desired attributes, e.g. asking a moral question of a named public figure, or framing a discussion as teacher and student instead of listing instructions such as "be thorough, explain simply, point out errors" (which may instead produce a comedic, exasperated dialogue).
- Constraining behavior §4.5: write prompts that are inconsistent with unwanted continuations. Worked example: "Translate French to English:" followed by a French sentence often continues in French; a newline, "this French sentence", or quotes each help somewhat; a syntactic frame where the only reasonable continuation is the translation (figs. 1–2) is most reliable. Many-shot success is reinterpreted this way: many repetitions make a break from the pattern unlikely.
- Serializing reasoning §4.6: for closed-ended questions, let the model generate intermediate text ("scratch space") before answering: step-by-step procedures, self-criticism/debate, or elaborating the question. Discourage premature verdicts, otherwise later text only rationalizes the chosen answer; a fragment such as "Let's consider each of these answer choices" is suggested.
- Verdict extraction §4.6: to get a machine-readable answer, stop generation and inject a fragment like "Thus, the correct answer is". To decide when, after each generated token compute the model's conditional probability of that next prompt segment; inject when this signal reaches a maximum.
- Metaprompts §4.7: generic seeds that unfold into a task-specific prompt when joined with the task question, either a short phrase ("This problem asks us to", "For a problem like this,") or a fill-in-the-blank template that alternates fixed prompt text with short generated spans to limit derailment.
Procedure: serialized reasoning with injected verdict [§4.6]
Input: question Q, metaprompt M (e.g. "Let's solve this problem by splitting it into steps."),
verdict fragment V = "Thus, the correct answer is"
1. ctx ← Q + M
2. repeat:
t ← sample next token given ctx; ctx ← ctx + t
s_t ← P_model(V | ctx) # counterfactual likelihood of V
until s_t reaches a maximum # stopping rule beyond "maximum" not stated
3. ctx ← ctx + V; generate the answer span
Output: answer spanMetaprompt examples in the paper (GPT-3 davinci, temperature 0) §4.7:
- Fig. 3: "f(x) = x*x. What is f(f(3))?" + "Let's solve this problem by splitting it into steps." The model's generated answer is 27 fig. 3.
- Fig. 4: same metaprompt on an SAT analogy (BRAGGART :: MODESTY, five options); the model writes a four-step generic procedure fig. 4.
- Fig. 5: fill-in-the-blank template "In order to solve this problem, we will analyze each of the options and determine ___ Let's begin." on the same question; the model starts analyzing option A fig. 5.
- Fig. 6: an "Expert Generator" narrative template: the question in quotes, a story about a machine that picks the most qualified expert, the model fills in the expert's name, and the template then addresses the question to that expert fig. 6.
Hyperparameters
| Name | Value | Where | Notes |
|---|---|---|---|
| Translation models | API babbage, curie | tab. 1 | Mapped to GPT-3 6.7B / 13B by inference only |
| Translation dataset | WMT'14 Fr→En | tab. 1 | Split and number of sentences not stated |
| Metric | BLEU via SacreBLEU | tab. 1 | SacreBLEU signature/tokenizer not stated |
| Shots | 0, 1, 10 | tab. 1 | 64-shot not reproduced (API constraints) |
| Few-shot example selection | not stated | Which examples, ordering and random seed not stated | |
| Translation decoding (temperature, max tokens, stop sequence) | not stated | Authors say reproduction gap may come from "unknown hyperparameters" tab. 1 | |
| Metaprompt engine | davinci | §4.7 | |
| Metaprompt temperature | 0 | §4.7 | |
| Verdict-injection rule | inject at maximum of P(verdict fragment | context) | §4.6 | Window, smoothing and maximum generation length not stated |
Results
Author-reported. WMT'14 Fr→En BLEU (SacreBLEU) with GPT-3 variants tab. 1. The first three rows are numbers quoted from the original GPT-3 paper (6.7B / 13B); the rest are the authors' runs on the API models Babbage / Curie.
| Prompt | Babbage / 6.7B | Curie / 13B | Source |
|---|---|---|---|
| OpenAI 0-shot (GPT-3 paper) | 15.5 | 22.4 | tab. 1 |
| OpenAI 1-shot (GPT-3 paper) | 31.6 | 31.4 | tab. 1 |
| OpenAI 64-shot (GPT-3 paper) | 36.4 | 38.3 | tab. 1 |
| Reproduced OpenAI 0-shot | 15.9 | 18.7 | tab. 1 |
| Reproduced OpenAI 1-shot | 21.8 | 24.1 | tab. 1 |
| Reproduced OpenAI 10-shot | 25.1 | 27.9 | tab. 1 |
| Simple colon 0-shot | 23.5 | 33.3 | tab. 1 |
| Simple colon 1-shot | 18.0 | 27.6 | tab. 1 |
| Simple colon 10-shot | 24.1 | 33.4 | tab. 1 |
| Master translator 0-shot | 26.5 | 32.9 | tab. 1 |
Qualitative observations (not measured):
- Many of the weakest 0-shot prompts in the GPT-3 paper, especially QA benchmarks, could be improved by more natural formatting §3.1.
- Low-shot contamination (examples read as part of a continuing narrative) was seen across a variety of tasks §3.2.
- Failures of OpenAI's 0-shot translation prompt were often catastrophic: the model continued in French or emitted blanks/underscores instead of translating §5.1.
- GPT-3 is more reliable at noticing that a passage is bizarre or wrong than at producing error-free text §5.2.3.
Paper vs code
No official code.
Pitfalls
- The headline claim rests on one task and two small models. Only Fr→En translation is measured, with Babbage and Curie; nothing is run on the largest model for translation §3.1 tab. 1. The "task location, not meta-learning" thesis is not tested on tasks the model cannot already do.
- Reproduced baselines are far below the published ones (e.g. 1-shot 21.8 vs 31.6 on Babbage) tab. 1. The beat over 10-shot is against the authors' reproduction, not the GPT-3 paper's numbers; the published 64-shot numbers (36.4 / 38.3) remain higher than every prompt in this paper tab. 1.
- Model sizes are inferred. The Babbage = 6.7B and Curie = 13B mapping is the authors' guess tab. 1, and API models may change over time (the authors suggest API changes as one cause of the reproduction gap) tab. 1.
- Decoding settings for the translation runs are not given (temperature, max length, stop sequences, how the output is cut before scoring). For the Simple colon format, stopping at the next newline or at "French:" matters a lot for BLEU; this is not stated.
- No per-example analysis. BLEU is a corpus mean; the claim that removing catastrophic failures would close the 0- vs 64-shot gap is a hypothesis, not a result §5.1.
- The Fig. 3 metaprompt example produces a wrong answer. For f(x) = x·x, f(f(3)) = f(9) = 81, but the generated text says 27 and the paper shows it without comment fig. 3. Treat figs. 3–6 as demonstrations of format, not evidence that the metaprompts improve accuracy. No accuracy numbers are reported for any metaprompt.
- Fig. 4 output is a generic procedure, not a solution: the model lists steps but no answer is shown fig. 4. A verdict still has to be extracted, e.g. by the injection method of §4.6.
- Verdict-injection rule is underspecified. "Inject when the probability of the verdict fragment reaches a maximum" needs a definition of when a maximum is detected online (look-ahead, patience, a cap on length). It also costs an extra scoring pass for the fragment after every generated token §4.6.
- Derailment risk grows with free generation length §4.6 §5.2.2; the paper's mitigation is fill-in-the-blank templates with short generated spans (figs. 5–6), not evaluated quantitatively.
- Generated text in fig. 6 contains factual claims about a real person that the paper does not check fig. 6; persona/proxy prompts can surface confident but wrong content.
- Numbering slips in the source. The text says the metaprompt examples are "Figs 3-5", but there are four (figs. 3–6) §4.7. The citation given for "generating prompts with separate models" in §4.7 points to the SacreBLEU paper, which appears to be a wrong reference.
- No reasoning gains are measured. "Let's solve this problem by splitting it into steps." is a 0-shot serializing trigger, but the paper reports no accuracy for it, so do not cite this paper for reasoning gains.
Lineage
- Builds on: GPT-3 ("Language Models are Few-Shot Learners", arXiv:2005.14165), whose translation prompts and numbers are the baseline §3 tab. 1; informal prompting write-ups by Gwern, Arram Sabeti, Zachary Robertson and KaryoKleptid §2.
- Contrasted with: gradient-based prompt search (AutoPrompt, prefix-tuning) and dynamic few-shot example selection §2.
- Superseded by: nothing recorded in this wiki yet.
Source and license
Adapted from “Prompt Programming for Large Language Models: Beyond the Few-Shot Paradigm” by Laria Reynolds, Kyle McDonell (arXiv:2102.07350), used under CC BY 4.0. Changes: condensed and restructured for implementation, with tables, equations and algorithms taken from the paper and its code, each cited to its source. Not affiliated with or endorsed by the authors.