Example

Examples of Instruction-based Prompts for Polarity Classification

Instruction-based prompts for polarity classification give a direct command to the model, defining the task and the possible outputs. These instructions can vary in style. For example, a formal instruction can be used:

'Assume that the polarity of a text is a label chosen from {positive, negative, neutral}. Identify the polarity of the input.'

Another approach is a more direct command about the task:

'Analyze the polarity of the following text and classify it as positive, negative, or neutral.'

A third option is a concise instruction that focuses solely on constraining the output format:

'Just answer: positive, negative, or neutral.'

All three examples clearly establish the set of possible labels and instruct the model on the action to perform.

0

1

Updated 2026-05-02

Contributors are:

Who are from:

Tags

Ch.1 Pre-training - Foundations of Large Language Models

Foundations of Large Language Models

Computing Sciences

Ch.3 Prompting - Foundations of Large Language Models

Foundations of Large Language Models Course

Related