Sentiment analysis, or opinion mining, classifies the subjective tone of text—usually positive, negative, or neutral. It turns piles of reviews, posts, or articles into a rough view of what people feel about a product, event, or topic. section 8.3
It can support practical questions such as:
- How do customers perceive a brand, product, or service? section 8.3
- What themes or mood shifts appear across large volumes of feedback? section 8.0 section 8.3
- Are public discussions signaling reputational, political, social, or market concerns? section 8.3
Traditional workflows preprocess text, extract sentiment-bearing features, classify each short response by polarity, and aggregate the labels into a statistical profile. GPT offers a shortcut: give each comment a tightly constrained instruction and request a one-word label. That shortcut is useful, not magical; labels still need comparison against known data and real-world checks. section 8.3 section 8.4 section 8.6
Classifying product reviews with GPT
Load a labeled CSV of X posts, send each product review to GPT-3.5 or GPT-3 with a prompt requiring “positive” or “negative,” store the returned label, then count where predictions agree or disagree with the existing sentiment label. The sample prompt permits “not sure” and recommends manual review when uncertain. In the test results, both models misclassified neutral, irrelevant, and some clearly labeled posts—and rate limits interrupted larger runs. So: automate cautiously, then inspect the receipts. section 8.4 section 8.4 section 8.6
Figure 8.2 Using sentiment analysis to infer the underlying mood (or sentiment) of short-form content
Use the figure to anchor polarity labels in short-form content before attempting more nuanced moods such as anger, appreciation, or surprise. section 8.3











