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.
Referenced AWS AI/ML Documents and Study Guides:
AWS Prompt Engineering Guide
Amazon Bedrock Developer Documentation – Prompting Techniques
AWS ML Specialty Study Guide – LLM Prompting Patterns
Submit