Skip to main content

Sentiment Analysis

Vartovii uses AI-powered sentiment analysis to categorize employee reviews as positive, negative, or neutral.

🧠 Technology

ComponentDetails
AI ModelGemini sentiment service with fallback routing
LanguagesGerman, English, Ukrainian
Batch Size10 reviews per API call

📊 Sentiment Categories

POSITIVE 👍

Reviews that recommend the company:

  • Good work-life balance
  • Fair compensation
  • Supportive management
  • Growth opportunities

NEGATIVE 👎

Reviews with significant concerns:

  • Poor management
  • Low salaries
  • Toxic culture
  • No career growth

NEUTRAL ➖

Factual or mixed reviews:

  • Objective descriptions
  • Pros and cons balanced
  • No strong recommendation

🔧 How It Works

Reviews (batch of 10) → Gemini 3 Flash preview → Sentiment Labels → Database

Processing Pipeline

  1. Fetch unprocessed reviews from database
  2. Batch into groups of 10 (optimizes API costs)
  3. Send to Gemini with a schema-backed JSON contract
  4. Validate structured response before review-ID mapping
  5. Update database with sentiment labels

The analyzer uses the shared backend review repository for pending-review loading and batch sentiment persistence, so background and manual runs stay aligned with the same pooled DB layer.

The legacy compatibility utility used by older corporate follow-up flows now uses the same shared review repository seam, so manual and background sentiment paths stay aligned on one persistence contract.

Legacy helper paths also follow the same packaged runtime contract as the main analyzers, reducing drift between manual and background execution paths.

AI Prompt Structure

Analyze sentiment of these employee reviews.
Return JSON: {"results": [{"index": 0, "sentiment": "POSITIVE|NEGATIVE|NEUTRAL", "score": 0.0-1.0}]}

Reviews:
1. [Review text...]
2. [Review text...]
...

Prompt rule (Updated 2026-03-03):

  • Reviews may be in German, English, or mixed-language text.
  • Classification must be sentiment-accurate regardless of input language.
  • Structured JSON is validated before labels are applied to stored reviews.

📈 Usage in Trust Score

Sentiment analysis contributes 25% to the Trust Score:

positive_count = reviews.filter(sentiment='POSITIVE').count()
total_count = reviews.count()

sentiment_score = (positive_count / total_count) * 100

# Weight: 25%
weighted_sentiment = sentiment_score * 0.25

🌍 Multi-Language Support

The AI model handles reviews in:

LanguageNotes
🇩🇪 GermanPrimary (Kununu)
🇬🇧 EnglishSupported
🇺🇦 UkrainianSupported

💰 Cost Profile

Runtime cost depends on the active model profile, review volume, and batching strategy. Vartovii uses batch processing to keep sentiment analysis operationally efficient without exposing review text handling as a manual workflow.

🔄 Automatic Processing

Sentiment analysis runs automatically:

  1. After scraping - New reviews analyzed immediately
  2. Background job - Processes backlog hourly
  3. On-demand - Manual trigger via API

For internal ad-hoc review runs, the company-targeted CLI utility now reuses the same shared review repository seam as the main analyzers, so manual and background execution stay aligned with the pooled backend DB layer.

📊 Dashboard Visualization

The Sentiment tab in the dashboard shows:

  • Pie chart - Positive/Negative/Neutral distribution
  • Trend line - Sentiment over time
  • Word cloud - Common themes per sentiment

🔌 API Access

Get sentiment summary via API:

curl "https://sentryanalytic.com/api/company/bmw/sentiment"

Response:

{
"company_name": "BMW",
"sentiment": {
"positive": 50,
"negative": 40,
"neutral": 10
},
"total_reviews": 5621,
"last_analyzed": "2025-12-27T12:00:00Z"
}

Sentiment analysis is powered by Vertex AI and runs on Google Cloud infrastructure.