shipwithjev

Blog / 35

Sentiment Analysis With LLMs: From Vibes Dashboard to Verdicts

Sentiment analysis grew up: decision models judge emotion, intent, and churn signals per message for fractions of a cent. How to avoid the old traps.

Sentiment analysis has been "solved" three times: once by word lists (count the happy words), once by trained classifiers (better, brittle, forever confused by sarcasm), and once by dashboards that render both as a gauge nobody acts on. The reason it keeps needing re-solving is that positive/negative/neutral was never the question anyone had. Nobody ships a fix because sentiment dipped 4 points; people act on specific signals: is this customer about to leave, is this review citing a defect, is this thread turning hostile.

Which is why the decision-model version of sentiment isn't really sentiment analysis at all. It's a stack of named judgments per message, and that turns out to be what the gauge was always pretending to be.

Replace the gauge with questions

Instead of one fuzzy score, a battery of operational verdicts per item:

  • Does the message express intent to stop using the product?
  • Is a specific defect or failure described (preference complaints don't count)?
  • Is the tone hostile toward a person, versus frustrated at a situation?
  • Does it contain praise specific enough to quote?
  • Has the emotion changed versus this customer's last three messages?

Each is closed-set, checkable, and directly wired to an action (route, flag, escalate, celebrate). At reported verdict prices, running eight of these across every message in every channel costs less than the dashboard's hosting bill; the reference workload is the 3,282-post run at $0.13 for ~26,000 verdicts, which was, functionally, sentiment analysis with its act together.

Where the old approaches still fail and this one doesn't (mostly)

Sarcasm, negation ("not bad at all"), mixed feelings ("love the product, hate the billing"), and domain slang were the classic classifier-killers; general language models handle them credibly, and decomposition handles the mixed-feelings case structurally: the love-the-product verdict and the hate-the-billing verdict are separate questions, so nothing gets averaged into mush. The residual failure modes are the standard judge biases: fluency and length effects, plus instruction bleed on text that discusses emotions. Test deliberately, keep an "unclear" option, cascade the ambiguous slice per the routing pattern.

Where to point it first

Support streams, where the churn-language verdict feeds straight into ticket triage and the retention machinery. Reviews, where defect-vs-preference is the judgment that decides product roadmaps, and authenticity screening rides the same pass. Social and community, where hostile-vs-heated is a moderation call and specific-praise detection quietly builds your testimonial pipeline. Survey open-ends and call transcripts, the great unread piles; batch judging turns them into queryable labeled data, and call QA is the same machine with headphones on.

The honest boundary: verdicts describe the text, not the soul. "Expresses intent to cancel" is knowable; "is secretly unhappy" is fiction, and a pipeline that pretends otherwise will page you for ghosts. Ask about evidence, act on patterns, and let single messages be single messages.

Frequently asked questions

Is LLM sentiment analysis better than traditional sentiment tools?

On sarcasm, negation, and mixed messages, yes, materially; and decomposed verdicts beat single scores on actionability. Trained models keep the edge only at extreme volume on stable categories, per the classic-ML comparison.

What does it cost to analyze sentiment at scale?

Reported reference: ~26,000 structured verdicts for $0.13 on a decision model. Whole-channel coverage prices in coffee money; see the cost table.

Can it detect sarcasm?

Far better than lexicon and classic classifiers, imperfectly like everything else; the fix is confidence gating, not optimism. Ambiguous tone is exactly what the escalation tier is for.

What questions should replace the positive/negative score?

The ones wired to actions you'd actually take: cancellation intent, defect mention, hostility toward persons, quotable praise, emotional trajectory. If no action hangs on a question, delete the question.

Numbers throughout are as reported by the build authors, not verified by shipwithjev. Code-shaped examples are pseudocode; the official docs live at docs.typesafe.ai.