Mental Health App
- #Smart Assistant
An AI emotional support app prototype for a US digital health startup. It detects how a person feels, replies in two languages and keeps every message inside a private AWS environment, with crisis escalation to clinicians.
- Natural Language Processing
Impact
The client is a US digital health startup selling to clinics and mental health organizations, so its product had to pass their security review. Its first proof of concept ran on a hosted model with one tone and one language, and testers dropped off after about two sessions.
We built a prototype that reads each message's emotional state, answers in either of two languages and routes risk to a human. Qwen 2.5 32B and the classifiers are self-hosted in a private AWS VPC; users get a mobile app, admins a web console.
Services we provided
Discovery and HIPAA Compliance Mapping
Self-Hosted LLM Deployment on AWS
Emotion Detection Model Training
Mobile App Development
Admin Console Development
Safety and Red-Team Testing
Tech Stack
Python
PostgreSQL
AWS
Challenges and Solutions
🧐 Challenges
- HIPAA-aligned privacy ruled out hosted LLM APIs, shared logging tools and any analytics that could read message text.
- Replies had to adapt to how the user feels; the first prototype answered every message in the same tone.
- Conversations had to work natively in two languages, including users who switch mid-sentence.
💡 Solutions
- Qwen 2.5 32B runs on GPU nodes in a private VPC, with no public endpoint and no third-party API calls.
- A fine-tuned classifier tags each message with one of 7 emotional states and an intensity score in about 120 ms.
- A bilingual engine detects the language per message, with tone rules, coping scripts and safety phrases written natively for both.
- Encryption at rest and in transit, least-privilege access, MFA for every admin and an exportable audit log.
- A 10-second daily check-in feeds weekly mood and sleep charts that users can share with their therapist.
- A separate risk model screens every message and, on crisis language, shows crisis resources and alerts an on-call clinician.
Business value
- 93% emotion-detection accuracy on validation data.
- ~1.8 sec median time to a mood-aware reply.
- 0 user messages sent to third-party APIs.
- ~4 sessions per active user per week during the 6-week beta.
- 100% of high-risk test prompts routed to crisis resources.
User flow