AI GLOSSARY · AI CONCEPTS
Sentiment analysis
Definition
Sentiment analysis is the task of judging, by software, whether a piece of text expresses a positive, negative or neutral attitude, such as in a product review or a support message.
Also called: sentiment analysis AI, sentiment analysis NLP, sentiment analysis tool, opinion mining, sentiment classification.
In plain language
Sentiment analysis reads text and labels the mood behind it. A shop might run thousands of reviews through it to see how many customers sound happy and how many sound annoyed, instead of reading each one. The label can be as simple as positive, negative or neutral. It is not a mind reader. Sarcasm, jokes and missing context can flip the real meaning, so a review that says great, it broke on day one may be scored positive. Treat the totals as a rough guide and read a sample of the underlying text before you act, especially when a decision about a person or a refund depends on it.
Technical definition
IBM describes two main approaches. Rule-based systems classify keywords against lexicons, groups of words such as affordable for positive or expensive for negative, and total a score. Machine learning systems learn to read sentiment from the words and their order, and IBM notes they are more adaptable and can handle more complex scenarios. IBM names context, sarcasm and irony as sources of error. In the Stanford textbook Speech and Language Processing, the classification chapter uses sentiment analysis as an example, with a review as the input and a set such as positive and negative as the output, and words like awesome and awful as informative features.
Worked examples in this catalogue
Catalogue examples point at a skill, guide or coding tool listed on this site, with what to run and what you see. An example marked illustrative describes the item from its own documentation; it was not executed for this page. Platform Scores are our assessment under a published method, not a safety guarantee.
Skill by Skill Almanac · Illustrative, not executed
review-reply-writer 40/100 · Provisional, not yet measuredScored · Method v0.2 · How we score
- What you see
- One calm public reply to a customer review, written after the review is classified and every fact the reply will state is checked.
- Why it exercises the concept
- Classifying a review by its tone is the sentiment step, and the skill uses it to decide what kind of reply to write, then checks facts so the reply does not invent any.
Skill by Skill Almanac · Illustrative, not executed
user-research-synthesis 56/100 · Provisional, not yet measuredScored · Method v0.2 · How we score
- What you see
- Many interview notes turned into themes where every claim cites verbatim quotes by participant id.
- Why it exercises the concept
- A contrast case: it groups feedback by theme with quotes you can check, which shows what a single positive or negative label leaves out.
Guide · Illustrative, not executed
Prompt Engineering for Agents vs Chat Models
- What you see
- A worked agent prompt that states scope, a completion check and a fallback, plus advice to use 3 to 5 examples inside example tags when you add examples.
- Why it exercises the concept
- Asking a model to label sentiment is a prompting task, and the guide shows how to set the scope and the check, and when to add examples.
Coding tool · Illustrative, not executed
Claude Code
- What to try
claude- What you see
- Claude Code's overview shows data piped into a one-line instruction, for example log output passed to claude -p with a request to flag anomalies.
- Why it exercises the concept
- The same piping pattern can pass a file of reviews to a model with an instruction to label each one, which is sentiment analysis done with a general model.
How it shows up when you use agents
You meet sentiment analysis whenever an agent has to sort feedback: reviews, survey comments, support tickets or social posts. Two routes are common. One is a dedicated classifier, a model trained for the label. The other is asking a general large language model in plain words, which is zero-shot learning when you give no examples. The field it belongs to is natural language processing.
What breaks when it is misunderstood: trusting the label on sarcasm or short messages, comparing scores from different tools as if they used one scale, and acting on a total without reading examples. A mixed review can be both positive and negative, and one label hides that.
Next action: read twenty labeled items yourself before you rely on the totals, and keep the original text next to each label. For a customer-facing reply, the review-reply-writer skill classifies the review and checks the facts before drafting. For themes with traceable quotes rather than a score, see user-research-synthesis.
Common confusions
- Sentiment analysis versus emotion detection. Sentiment analysis, as IBM describes it, judges whether text is positive, negative or neutral. Naming an emotion such as anger or joy is a finer task.
- Sentiment analysis versus topic classification. Sentiment asks how the writer feels. Topic classification asks what the text is about. A review can be on topic and negative at once.
- Sentiment analysis versus named entity recognition. Sentiment labels the attitude of the text. NER finds the people, places and organisations it names. Combined, they say who the writer is positive or negative about. See Named entity recognition.
- Myth. A model reads tone as a person does. IBM says software has a hard time with irony and sarcasm, so check a sample.
Related terms
Terms that mention Sentiment analysis
2 terms mention this one
More in AI concepts
Sources
- What is sentiment analysis?, IBM (accessed 2026-11-24)
- Logistic Regression and Text Classification (Speech and Language Processing, chapter 4), Stanford University (Jurafsky and Martin) (accessed 2026-11-24)
Definitions are written by Skill Almanac from these sources and were checked against them on 2026-11-25. Wikipedia is never the only source.
Review record
Last verified
Drafted by claude-sonnet-5-5; sources and example targets checked by Independent automated source review (OpenAI Codex); not human peer review on 2026-11-25. Last verified .
Change log (4)
- : Independent automated factual/example review completed. Cached US query estimate aligned to receipt; no traffic promise. Final technical gate recorded separately; publication disabled.
- : First version.
- : Verifier pass: dropped unsourced LLM labelling sentence.
- : Automated review completed; approved for the staged public release. Search indexing is controlled by the release configuration.