Open Agent School · Public worked example

Few-shot prompting: meaning and example

Welcome! Take one idea with you today.

Including a small number of examples in a prompt to demonstrate the task or response pattern.

Picture it: Show two examples of sorting a request before asking the model to sort a third.

What is easy to mix up?

In-context examples guide inference without updating the model weights; they are not fine-tuning.

Teaching example by Open Agent School. Source: Google Cloud - Generative AI glossary.