Few-shot learning

Few-shot prompting includes a handful of worked examples in the prompt so the model infers the pattern you want.

Two to five diverse, correct examples typically beat pages of prose instructions, especially for formatting and edge cases. Cover the boundaries you care about, since the model will generalise from whatever pattern your examples imply.

All AI terms