Amazon Web Services AWS Certified AI Practitioner Exam AIF-C01 Question # 79 Topic 8 Discussion
AIF-C01 Exam Topic 8 Question 79 Discussion:
Question #: 79
Topic #: 8
A company wants to use a large language model (LLM) to generate product descriptions. The company wants to give the model example descriptions that follow a format.
Which prompt engineering technique will generate descriptions that match the format?
The correct answer is D because Few-shot prompting involves providing the LLM with a few examples of the expected input-output format. This helps the model learn and mimic the pattern or structure required in the response — such as generating product descriptions that follow a specific template.
From AWS documentation:
"Few-shot prompting helps guide the model to produce structured and domain-specific outputs by supplying a small number of example inputs and corresponding outputs."
Explanation of other options:
A. Zero-shot prompting provides no examples, which may lead to inconsistent formatting.
B. Chain-of-thought prompting is used to guide reasoning steps, not formatting.
C. One-shot prompting uses a single example, but few-shot typically yields better structure adherence.
AWS ML Specialty Study Guide – LLM Prompting Patterns
Contribute your Thoughts:
Chosen Answer:
This is a voting comment (?). You can switch to a simple comment. It is better to Upvote an existing comment if you don't have anything to add.
Submit