Inspiration
More than ever, folks rely on the internet to understand symptoms and identify treatments. According to the NIH, over 1/3 of Americans self diagnose when they experience a health problem, and a staggering 70% of Americans consult the internet for medical information.
When we have googled symptoms, we often found ourselves in stressful situations where mundane symptoms like a sore throat led to severe diagnosis of an incurable plague. Pathos takes the stress away from online self-diagnosis by looping in high-quality data sources to ensure people are as informed as possible, and enabling users to engage through experience based stories.
What it does
Pathos lets users to type out a story to explain their symptoms in as much or little detail as they see fit. If it needs more information, Pathos is smart enough to ask clarifying questions that guide the user to share.
Pathos then leverages Gemini's text-embedding capabilities to match the user's story with stories that have been diagnosed by qualified medical professionals online. It unlocks the knowledge contained in these diagnoses, enabling users to have an experience comparable to speaking directly to a doctor, without any of the hassle of setting up an appointment and paying medical bills.
How we built it
Pathos' main diagnosis prediction engine leverages Gemini's text-embedding API and reddit's AskDocs subreddit, the later of which enforces strict guidelines on which users are allowed to give medical feedback. Pathos can also directly loop in Gemini language models through Gemini's API endpoints to ask clarifying questions and guide the user through giving relevant details to enhance their diagnosis.
Pathos' front end is built using Next.js, styled with Tailwind CSS. Our backend is build on flask and hooks into our Firebase Realtime Database where we maintain a dataset of stories and their relevant diagnoses.
Challenges we ran into
Turning raw reddit posts and replies into data that could power our app was challenging at first. Through precise prompt engineering and a bit of trial and error, we were able to make Gemini LLM's do the hard work for us, synthesizing responses from medical professionals and extracting their diagnoses.
Accomplishments that we're proud of
We are proud of just how quickly we were able to get this app out in a complete form, and are especially excited about the website's capability of comparing different story embeddings in a 3d space to provide transparency to users about how the technology works.
What we learned
We learned a lot about data scraping and parsing as it took a lot of time to get high-quality data that ensured meaningful results. Working with huge data sets, we ran into many challenges including rate-limits and edge cases. In addition, this was all of our first times building a chat bot interface, so we gained a lot of experience on the front-end as well as prompt engineering too.
What's next for Pathos
Given more time, we would love to continue finding new sources of high-quality medical diagnoses online to further enhance the predictions made by Pathos. Additionally, we would love to gather user feedback to better understand which parts of our app work well and which parts are confusing.
Built With
- flask
- gemini
- javascript
- nextjs
- tailwindcss
- text-embedding
Log in or sign up for Devpost to join the conversation.