Pattern
Few-shot and N-shot prompting patterns
Improve model performance on specific tasks by including 1–N examples of desired input→output pairs in the prompt, allowing the model to infer patterns from the examples rather than relying on instruction-following alone.
Classification — Including examples in the prompt to demonstrate desired behavior.
Full entry
The complete treatment — problem, how it works, when to use it, sources, and examples — lives in the volume below.
Browse the full pattern index or the catalog.