Q75 — AWS AIF-C01 Ch.1
Question 75 of 100 | ← Chapter 1
A company wants to use a foundation model (FM) on Amazon Bedrock for sentiment analysis. The company wishes to classify text passages as either positive or negative. Which prompt engineering strategy satisfies these requirements?
- A. Include example text passages with corresponding positive or negative labels in the prompt, then provide the new text passage to be classified. ✓
- B. Provide a detailed explanation of sentiment analysis and how large language models (LLMs) work in the prompt.
- C. Provide only the new text passage to be classified, without any additional context or examples.
- D. Provide the new text passage along with examples of unrelated tasks, such as text summarization or question answering.
Correct Answer: A. Include example text passages with corresponding positive or negative labels in the prompt, then provide the new text passage to be classified.
Explanation
This question tests understanding of prompt engineering strategies for sentiment analysis using large language models. Providing labeled examples in the prompt gives the model clear classification references. Option A—first presenting labeled examples, then the new passage—helps the model learn and classify accurately. Option B’s theoretical explanation offers little direct benefit for classification. Option C lacks examples, leaving the model without reference. Option D’s irrelevant task examples do not support binary sentiment classification. Thus, A is correct.