Exams / AIF-C01 / Prompt engineering / Question 1
AIF-C01 practice question: Prompt engineering (1 of 4)
Applications of Foundation Models A free question from our original AIF-C01 practice exam. Try it, then open the answer to see why each option is right or wrong.
A hotel group wants a model to sort guest comments into "room", "food" or "staff". The developer adds three example comments, each followed by its correct category, before the new comment in the prompt. What is this technique called?
Choose one answer.
- AA. Zero-shot prompting
- BB. Few-shot prompting
- CC. Continued pre-training
- DD. Prompt caching
Show the answer and explanation
Answer: B
- A. Wrong: Zero-shot prompting gives the task with no examples. This prompt includes three.
- B. Right: Correct. Few-shot prompting includes a small number of example inputs with their desired outputs to guide the model.
- C. Wrong: Continued pre-training changes model weights using unlabelled data. Nothing is trained here.
- D. Wrong: Prompt caching reuses a repeated prompt prefix to save cost and time. It does not describe adding examples.
Explanation
In prompt engineering, a "shot" is an example input paired with the desired output. Zero-shot gives no examples, one-shot (single-shot) gives one, and few-shot gives several. Few-shot prompting, also called in-context learning, helps the model match the expected format and categories without any training.
Study
Keep practising
Answer questions with a score at the end, or practise just this topic with the explanation after each one. No sign-up needed.