nerdexam
Amazon

AIF-C01 · Question #59

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…

The correct answer is A. Provide examples of text passages with corresponding positive or negative labels in the prompt. Providing examples of text passages with corresponding positive or negative labels in the prompt followed by the new text passage to be classified is the correct prompt engineering strategy for using a large language model (LLM) on Amazon Bedrock for sentiment analysis.

Submitted by olafpl· Mar 30, 2026Implement Machine Learning Solutions

Question

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?

Options

  • AProvide examples of text passages with corresponding positive or negative labels in the prompt
  • BProvide a detailed explanation of sentiment analysis and how LLMs work in the prompt.
  • CProvide the new text passage to be classified without any additional context or examples.
  • DProvide the new text passage with a few examples of unrelated tasks, such as text summarization

How the community answered

(48 responses)
  • A
    81% (39)
  • B
    4% (2)
  • C
    4% (2)
  • D
    10% (5)

Explanation

Providing examples of text passages with corresponding positive or negative labels in the prompt followed by the new text passage to be classified is the correct prompt engineering strategy for using a large language model (LLM) on Amazon Bedrock for sentiment analysis.

Topics

#LLM Prompt Engineering#Amazon Bedrock#Sentiment Analysis#Few-shot Prompting

Community Discussion

No community discussion yet for this question.

Full AIF-C01 Practice