Skip to the content
AI and Cybersecurity Learning and Practice Center Test automation Open the Learning Center

Glossary

Few-shot prompting

Showing a model a few worked examples of the task in the prompt, so it follows the pattern without retraining. Anthropic calls examples one of the most reliable ways to steer format, tone and structure.

Examples are instructions too: in the ICLAttack research, poisoned examples changed a model's behavior without any fine-tuning, even when each one looked correctly labeled. Take examples from a reviewed set, never straight from user feedback.

Open the glossary in the Learning Center