MemotivaPrompt Engineering Patterns: Zero-Shot vs Few-Shot Prompting Explained for LLM Developers

How do you choose good examples for few-shot prompting?

Prompt Engineering Patterns: Zero-Shot vs Few-Shot Prompting Explained for LLM Developers

Audio flashcard · 0:19

Nortren·

How do you choose good examples for few-shot prompting?

0:19

Choose examples that are diverse, representative of edge cases, accurate, and formatted exactly as you want the model to respond. Avoid all examples being from one extreme of the input distribution. If your task has multiple categories, include at least one example from each. Order matters too: the most recent example often has the strongest influence on the model.
promptingguide.ai