AIF-C01 domain - 16% of the exam

Prompt engineering and evaluation

Prompt engineering and evaluation is 16% of the AWS Certified AI Practitioner (AIF-C01) exam. These are the objectives it covers, each with practice questions and worked explanations.

Objectives in this domain

Sample question from this domain

Free samplePrompt engineering and evaluationmedium

A developer is building a customer support chatbot that must classify incoming messages into one of five predefined categories. The model occasionally misclassifies edge cases. Which prompt engineering technique is most likely to improve classification accuracy without fine-tuning?

  • AIncrease the model's temperature setting to make responses more varied and exploratory.
  • BAdd a few labelled examples of each category directly in the prompt before the user message. Correct
  • CAppend a system message instructing the model to respond only in JSON format.
  • DBreak the prompt into multiple sequential calls so each call handles one category independently.
Understand how few-shot prompting anchors a model to a correct label space and improves classification accuracy on edge cases. Few-shot prompting supplies the model with labelled input-output pairs that demonstrate the desired mapping. This narrows the model's interpretation of the task and reduces the probability of it choosing an incorrect label, especially for inputs that sit near the boundary between categories.

Why A is wrong: Higher temperature increases randomness, which is likely to worsen classification consistency rather than improve it; it does not address the root cause of misclassification.

Why B is correct: Few-shot prompting provides the model with concrete examples of the task, anchoring its output distribution to the correct label space and reducing ambiguity on edge cases.

Why C is wrong: Enforcing JSON output controls format, not classification accuracy. Without category examples, the model still has the same ambiguity about which label to assign.

Why D is wrong: Running one call per category would require five API calls and still relies on the model making a binary yes/no decision per category, which does not resolve the original classification ambiguity.

Other domains in this exam

See also the AIF-C01 cert hub, the study guide, and the cheat sheet.

Examworthy is not affiliated with or endorsed by Amazon Web Services. Original, blueprint-aligned practice material only.