Inspiration

The rise in mental health concerns, especially among youth and online communities, inspired us to build MindScopeAI — a tool that can understand and analyze emotional patterns in social posts using semantic search and vector embeddings. We wanted to build something that not only leverages cutting-edge NLP but could actually support early detection of distress, anxiety, or depression.

What it does

MindScopeAI enables semantic search over a large dataset of mental health-related posts. Users can input queries expressing emotions or states of mind, and the system retrieves semantically relevant posts using vector similarity. This helps in uncovering patterns, common struggles, and potential early signs of mental health issues.

How we built it

  • Collected a public dataset of ~4.6k mental health-related Reddit posts.
  • Used all-MiniLM-L6-v2 from sentence-transformers to generate 384-dimensional vector embeddings.
  • Stored these embeddings in MongoDB Atlas with a Vector Search index.
  • Built a simple front-end in Streamlit to input queries and return relevant posts.
  • Deployed the project on Streamlit Cloud, using PyMongo for backend database interactions.

Challenges we ran into

  • Handling large-scale embedding generation efficiently without memory overflow.
  • Learning and correctly configuring MongoDB’s vector index with appropriate dimensions and parameters.
  • Ensuring fast and meaningful semantic search results in real-time.
  • Designing an ethical framework around analyzing mental health data.

Accomplishments that we're proud of

  • Successfully embedded and indexed over 86,000 posts for fast semantic querying.
  • Built a fully working prototype with a clean UI and deployed it live.
  • Learned and implemented MongoDB Vector Search — a fairly new and advanced feature.

What we learned

  • Advanced usage of semantic similarity and vector search in real-world AI applications.
  • Techniques for memory-efficient embedding generation and data processing.
  • Integrating NLP pipelines with cloud-hosted vector databases.
  • Importance of responsible AI practices when dealing with sensitive data.

What's next for MindScopeAI

  • Adding emotional trend analytics and distress signal alerting.
  • Building user-facing dashboards for therapists or researchers.
  • Expanding to multi-lingual support and other mental health datasets.
  • Improving model interpretability and explainability for trust and transparency.

Built With

Share this project:

Updates