Example

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

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