Inspiration
While mental health is a critical aspect of overall well-being and something many people struggle with, it is often overlooked and stigmatized in modern society. It can be difficult to seek help or even acknowledge one’s difficulties, and accepting treatment is only the first challenge for many. Traditional methods are expensive and time-consuming; online therapy platforms do exist, but they are often uncomfortable and empty-feeling. These obstacles can be insurmountable for those already dealing with life’s many challenges. It is all too common for people to suffer in silence or avoid opening up to others.
To address this, we have created an online platform that offers complete anonymity, functioning both as a therapist and a library of personal anecdotes. Our goal is to help individuals realize that they are not alone, and provide healthy, helpful, and actionable advice. While ChatGPT or other modern AI models may be able to communicate plausibly, they don’t connect people to real experiences and may hallucinate. Our platform, Rivers, aims to reduce this gap by making therapy accessible through advances in natural language processing while also prioritizing a sense of sincerity and realness. We believe that this conceptualizes an affordable, human future of mental health treatment.
What it does
We alleviate the issue of accessibility and anonymity in therapy by creating a novel generative model that prioritizes enhancing genuine human emotion and experience.
Rivers provides two distinct services for users:
- The opportunity to engage with an on-demand cloud therapist that incorporates real human stories and encourages users to reflect on their current feelings and situation.
- A feedback loop where people who have experienced challenges can submit how they gained acceptance or were able to overcome their challenges.
Rivers allows users to share their own experiences through fully anonymous story submissions. Users can share moments when they struggled with their mental health or positive experiences that helped them overcome challenges. All submissions are uploaded to our Pinecone database and can be accessed by the AI to aid future conversations with other users.
Our platform aims to create a safe space where individuals can share their experiences without fear of judgment, knowing that their anonymity is protected. By providing access to relatable anecdotes and therapy support, we hope to help people feel less alone in their journey towards better mental health. We believe that our approach is not only scalable, due to the asymptotic behavior of the database we use, but also practical. We can bootstrap the initial set of stories by messaging non-profit organizations, and then share the app with online communities to get our first user base.
How we built it
Each submitted story is translated into a 4096-dimensional vector space using Cohere’s text embeddings API. This gives us a way to measure how similar any two stories are. We then insert these into a database which indexes the stories using Hierarchical Navigable Small Worlds (HNSW) for quick retrieval. Whenever a user submits a query, we select the most relevant stories from the database and serialize them into a prompt, which we pass to GPT-4. We design the prompt such that we can reliably reduce hallucination by requiring the model to provide quotations and references to their corresponding stories. Then, we format this in a React frontend, parsing the output and inlining quotes.
Our full stack implementation is as follows: Our frontend was built using React.js and features a simplistic user interface inviting users to share their past experiences. In conjunction to React, we used the web animation API Framer.js to create the river effect on our home page in addition to the other transitions on our web application. From there, our frontend interacts with our backend running on Google Cloud Functions, a serverless container. A serverless container runs specific pieces of code only when required - thus reducing cost of operation while maintaining functionality. The built frontend is stored on Vercel, a platform for static and single-page website hosting.
We have 2 Github repositories to organize our powerful backend and user interface.
- https://github.com/myfatemi04/rivers-cloud hosts all the functions and api calls such as the HNSW database and Google Cloud usage.
- https://github.com/myfatemi04/rivers contains only the react application to ensure that the backend functions do not interfere with the frontend.
Challenges we ran into
It was difficult to prevent hallucination of information by our model. We were able to navigate this problem by prompting the model to include quotes and references to their source texts in the response.
Accomplishments that we're proud of
We’re proud to have been able to create a full-stack web app like this in such a short amount of time. In particular, we’re glad to have reduced hallucination by our model, created several interesting and immersive animations on our website, and hosted our API on Google Cloud.
What we learned
Frontend animation skills and various API implementation
What's next for Rivers
We want to reach out to various groups where therapy is tremendously helpful, but uncomfortable without anonymity. Additionally, we would like to improve the animation on the “share” page by dropping the story into the flow of words after the user submits a story. This would help further emphasize that their decision to share a story feeds the river that will help other people.

Log in or sign up for Devpost to join the conversation.