Example of a Prompt with a Post-Input Instruction for Polarity Classification
A prompt for polarity classification can be structured by placing the instruction after the input text and question. This format presents the content for analysis first, followed by a direct question and a final command that constrains the output to a specific set of labels. For example:
'The service at the restaurant was slower than expected, which was a bit frustrating.
What is the polarity of the text?
Just answer: positive, negative, or neutral.'
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
Example of a Negative Input for Polarity Classification
Examples of Positive Inputs for Polarity Classification
Example of a Prompt with a Post-Input Instruction for Polarity Classification
A developer needs a language model to classify customer feedback into one of three categories: 'positive', 'negative', or 'neutral'. The primary goal is to ensure the model's output is only one of these three words, without any additional explanation or conversational text. Which of the following instruction-based prompts is most effective for this specific requirement?
Analyze the following instruction-based prompts designed for a text classification task. Match each prompt to the description that best characterizes its primary approach.
Improving a Faulty Classification Prompt
Example of a Prompt with a Post-Input Instruction for Polarity Classification
A developer is building an automated system to sort customer support tickets. The system requires a language model to categorize each ticket's sentiment so it can be routed correctly. For the system to work, the model's output must be exactly one of the following words: 'Positive', 'Negative', or 'Neutral'. Which prompt most effectively uses a direct, imperative command to achieve this specific, constrained output?
Crafting a Constraining Command for an LLM
Diagnosing a Failing Data Labeling Pipeline
Learn After
A developer wants to create a prompt that first presents a movie review, then asks about its sentiment, and finally provides a specific instruction on how the model should format its answer. Which of the following prompts best implements this structure?
Analysis of Prompt Components for Polarity Classification
You are constructing a prompt to classify a movie review. To ensure the model provides a single-word answer ('positive', 'negative', or 'neutral'), you decide to place the instructional command after the input text and question. Arrange the following components in the correct sequence to create the most effective prompt.