Sentiment analysis

#23
by PTsag - opened

Hi everyone,

I tried to use gemma for sentiment analysis and limit it's output to one word (positive, negative or neutral) but no matter what it would always return the sentiment and also an explenation of why it ended up with that sentiment. So my question is how to make gemma responde with only one single word?

I would recommend you to request a JSON object as a output. So, you can then post-process the output and extract the sentiment as required.
Good practice: Tell the exact format through the prompt.

Sign up or log in to comment