Perform Sentiment Classification on Survey Responses

Perform Sentiment Classification on Survey Responses

What You Will Learn

You will learn how to use Gemini or AI functions to classify survey comments as Positive, Neutral, Negative, or Mixed.

Required Dataset

Use the workbook from Lesson 15.

You will use:

Raw_Comments

Theme_Classification

Theme_Check

Create one new tab:

Sentiment_Classification

Before You Start

Copy the comments from Raw_Comments into Sentiment_Classification.

Create these columns:

Comment ID

Raw Comment

Sentiment

Evidence Phrase

Confidence Level

Review Needed

Use the same comments from Lesson 15, or add a few new ones with different tones.

Step-by-Step Instructions

Step 1. Ask Gemini to classify sentiment

Open Gemini and enter:

Act as a survey analysis consultant.

Classify each comment in Sentiment_Classification as Positive, Neutral, Negative, or Mixed.

Return:

  1. Comment ID
  2. Sentiment
  3. Short evidence phrase
  4. Confidence Level: High, Medium, or Low
  5. Review Needed: Yes or No

Use Mixed when the comment includes both positive and negative views.

Use Neutral when the comment is factual or unclear.

Paste Gemini’s output into the correct columns.

Step 2. Use an AI function if available

If your Google Sheets environment supports AI functions, use this formula in the Sentiment column:

=AI(“Classify this survey comment as Positive, Neutral, Negative, or Mixed. Return only the sentiment label.”, B2)

For Evidence Phrase, use:

=AI(“Extract a short phrase from this comment that supports the sentiment classification. Return only the phrase.”, B2)

For Confidence Level, use:

=AI(“Rate confidence in the sentiment classification as High, Medium, or Low. Return only the label.”, B2)

Copy the formulas down.

Step 3. Add a review-needed rule

If Sentiment is in column C and Confidence Level is in column E, use:

=IF(OR(C2=”Mixed”,E2=”Low”),”Yes”,”No”)

This flags comments that may need human review.

Expected Result

You should have a sentiment-classified survey table with sentiment labels, evidence phrases, confidence levels, and review flags.

Check Your Work

Confirm that positive comments are not mislabeled as negative, mixed comments are flagged, and vague comments are not overinterpreted. Review all low-confidence rows manually.

Optional Extension

Ask Gemini:

Summarize the sentiment results. Identify the share of positive, neutral, negative, and mixed comments, and highlight themes that may require management attention.

How to get started

1

arrow-down-blue

Tell us about your project

2

arrow-down-blue

Interview candidates

(We’ll provide bios within 48 hours on average)

3

Select your consultant and start work

Find a Consultant

or email us at: [email protected]