AWS Certified AI Practitioner (AIF-C01) — Question 25

A company wants to use a large language model (LLM) on Amazon Bedrock for sentiment analysis. The company wants to classify the sentiment of text passages as positive or negative.

Which prompt engineering strategy meets these requirements?

Answer options

Correct answer: A

Explanation

Option A is correct because providing examples with labels helps the LLM understand the classification task. Option B, while informative, does not directly aid in sentiment classification. Option C lacks context, which is essential for accurate classification, and Option D introduces unrelated tasks, which could confuse the model and lead to incorrect sentiment analysis.