Sentiment analytics are model-assisted indicators, not audited customer satisfaction scores.

Model

Kommander sentiment uses the npm sentiment lexicon model through backend/lib/sentimentAnalysis.ts. The service analyzes only user-authored text in each conversation, then assigns:

FieldDefinition
scoreRaw lexicon score from the sentiment package.
comparativeScore normalized by token count.
labelpositive when score is above 0, negative when below 0, otherwise neutral.
confidenceabs(comparative) * 100, capped at 100.

The sentiment endpoint reads recent conversations from /api/analytics/sentiment, defaults to the last seven days, and analyzes up to limit=100 conversations unless another limit is supplied.

Satisfaction Score

Sentiment satisfaction is a heuristic score from 0 to 100:

AdjustmentEffect
BaselineStarts at 50.
Positive sentimentAdds up to 30, based on confidence.
Negative sentimentSubtracts up to 30, based on confidence.
More than 10 messagesSubtracts 5 because long threads can indicate friction or complexity.
Fewer than 3 messagesAdds 5 for short interactions.
Last user message includes thank, perfect, or solvedAdds 15.
Last user message includes not helpful, still, or doesn't workSubtracts 15.

The overview average satisfaction is the rounded mean of conversation satisfaction scores in the analyzed set.

Interpretation Guide

Use sentiment to prioritize review, not to grade individual operators in isolation.

SignalInterpretationRecommended action
Positive label with high confidenceThe user used clearly positive words.Sample for successful answer patterns and reusable knowledge.
Neutral labelThe user did not use enough positive or negative language for a directional label.Interpret alongside response time, ratings, message count, and whether the issue was resolved.
Negative label with high confidenceThe user used clearly negative, urgent, or frustrated language.Review quickly, check whether a handoff occurred, and update escalation or knowledge-base coverage when needed.
Low satisfaction scoreThe heuristic found negative sentiment, long thread length, unresolved language, or a combination of those signals.Use as a queue review trigger; read the transcript before making coaching or product decisions.
Sentiment improving over timeLater conversations or categories show fewer negative labels.Confirm with concrete metrics such as ratings, source usage, and response time.
Sentiment worsening over timeNegative labels or complaint categories are increasing.Inspect topic clusters, recent launches, outage periods, and operator handoff delays.

For handoff operations, treat strong negative sentiment, payment disputes, cancellation intent, legal threats, safety concerns, privacy issues, and repeated failed answers as review triggers even when the numeric confidence is not high.

Topics And Categories

The sentiment service also adds rule-based topics and categories:

OutputRules
TopicsKeyword buckets for payment, technical, feature, account, integration, and performance; falls back to general.
CategoriesRules for compliments, technical support, billing questions, feature requests, complaints, and general info; falls back to general_info.

Accuracy Notes

The current implementation does not use a fine-tuned classifier or a measured validation set, so there is no production accuracy percentage to report. Treat labels and satisfaction as directional indicators.

Accuracy is highest when users write explicit positive or negative language in English. It is lower for sarcasm, short messages, mixed-language threads, domain-specific wording, and conversations where sentiment changes during the thread.

For reporting, use sentiment trends alongside concrete operational metrics such as response time, ratings, source usage, and conversation volume.