Inspiration
Mental health often remains hidden beneath the surface—hard to express, harder to diagnose, and even harder to relate to. We wanted to build a tool that not only listens, but shows people they are not alone. Inspired by the intersection of real-world mental health datasets, powerful AI models like Gemini, and the vector search capabilities of MongoDB, we created MindSage: a data-driven emotional insight engine for mental wellness.
What it does
MindSage takes in a user's emotional query—such as "I'm feeling depressed and isolated at work"—and searches a real-world mental health dataset using vector embeddings and semantic similarity to find the most relevant user profiles.
Then, using Google Gemini, MindSage analyzes these similar cases and offers empathetic, actionable insights and coping suggestions grounded in collective experience.
For example, a user expressing burnout may be shown that others reporting similar stress patterns struggled with social withdrawal and uncertainty about care options, and may receive AI-generated advice on reaching out, building structure, or exploring support.
MindSage isn’t just a chatbot—it’s a reflective mirror of shared human experience, backed by intelligent search.
How we built it
🧠 Chosen Dataset: Mental Health in Tech Survey (cleaned & preprocessed)
🧾 Embedded each record using Google’s Gemini text-embedding-004 model
🧰 Stored records and embeddings in MongoDB Atlas with vector index
🔍 Implemented semantic search using $vectorSearch for similarity matching
🤖 Integrated Gemini’s LLM to generate natural language insight based on retrieved records and user queries
⚙️ Built logic and interaction in Jupyter notebooks for experimentation
🛠️ Backend-ready architecture for Node.js-based API (future deployable)
Challenges we ran into
Inconsistent embedding sizes between query and DB entries
Understanding the nuances of Gemini’s embedding and model API structure
Managing and trimming 3072-dimension embeddings to align with MongoDB's limit
Latency tuning and batching data uploads for thousands of records
Prompt design for Gemini to return thoughtful, emotionally resonant insights
Accomplishments that we're proud of
End-to-end semantic search and AI generation pipeline working seamlessly
Designed a meaningful use-case beyond generic AI demos—touching a sensitive, real human challenge
Clean data preparation and embedding strategy for a complex dataset
Highly relevant matches being returned for nuanced emotional queries
Realization that AI can help build empathy, not just automation
What we learned
How vector search works in MongoDB Atlas and how to fine-tune embeddings
That task_type and prompt engineering significantly affect embedding quality
Using LLMs not just for answering but to synthesize multiple records into reflective insights
How real data can help people feel less alone when handled with care
What's next for Mind Sage
🧩 Launch a full Node.js API to expose search and insight capabilities
📈 Add dashboards and visualizations using React and MongoDB Charts to show trends and sentiment patterns
📂 Enable user-uploaded datasets for organization-specific insights (e.g., employee wellness)
🗣️ Add voice input + transcription via Whisper for more natural queries
🔒 Add privacy, anonymization, and data security layers
🌐 Deploy a lightweight frontend interface for general users
🧭 Expand dataset diversity beyond tech—students, parents, caregivers, etc.
Built With
- express.js
- mongodb
- node.js
- react
- tailwind
- vectorsearch
Log in or sign up for Devpost to join the conversation.