← COURSE CURRICULUM
CNSLT ACADEMY / CONTROL THE INTERACTION

Zero-shot and Few-shot Prompting

13 MIN•BEGINNER•PUBLIC LESSON

A prompt is an instruction plus context. Examples can clarify the pattern you want, but they do not remove the need to test the result.

01 / CONCEPT

Zero-shot prompting

A zero-shot prompt asks the model to perform a task without giving examples. It is a useful baseline and often works well when the task is familiar and the instruction is specific.

02 / CONCEPT

Few-shot prompting

Few-shot prompting supplies examples of inputs and desired outputs. Examples can demonstrate tone, labels, boundaries and formatting more precisely than a long verbal description.

Examples should be representative. A poor or inconsistent example set teaches the wrong pattern, and examples that contain sensitive data create avoidable exposure.

03 / CONCEPT

A disciplined comparison

  • Keep the task and evaluation criteria constant.
  • Change only whether examples are present.
  • Use several test inputs, not one cherry-picked example.
  • Record failure cases as well as successful outputs.
PRACTICAL WORK

Sign in to access the lab and homework

The lesson explanation is free to read. Create a free learner account to use the practical exercise, submit homework and track your progress.

CREATE FREE ACCOUNT →
← PREVIOUS LESSONNEXT LESSON →