Example of a Prompt for Polarity Classification (Negative Sentiment)
A prompt for polarity classification can be structured by combining a direct instruction, the input text, and a concluding question. This format clearly defines the task, provides the content for analysis, and guides the model toward a specific answer. For example:
'Analyze the polarity of the following text and classify it as positive, negative, or neutral.
The service at the restaurant was slower than expected, which was a bit frustrating.
What is the polarity of the text?'
0
1
Tags
Ch.3 Prompting - Foundations of Large Language Models
Foundations of Large Language Models
Foundations of Large Language Models Course
Computing Sciences
Related
Examples of Instruction-based Prompts for Polarity Classification
Example of a Prompt for Polarity Classification (Negative Sentiment)
Example of a Simple Prompt for Polarity Classification
An engineer needs to classify user feedback into one of three categories: 'Bug Report', 'Feature Request', or 'General Feedback'. To ensure the language model's output is strictly one of these labels, they decide to frame the problem as a sentence-completion task. Which of the following prompt structures best exemplifies this specific technique?
Improving LLM-based Ticket Classification
Rationale for Cloze-based Classification
Example of a Cloze-like Prompt for Polarity Classification
Formula for Label Selection via Probability Maximization
Example of a Prompt for Polarity Classification (Negative Sentiment)
Example of a Simple Prompt for Polarity Classification
A developer is using a large language model to classify customer feedback into one of three categories: 'Positive', 'Negative', or 'Neutral'. The model correctly identifies the sentiment but often generates free-form text like 'The customer seems unhappy' instead of the specific label 'Negative'. This inconsistency is causing problems for a data analysis pipeline that expects one of the three exact labels. Which of the following approaches would be the most direct and reliable way to ensure the model always outputs one of the three predefined labels?
Automating Support Ticket Classification
Mechanism of Constrained Prediction
Learn After
A user wants to classify a piece of text using a large language model. They provide the following prompt:
'The movie was incredibly boring and the plot was predictable. What do you think?'
Which of the following statements best analyzes the primary weakness of this prompt for a classification task?
Example of an LLM Generating a Descriptive Negative Output for Polarity Classification
Improving a Prompt for Text Classification
You are tasked with creating a prompt to determine the sentiment of a customer review. Arrange the following components into the most effective and clear structure for a large language model.