# Discourse AI - Sentiment

**URL:** https://meta.discourse.org/t/discourse-ai-sentiment/259599
**Category:** Site Management
**Tags:** how-to, ai, ai-sentiment, content
**Created:** [April 24, 2023, 7:40pm UTC](https://meta.discourse.org/t/discourse-ai-sentiment/259599 "2023-04-24T19:40:01Z")
**Posts on this page:** 1
**Showing post:** 1

<div class="post-metadata">

### Author: ![Discourse](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/discourse/32/148734_2.png) [@Discourse](https://meta.discourse.org/u/Discourse)
#### Post date: [April 24, 2023, 7:40pm UTC](https://meta.discourse.org/t/discourse-ai-sentiment/259599/1 "2023-04-24T19:40:01Z")

</div>

> 🔖 This topic covers the configuration of the Sentiment feature of the [Discourse AI](https://meta.discourse.org/t/discourse-ai/259214?slient=true) plugin.
> 
> 🙋 Required user level: Moderator

Sentiment keeps tabs on your community by analyzing posts and providing sentiment and emotional scores to give you an overall sense of your community for any period of time. These insights can be helpful in determining the type of users posting within your community and interacting with one another.

## Features

- Overall sentiment: compares the number of posts classified as either positive or negative
- Bar graph showcasing toggleable numerical value for positive, negative, and overall scores
- Emotion: number of topics and posts classified by multiple emotions, grouped by time frame
  - Today
  - Yesterday
  - Last 7 days
  - Last 30 days

- Reports for any period of time that can be accessed via settings
  - Yearly
  - Quarterly
  - Monthly
  - Weekly
  - Custom range

- Accessible to all staff users (admins and moderators)

## Enabling Sentiment

### Configuration

> Sentiment is enabled by default for hosted customers. For manual steps see below

1. Go to `Admin` settings-\> `Plugins` → search or find `discourse-ai` and make sure its enabled
2. Enable `ai_sentiment_enabled` for Sentiment Analysis
3. Head over to `/admin/dashboard/sentiment` to see their respective reports

> ℹ Once enabled, Sentiment will automatically classify all new posts and backfill posts from the last 60 days via a scheduled job that runs every 5 minutes. To backfill posts older than 60 days, increase the `ai_sentiment_backfill_post_max_age_days` site setting.
> 
> :discourse2: **Hosted by us?**
> 
> Contact us at [team@discourse.org](mailto:team@discourse.org) if you need help adjusting backfill settings.
> 
> 🧑‍🔧 **Self-hosted?**
> 
> Increase `ai_sentiment_backfill_post_max_age_days` in your site settings to cover the desired time range. The scheduled backfill job will automatically process the older posts. For details on setting up the required model endpoints, see [Self-Hosting Sentiment and Emotion for DiscourseAI](https://meta.discourse.org/t/self-hosting-sentiment-and-emotion-for-discourseai/334451).

## Technical FAQ

**How is topic/post data processed? How are scores assigned?**

- Sentiment has a “per post” fidelity. For each post we are able to tell sentiment and then cut that data in many shapes (per tag / category / time etc… ). It compares the number of posts classified as either positive or negative. These are calculated when positive or negative scores exceed a fixed threshold of 0.6 (not currently configurable).

**Are there any plans to add support for other languages?**

- In the future Yes! both by adding multilingual simple Machine Learning (ML) models and by using multilingual Large Language Models (LLMs) to classify the data, instead of dedicated models.

**What models are used to power Sentiment?**

- Currently we are using [SamLowe/roberta-base-go\_emotions · Hugging Face](https://huggingface.co/SamLowe/roberta-base-go_emotions) and [cardiffnlp/twitter-roberta-base-sentiment-latest · Hugging Face](https://huggingface.co/cardiffnlp/twitter-roberta-base-sentiment-latest).

## Caveats

- Posts classified as neutral (neither positive or negative) are not shown
- Private messages (PMs) are excluded from calculations

> Last edited by @keegan 2025-10-23T22:28:36Z
> 
> Last checked by @hugh 2024-08-06T05:27:46Z
> 
> > **Check document**
> >
> > Perform check on document:

---

_[View the full topic](https://meta.discourse.org/t/discourse-ai-sentiment/259599)._
