Inspiration
As fans of Stanford Neuroscientist Dr. Andrew Huberman, my teammate and I often look to him for advice on lifestyle, mental health, and physical health. The only issue we encounter when consuming knowledge from his podcasts is that, with an average runtime of ~4 hours, his podcasts become too lengthy for busy students like us. We also realize that these extended episodes may be inaccessible to those who have difficulty focusing on the same topic for long periods. Not to discount his incredible advice, but we decided there must be a way to benefit from his knowledge without dedicating an excessive amount of time. In his podcasts, he also explores a lot of low level neuroscience and biology, so we wanted to remove any barriers of understanding for a larger audience.
What it does
Our project uses a digestible React front end to ask users for prompts. Essentially, users will enter a health-related question akin to "How can I stop smoking?" or "What can I do to make my morning routine more efficient and healthy?", and press send on our chatbox component. After they press send, the front end will communicate their question to a backend GPT model that is trained using Andrew Huberman's podcast transcripts. It will then generate a response based on hundreds of hours of podcast content, sifting through the most pertinent information, and provide the user with an answer displayed in the same chatbox.
How we built it
We built this project using React for the frontend, and Python for the backend. We then used Flask to combine the two. The frontend uses a mix of chakra-ui components, and traditional react/css components. The backend involved a multi-step process, including obtaining and processing transcripts from PDFs, initial attempts at fine-tuning a GPT model, and when that didn't work, refining the approach to chunking and embedding text to feed into GPT for answering questions efficiently. We overcame token limit issues by creating an additional script that removed all grammar words from the transcript, leaving only key words. This dramatically decreased processing time, and allowed our model to provide accurate answers, fill in the blanks, and ensure a timely response.
Challenges we ran into
We found ourselves reading a lot of documents and watching many tutorials, especially when building the backend and trying to train a GPT model with our hundreds of large PDF files. We initially wanted to train our own GPT model but realized how costly it was both financially and in terms of processing power. Once we figured out how to drastically shrink our transcript file sizes, we were still exceeding the token limit by 1,999,894. This led us to reevaluate our entire backend, and forced us to simplify our vision. Another issue we ran into was integrating the frontend and backend. Because we independently coded the frontend and backend of our projects, when we combined our work, we realized that there were inconsistencies in our code that may make combining the two difficult.
Accomplishments that we're proud of
This project was both of our first attempts at a fullstack application, and we really learned every single aspect of creating a fullstack web app. Despite being a team of just two, we feel that we accomplished a lot in terms of our project and are generally proud of our project. Although we hit many road bumps on our way to completion, we did not shy away from asking for help from mentors, re-evaluating our ideas and solutions, as well as making sure to support each other in our respective roles throughout the development.
What we learned
We learned a lot about React, as we only had limited experience with it prior to this hackathon. Importing components with Chakra UI was mind-blowing and taught us that it may be worth looking around for components before trying to code them from scratch. We also learned that it costs a lot of money to train your own GPT model with large datasets, and it is not sustainable to do so for limited budget side projects. This was also one of our first experiences collaborating on a GitHub repository that was a fullstack application, and we created different branches for frontend and backend. We were able to learn the Langchain framework, and it helped solidify our understanding of LLMs, and we also had brief exposure to Facebook Vector Databases. We also learned Flask and the different processes, including CORS.
What's next for Huberman AI
Next, we hope to host our project on the cloud to make it accessible to anyone who would like to use it. We also hope to further develop our backend and maybe find more cost-efficient ways to train our own GPT model based on Andrew Huberman's podcast transcripts. We would also like to explore other use cases for this technology (other influencers, longform media, social media), and ultimately make more abstract areas of education accessible to a wider audience.
Built With
- chakra-ui
- faiss
- flask
- github
- javascript
- langchain
- python
- react
Log in or sign up for Devpost to join the conversation.