Few-shot prompting

Steering Llama 2 via Contrastive Activation Additioninherited

A prompting technique (Brown et al., 2020) that supplies prior examples of the desired behavior in the model's context window. Considered by CAA as an alternative comparison baseline but not used, after preliminary experiments found it less effective than system-prompting at steering the tested behaviors.

Showing a model examples of the behavior you want, rather than just describing it, is another standard way to steer generation without touching the weights at all. It was a candidate baseline for this paper too, until early experiments made the choice for the authors.

Why few-shot prompting ends up mentioned rather than used throughout is explained here: preliminary tests found it steered the tested behaviors less effectively than system-prompting did, so system-prompting became the comparison baseline instead.

In-context learning without any weight update

Few-shot prompting places worked examples of the desired behavior directly in a model's context window — several instances of input paired with the response the model should imitate — rather than stating an instruction, and lets the model infer the pattern purely from context. Brown et al. (2020) introduced the technique alongside GPT-3 as evidence that a sufficiently large language model could perform new tasks from a handful of examples with no gradient update at all, a capability that paper named in-context learning and treated as one of scale's most striking side effects.

Losing out to system-prompting, and what that says about the two techniques

CAA tests few-shot prompting as one candidate comparison baseline before settling on System-prompting instead: preliminary experiments found it less effective than a single instructional prompt at steering the seven behaviors under study (contrastive-activation-addition, §"5 CAA and system-prompting", p. 5). The paper is careful not to overstate this as a general verdict — its Limitations section concedes it did not exhaustively search prompting configurations for either baseline, and better-optimized few-shot prompts might close some of the reported gap (contrastive-activation-addition, §"Prompting baseline optimization", p. 10). Read against InstructGPT, the result locates few-shot prompting's real strength rather than dismissing it: in 2022, a hand-optimized few-shot prefix was GPT-3's strongest non-finetuned route to looking like it followed instructions at all, the mechanism behind InstructGPT's GPT-3 (prompted) baseline (instructgpt, §"3.5 Models", p. 9). On Llama 2 Chat, a model already RLHF-tuned to follow instructions, that same mechanism is the weaker of two prompting baselines — few-shot prompting elicits an instruction-following mode a raw model lacks, but is a blunter dial than a system prompt for a behavior a chat-tuned model can already exhibit.