Example

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

Updated 2026-05-02

Contributors are:

Who are from:

Tags

Ch.3 Prompting - Foundations of Large Language Models

Foundations of Large Language Models

Foundations of Large Language Models Course

Computing Sciences