
Ultimate access to all questions.
Deep dive into the quiz with AI chat providers.
We prepare a focused prompt with your quiz and certificate details so each AI can offer a more tailored, in-depth explanation.
Question: 13
You are developing an AI-powered sentiment analysis application in Databricks using a large language model (LLM). The task is to classify customer reviews as either positive or negative. You notice inconsistent results when the input prompt is written in various formats. Which of the following prompt formats is most likely to generate the most accurate result when requesting the model to classify the sentiment of a review?
A
Prompt: "The customer says: '[REVIEW TEXT]'. Is the sentiment positive?"
B
Prompt: "Analyze the sentiment of this text: [REVIEW TEXT]."
C
Prompt: "[REVIEW TEXT]. What is the mood of the speaker?"
D
Prompt: "Classify the following review as either Positive or Negative: [REVIEW TEXT]."
Explanation:
Option D is the correct answer because:
Why other options are less effective:
Best Practice: When designing prompts for classification tasks, always specify the exact categories and desired output format to ensure consistent and accurate results from LLMs.