An integrable, AI-powered complaint management system that automates customer ticket triage using local NLP and transcription models — translating, analyzing, and auto-resolving complaints in real time.
2026
Overview
SentriMail is a full-stack, role-based complaint management platform that uses local AI models to automatically analyze, classify, prioritize, and respond to customer complaints. It completely eliminates manual support bottlenecks while keeping operational costs to zero by running all intelligence models locally.
Interactive Analytics & Admin Dashboard
Real-time complaint tracking with automatic sentiment mapping, priority distribution graphs, average response time tracking, and automated responses.
The Problem
In traditional customer support workflows, companies face severe manual bottlenecks. Critical complaints are often buried under noise, priority assignment is entirely subjective, non-English complaints are ignored or delayed, and agents waste hours drafting repetitive answers for simple issues.
Core Problem Statement
Traditional customer support suffers from slow response times, subjective prioritization, and multilingual communication barriers that lead to administrative fatigue and customer dissatisfaction.
| Traditional Problem | Workflow Impact |
|---|---|
| Manual Triaging | Slow response times and human bottlenecks. |
| Subjective Prioritization | Critical issues (e.g. system downtime, fraud) get buried under low-priority noise. |
| Multilingual Barriers | Non-English complaints are delayed or ignored, alienating international users. |
| Admin Overload | Support teams waste hours manually responding to simple, easily automated queries. |
| Lack of Emotional Context | Distressed or angry customers do not receive immediate escalated care. |
Handling Multilingual Barriers
SentriMail's frontend supports direct language selection, automatically detecting and translating incoming texts and audio transcriptions from Arabic, Hindi, Tamil, French, Spanish, and more before running them through the English triaging pipeline.
Architecture
Every submitted complaint (text or voice) undergoes a fully automated, local pipeline from ingestion to resolution. The system translates text, transcribes audio, detects emotion, computes priority scores, and decides whether to auto-resolve or suggest a response to the admin.
Detects customer language via langdetect, auto-translates to English via Google Translate API, and transcribes voice complaints locally via OpenAI Whisper.
Performs sentiment analysis (DistilBERT) and multi-emotion classification (DistilRoBERTa). Scans for critical urgency keywords to compute a priority score (0-100).
Generates auto-replies locally via FLAN-T5 Small and auto-closes the ticket (e.g. gratitude, simple queries), notifying the customer by email.
Routes ticket to the Admin Dashboard. Displays full sentiment metrics, emotional intensities, and draft suggested replies for 1-click administrative resolution.
Sentiment Distribution Detail
Priority Levels Detail
Uses langdetect to identify the native tongue of the user. Audio files are processed locally using the OpenAI Whisper Base model (~140 MB), outputting English transcription via deep-translator wrappers.
Complaints are fed into DistilBERT SST-2 (~268 MB) to evaluate positivity/negativity. Simultaneously, a DistilRoBERTa model (~329 MB) classifies the text into Anger, Fear, Sadness, Joy, Disgust, Surprise, or Neutral, capturing critical emotional nuances.
Calculates a priority score (0–100) by combining sentiment confidence, emotional intensity (e.g. high weight on Anger/Fear), and keyword match triggers. Tickets are categorized as LOW, MEDIUM, HIGH, or CRITICAL.
Low-priority tickets receive an automated response generated locally via FLAN-T5 Small (~300 MB) and are auto-closed. Medium/High/Critical tickets are routed to the Admin Dashboard alongside an AI report and a pre-drafted suggested response.
Resilience
In production and resource-constrained environments, machine learning pipelines can fail due to out-of-memory errors or network timeouts. SentriMail is built with a self-healing multi-layer fallback architecture to ensure the service never crashes.
| System Component | Primary Action Path | Graceful Fallback Path |
|---|---|---|
| Sentiment & Emotion | HuggingFace Transformer models | Rule-based keyword/intensity matching |
| Response Generation | FLAN-T5 generative models | Pre-written professional template matching |
| Database Storage | MongoDB (Local or Atlas Cloud) | Local flat-file JSON storage (offline) |
| Email Delivery | SMTP Server Mailgun/SES | Silent failure with developer console logs |
| Voice Transcription | OpenAI Whisper transcription | Returns empty string (prompting text input fallback) |
Technology Stack
The tech stack was selected to maximize performance while keeping the deployment footprint minimal, fast, and entirely free of expensive third-party AI APIs.
| Model / Library | Task | Resource Footprint |
|---|---|---|
| DistilBERT SST-2 | Sentiment Analysis | ~268 MB |
| DistilRoBERTa Emotion | Emotion Classification | ~329 MB |
| FLAN-T5 Model | Response Text Generation | ~300 MB |
| OpenAI Whisper | Speech-to-Text Transcription | ~140 MB |
| LangDetect & Translator | Language Translation & Detection | Lightweight API wrapper |
| Technology | Specific Role |
|---|---|
| Python 3.10 + FastAPI | Asynchronous web and REST backend layers. |
| MongoDB & PyMongo | Document store for tickets, user profiles, and activity logs. |
| HTML5 / CSS3 / Jinja2 | Server-rendered frontends, custom charts, and responsive forms. |
| SHA-256 & Token Cookies | Secure cookie sessions using cryptographically safe local keys. |
| Render Cloud & Git | Procfile automation, version control, and web hosting. |
Interface
SentriMail features a clean, responsive dark-themed dashboard. Admins can view aggregated analytics, priority distribution, and sentiment charts in real time, while users can track tickets in their custom portal.
User Ticket Portal
The user portal lists the customer's submitted tickets, their current statuses (Resolved, Pending Admin, or Auto Replied), and lets them view administrative or auto-replied drafts.
Complaint Submission Desk
Users can easily submit complaints by typing their issue or recording a voice message using the built-in mic recorder, specifying their native language.
Login Page
Secure portal page listing credentials for quick evaluation using different roles (Admin, Alice, Bob).
Takeaways
Key Takeaways & Learnings
GitHub Project Repository: github.com/Navin-665/SentriMail-MPW1
More Projects