@tokalator4.2.0…installs…downloads
Dictionary
Prompt Engineering

Few-Shot Prompting

Showing the AI a few examples of what you want before asking, like showing a sample letter before requesting one.

Definition

Including a few worked examples of the desired input and output in the prompt so the model copies their format, tone, and reasoning, without any change to its weights. The GPT-3 paper (2020) popularized the term; Anthropic's prompting guide calls it few-shot or multishot prompting, recommends 3 to 5 diverse examples, and suggests wrapping them in <example> tags.

Example

<example>Input: 'refund late' Output: refund</example> repeated three times with different inputs, then the real message to classify.

Appears in