Sentiment analysis

Classify the sentiment of a sentence

Prompt type: Data
Use case:
Classify Extract
Open in Google AI Studio

Context

Tell me whether the following sentence's sentiment is positive or negative or something in between.

Prompt examples

Input Sentence
Output Sentiment

I would love to walk along the beach.

Somewhat positive

I love my new record player

Positive

I really hate it when my brother steals my things

Negative

Sample responses

Input Sentence
Output Sentiment

I really don't know how to feel about Pokemon

Sentiment in between

Get code

Enable API key to develop with the Gemini API

You can call this prompt from our Gemini API by integrating the following code into your project.