Inspiration

The inspiration for MamaMind stemmed from the recognition of the profound impact perinatal depression can have on new and expecting mothers. Understanding that many mothers face challenges in seeking timely and effective support, we aimed to create a digital solution that offers immediate, accessible, and empathetic mental health assistance. Our goal was to bridge the gap in mental health services and provide a supportive tool that mothers can rely on during one of the most critical times in their lives.

What it does

MamaMind is an intelligent mental health chatbot designed to provide support and assistance to individuals experiencing perinatal depression. The application offers a range of functionalities tailored to help users understand, manage, and alleviate their mental health challenges through a friendly and supportive interface. Here's a breakdown of its key features and capabilities:

  1. ๐–๐ž๐ฅ๐œ๐จ๐ฆ๐ž ๐š๐ง๐ ๐ˆ๐ง๐ข๐ญ๐ข๐š๐ฅ ๐ˆ๐ง๐ญ๐ž๐ซ๐š๐œ๐ญ๐ข๐จ๐ง Upon launching the application, users are greeted with a warm welcome message that sets a comforting tone for their interaction. The chatbot introduces itself and offers users the option to engage in a mental health assessment through the Edinburgh Postnatal Depression Scale (EPDS) questionnaire.

  2. ๐„๐๐ƒ๐’ ๐๐ฎ๐ž๐ฌ๐ญ๐ข๐จ๐ง๐ง๐š๐ข๐ซ๐ž If users choose to proceed with the EPDS questionnaire, MamaMind guides them through a series of questions designed to evaluate their depression severity. The responses are collected, scored, and analyzed to provide an accurate assessment of the user's mental health status.

  3. ๐’๐ž๐ฏ๐ž๐ซ๐ข๐ญ๐ฒ-๐๐š๐ฌ๐ž๐ ๐†๐ฎ๐ข๐๐š๐ง๐œ๐ž Based on the results of the EPDS questionnaire, MamaMind categorizes the severity of the user's depression and offers tailored guidance and resources. This personalized approach ensures that users receive appropriate advice and support based on their specific needs.

  4. ๐ˆ๐ง๐ญ๐ž๐ซ๐š๐œ๐ญ๐ข๐ฏ๐ž ๐‚๐ก๐š๐ญ ๐’๐ฎ๐ฉ๐ฉ๐จ๐ซ๐ญ Users can engage in an open-ended conversation with MamaMind by typing their concerns and questions into the chat input. The chatbot leverages advanced natural language processing techniques to understand the user's input and provide relevant responses. It uses knowledge of cognitive behavioral therapy, meditation techniques, mindfulness practices, and other therapeutic methods to guide users through their feelings and improve their well-being.

  5. ๐‚๐จ๐ง๐ญ๐ž๐ฑ๐ญ๐ฎ๐š๐ฅ ๐‘๐ž๐ฌ๐ฉ๐จ๐ง๐ฌ๐ž๐ฌ MamaMind employs a Retrieval-Augmented Generation (RAG) with query decomposition method to retrieve relevant information from a pre-built knowledge base of 84 PubMed articles, guideline documents recommended by OECD member countries related to perinatal depression and reliable resources such as WHO and NIMH totaling 104 documents. This ensures that the responses are contextually accurate and informative. The chatbot uses the retrieved context, along with the user's input and severity level, to generate comprehensive and helpful responses.

  6. ๐…๐ซ๐ข๐ž๐ง๐๐ฅ๐ฒ ๐‚๐ฅ๐จ๐ฌ๐ฎ๐ซ๐ž When users decide to end the conversation, MamaMind ensures a friendly and supportive closure. It responds positively to expressions of gratitude and offers a parting message that encourages users to return whenever they need further assistance.

  7. ๐‚๐จ๐ง๐ญ๐ข๐ง๐ฎ๐จ๐ฎ๐ฌ ๐ˆ๐ง๐ญ๐ž๐ซ๐š๐œ๐ญ๐ข๐จ๐ง MamaMind is designed to facilitate continuous interaction. It asks relevant follow-up questions to maintain the conversation flow and provide ongoing support. The chatbot remains available to answer any new questions or concerns users might have

๐Š๐ž๐ฒ ๐๐ž๐ง๐ž๐Ÿ๐ข๐ญ๐ฌ

-:๐๐ž๐ซ๐ฌ๐จ๐ง๐š๐ฅ๐ข๐ณ๐ž๐ ๐’๐ฎ๐ฉ๐ฉ๐จ๐ซ๐ญ: Tailored advice and resources based on the user's depression severity.

-๐„๐ฑ๐ฉ๐ž๐ซ๐ญ ๐†๐ฎ๐ข๐๐š๐ง๐œ๐ž:Incorporates the knowledge base from the Pubmed research articles on perinatal depression and the guideline documents recommended by member countries of OECD.

-๐”๐ฌ๐ž๐ซ-๐…๐ซ๐ข๐ž๐ง๐๐ฅ๐ฒ ๐ˆ๐ง๐ญ๐ž๐ซ๐Ÿ๐š๐œ๐ž: Easy-to-use chat interface. -Contextual Accuracy: Utilizes RAG using query decomposition to enhance the responses from the LLM and also ensuring accurate and reliable responses.

-๐Ž๐ง๐ ๐จ๐ข๐ง๐  ๐€๐ฏ๐š๐ข๐ฅ๐š๐›๐ข๐ฅ๐ข๐ญ๐ฒ:Always available for continuous support and interaction. MamaMind aims to create a safe and supportive environment for individuals experiencing perinatal depression, offering them the tools and resources needed to navigate their mental health journey.

How we built it

The project was built using a combination of advanced AI technologies and user-friendly web development tools:

1.๐’๐ญ๐ซ๐ž๐š๐ฆ๐ฅ๐ข๐ญ: For creating an interactive web application interface that is easy to navigate.

2.๐‡๐ฎ๐ ๐ ๐ข๐ง๐  ๐…๐š๐œ๐ž ๐ฌ๐ž๐ง๐ญ๐ž๐ง๐œ๐ž ๐ญ๐ซ๐š๐ง๐ฌ๐Ÿ๐จ๐ซ๐ฆ๐ž๐ซ๐ฌ: To leverage pre-trained embedding models for creating embeddings for the PDF documents. ๐‹๐š๐ง๐ ๐œ๐ก๐š๐ข๐ง: To build a chatbot application to connect with Groq cloud API for accessing the LLMs.

3.๐…๐€๐ˆ๐’๐’ (๐…๐š๐œ๐ž๐›๐จ๐จ๐ค ๐€๐ˆ ๐’๐ข๐ฆ๐ข๐ฅ๐š๐ซ๐ข๐ญ๐ฒ ๐’๐ž๐š๐ซ๐œ๐ก): To create an efficient retrieval-augmented generation (RAG) system for accessing relevant information quickly.

4.๐๐ฒ๐ญ๐ก๐จ๐ง:As the primary programming language for integrating different components and building the backend logic.

5.๐‚๐’๐’: To enhance the visual appeal and user experience of the application.

6.๐Œ๐š๐ซ๐ค๐๐จ๐ฐ๐ง: For documenting and presenting the project details in a structured format.

๐’๐ญ๐ž๐ฉ๐ฌ ๐ญ๐จ ๐๐ฎ๐ข๐ฅ๐ ๐ญ๐ก๐ž ๐๐ซ๐จ๐ฃ๐ž๐œ๐ญ:

1.๐ƒ๐ž๐ฌ๐ข๐ ๐ง: Understanding the needs of the target users and designing a solution that addresses those needs effectively.

2.๐ƒ๐š๐ญ๐š ๐‚๐จ๐ฅ๐ฅ๐ž๐œ๐ญ๐ข๐จ๐ง: Gathering and preparing relevant data for Advanced RAG retrieval techniques.

3.๐Œ๐จ๐๐ž๐ฅ ๐ˆ๐ง๐ญ๐ž๐ ๐ซ๐š๐ญ๐ข๐จ๐ง:Integrating the RAG with the chatbot application using LLMs.

4.๐ˆ๐ง๐ญ๐ž๐ซ๐Ÿ๐š๐œ๐ž ๐ƒ๐ž๐ฏ๐ž๐ฅ๐จ๐ฉ๐ฆ๐ž๐ง๐ญ: Building the user interface using Streamlit and enhancing it with custom CSS.

5.๐“๐ž๐ฌ๐ญ๐ข๐ง๐  ๐š๐ง๐ ๐‘๐ž๐Ÿ๐ข๐ง๐ž๐ฆ๐ž๐ง๐ญ: Iteratively testing the application and refining it based on feedback within the team.

Challenges we ran into

1.๐Œ๐จ๐๐ž๐ฅ ๐๐ž๐ซ๐Ÿ๐จ๐ซ๐ฆ๐š๐ง๐œ๐ž:Prompt engineering and the refinement using RAG along with query decomposition method for the language model to provide accurate and empathetic responses specific to perinatal depression.

2.๐”๐ฌ๐ž๐ซ ๐„๐ฑ๐ฉ๐ž๐ซ๐ข๐ž๐ง๐œ๐ž: Designing an intuitive and supportive interface that encourages user engagement without causing additional stress or anxiety.

3.๐ˆ๐ง๐ญ๐ž๐ ๐ซ๐š๐ญ๐ข๐จ๐ง:Seamlessly integrating various technologies (Streamlit, FAISS, Langchain) to create a cohesive and efficient system.

4.๐’๐œ๐š๐ฅ๐š๐›๐ข๐ฅ๐ข๐ญ๐ฒ:Ensuring that the application can handle multiple users and large volumes of data without compromising performance.

Despite these challenges, the development of MamaMind was a rewarding experience that underscored the potential of technology in making a positive impact on mental health.

Accomplishments that we're proud of

๐”๐ฌ๐ž๐ซ-๐‚๐ž๐ง๐ญ๐ซ๐ข๐œ ๐ƒ๐ž๐ฌ๐ข๐ ๐ง: We successfully created an intuitive and user-friendly interface that ensures a seamless experience for individuals seeking mental health support. The design is tailored to be comforting and easy to navigate, making it accessible for users of all ages and backgrounds.

๐„๐๐ƒ๐’ ๐๐ฎ๐ž๐ฌ๐ญ๐ข๐จ๐ง๐ง๐š๐ข๐ซ๐ž ๐ˆ๐ง๐ญ๐ž๐ ๐ซ๐š๐ญ๐ข๐จ๐ง: Integrating the Edinburgh Postnatal Depression Scale (EPDS) into the chatbot was a significant achievement. This feature allows users to self-assess their mental health and receive personalized guidance based on their responses, providing a valuable tool for early detection and intervention.

๐€๐๐ฏ๐š๐ง๐œ๐ž๐ ๐€๐ˆ ๐ˆ๐ฆ๐ฉ๐ฅ๐ž๐ฆ๐ž๐ง๐ญ๐š๐ญ๐ข๐จ๐ง: By leveraging advanced natural language processing and machine learning models, we were able to create a chatbot that understands and responds to user inputs with high accuracy and empathy. The use of Retrieval-Augmented Generation (RAG) ensures that the information provided is both relevant and helpful.

๐“๐š๐ข๐ฅ๐จ๐ซ๐ž๐ ๐Œ๐ž๐ง๐ญ๐š๐ฅ ๐‡๐ž๐š๐ฅ๐ญ๐ก ๐’๐ฎ๐ฉ๐ฉ๐จ๐ซ๐ญ:The chatbot's ability to offer personalized advice based on the severity of the user's depression is a major accomplishment. This ensures that each user receives the appropriate level of support and resources, enhancing the effectiveness of the intervention.

๐‚๐จ๐ง๐ญ๐ข๐ง๐ฎ๐จ๐ฎ๐ฌ ๐ˆ๐ง๐ญ๐ž๐ซ๐š๐œ๐ญ๐ข๐จ๐ง ๐š๐ง๐ ๐’๐ฎ๐ฉ๐ฉ๐จ๐ซ๐ญ: We designed MamaMind to facilitate continuous engagement, asking relevant follow-up questions to maintain a supportive conversation flow. This ongoing interaction helps users feel heard and supported throughout their mental health journey.

What we learned

Through the development of MamaMind, we gained valuable insights into the complexities of mental health, particularly perinatal depression. We learned about the various therapeutic approaches that can be used to support mental well-being, including cognitive behavioral therapy, mindfulness practices, and meditation techniques. Additionally, we deepened my understanding of Large Language models, Retrieval Augmented Generation(RAG) using query decomposition method and the integration of AI models to deliver personalized and contextually relevant advice. This project also highlighted the importance of user-centered design in creating a tool that is both effective and easy to use.

What's next for MamaMind

๐„๐ง๐ก๐š๐ง๐œ๐ž๐ ๐๐ž๐ซ๐ฌ๐จ๐ง๐š๐ฅ๐ข๐ณ๐š๐ญ๐ข๐จ๐ง: We plan to further enhance the personalization of MamaMind by incorporating more detailed user profiles and preferences. This will allow the chatbot to provide even more tailored support and resources based on individual needs.

๐„๐ฑ๐ฉ๐š๐ง๐๐ž๐ ๐‘๐ž๐ฌ๐จ๐ฎ๐ซ๐œ๐ž ๐‹๐ข๐›๐ซ๐š๐ซ๐ฒ: We aim to expand the knowledge base and resource library, including more comprehensive information on various mental health topics, self-help techniques, and support services. This will ensure that users have access to a wider range of information and tools.

๐Œ๐ฎ๐ฅ๐ญ๐ข๐ฅ๐ข๐ง๐ ๐ฎ๐š๐ฅ ๐’๐ฎ๐ฉ๐ฉ๐จ๐ซ๐ญ:To make MamaMind accessible to a broader audience, we plan to introduce multilingual support. This will enable users from different linguistic backgrounds to receive mental health support in their preferred language.

๐ˆ๐ง๐ญ๐ž๐ ๐ซ๐š๐ญ๐ข๐จ๐ง ๐ฐ๐ข๐ญ๐ก ๐๐ซ๐จ๐Ÿ๐ž๐ฌ๐ฌ๐ข๐จ๐ง๐š๐ฅ ๐’๐ฎ๐ฉ๐ฉ๐จ๐ซ๐ญ: We are exploring the possibility of integrating MamaMind with professional mental health services. This could include features such as connecting users with licensed therapists or providing direct referrals to mental health professionals for further assistance.

๐Œ๐จ๐›๐ข๐ฅ๐ž ๐€๐ฉ๐ฉ ๐ƒ๐ž๐ฏ๐ž๐ฅ๐จ๐ฉ๐ฆ๐ž๐ง๐ญ: In addition to the web-based application, we aim to develop a mobile app version of MamaMind. This will provide users with the convenience of accessing mental health support on-the-go, enhancing the accessibility and reach of the application.

๐”๐ฌ๐ž๐ซ ๐‚๐จ๐ฆ๐ฆ๐ฎ๐ง๐ข๐ญ๐ฒ ๐š๐ง๐ ๐’๐ฎ๐ฉ๐ฉ๐จ๐ซ๐ญ ๐†๐ซ๐จ๐ฎ๐ฉ๐ฌ: We plan to create a user community and support groups within the application. This will allow users to connect with others who are experiencing similar challenges, fostering a sense of community and mutual support.

๐ƒ๐š๐ญ๐š ๐๐ซ๐ข๐ฏ๐š๐œ๐ฒ ๐š๐ง๐ ๐’๐ž๐œ๐ฎ๐ซ๐ข๐ญ๐ฒ ๐„๐ง๐ก๐š๐ง๐œ๐ž๐ฆ๐ž๐ง๐ญ๐ฌ: Ensuring the privacy and security of user data is a top priority. We will continue to enhance our data protection measures to safeguard user information and maintain trust.

๐…๐ž๐ž๐๐›๐š๐œ๐ค-๐ƒ๐ซ๐ข๐ฏ๐ž๐ง ๐ˆ๐ฆ๐ฉ๐ซ๐จ๐ฏ๐ž๐ฆ๐ž๐ง๐ญ๐ฌ: We will continue to gather and act on user feedback to make ongoing improvements to MamaMind. This iterative approach will help us refine the application and ensure it continues to meet the evolving needs of its users.

MamaMind is committed to providing effective, empathetic, and accessible mental health support for individuals experiencing perinatal depression. We are excited about the future and the potential to make a meaningful impact on the well-being of our users.

Thank you for reading about MamaMind. I hope this project can inspire others to leverage technology in addressing critical mental health issues and providing support to those in need.

Built With

Share this project:

Updates