Patient Support Using A Large Language Model-Based Chatbot​​​​‌‍​‍​‍‌‍‌​‍‌‍‍‌‌‍‌‌‍‍‌‌‍‍​‍​‍​‍‍​‍​‍‌‍‌​‌‍​‌‌‌​‌‍‌‍​‌‍‌‌​​‍‍‌‍​‌‍‌‍‌​‍​‍​‍​​‍​‍‌‍‍​‌​‍‌‍‌‌‌‍‌‍​‍​‍​‍‍​‍​‍‌‍‍​‌‌​‌‌​‌​​‌​​‍‍​‍​‍‌‍​‍‌‍​‌‌​‌‍‍‌‌​​‍‍‌‍​‌‌‍‌​‌‍‌‌‍‍‌‌‍‍​‍‍‌‍‌​‌‍​‌‌‌​‌‍‌‍​‌‍‌‌​​‍‍‌‍​‌‍‌‍‌​‍‌‍‌‌‌‍‌​‌‍‍‌‌‌​‌‍‌​‍​‍‌‍‍‌‌‌​‌‍‌‌‌‍‌‌‌‌‌​‌‍‌‌​​‌‍‌‌‌​​‍‌‌‍​​‍‌‌​‌‌‌‌‌‌‌‌​‌‌‌​​‌​‍‌‌​‌‌​‌​‍‌​‌​‌‌‍‍‌​‌​​‌‌‌‌‌​‌‌‍‍‍‌‍‌‌‌‌‌‌‌​‌‌​‌​‍‌‍‍‌‌‌​‌‍‌‌‌‍‌‌​​‍‌​‍‌​‍‌​​​‌‍‍​‌‌​‍​‌​‌‌​‌​​​‍‌‌‍‌​​​‍​‌‌​​‌‍‍‌​‍‌‍‌‌‌‌‌​‌‌‍‌‌‌​‍‌‍‌‌‌‍‌​‌‍‍‌‌‌​​‍​‌‍‌‍‌‍‍‌‌‍‌‌‌‍​‌‍‌​‌‌​​‌‍​‌‌‌​‌‍‍​​‌‌‌​‌‍‍‌‌‌​‌‍​‌‍‌‌​‍​‍‌‌

Aadya G.​​​​‌‍​‍​‍‌‍‌​‍‌‍‍‌‌‍‌‌‍‍‌‌‍‍​‍​‍​‍‍​‍​‍‌‍‌​‌‍​‌‌‌​‌‍‌‍​‌‍‌‌​​‍‍‌‍​‌‍‌‍‌​‍​‍​‍​​‍​‍‌‍‍​‌​‍‌‍‌‌‌‍‌‍​‍​‍​‍‍​‍​‍‌‍‍​‌‌​‌‌​‌​​‌​​‍‍​‍​‍‌‍​‍‌‍​‌‌​‌‍‍‌‌​​‍‍‌‍​‌‌‍‌​‌‍‌‌‍‍‌‌‍‍​‍‍‌‍‌​‌‍​‌‌‌​‌‍‌‍​‌‍‌‌​​‍‍‌‍​‌‍‌‍‌​‍‌‍‌‌‌‍‌​‌‍‍‌‌‌​‌‍‌​‍​‍‌‍‍‌‌‌​‌‍‌‌‌‍‌‌‌‌‌​‌‍‌‌​​‌‍‌‌‌​​‍‌‌‍​​‍‌‌​‌‌‌‌‌‌‌‌​‌‌‌​​‌​‍‌‌​‌‌​‌​‍‌​‌​‌‌‍‍‌​‌​​‌‌‌‌‌​‌‌‍‍‍‌‍‌‌‌‌‌‌‌​‌‌​‌​‍‌‍‍‌‌‌​‌‍‌‌‌‍‌‌​​‍‌​‍‌​‍‌​​​‌‍‍​‌‌​‍​‌​‌‌​‌​​​‍‌‌‍‌​​​‍​‌‌​​‌‍‍‌​‍‌‍‌‌‌‌‌​‌‌‍‌‌‌​‍‌‍‌‌‌‍‌​‌‍‍‌‌‌​​‍​‌‍‌‍‌‍‍‌‌‍‌‌‌‍​‌‍‌​‌‌​​‌‍​‌‌‌​‌‍‍​​‌‌​‌‌​‌‌‌‌‍‌​‌‍‌‌‌‍‍‌‌​‌‌‌‍‍‌‍​‌‌‍‌‌‍‌‌​‍​‍‌‌

 | 
BASIS Independent Silicon Valley ‘24

Advisor: Swetha Bhattacharya​​​​‌‍​‍​‍‌‍‌​‍‌‍‍‌‌‍‌‌‍‍‌‌‍‍​‍​‍​‍‍​‍​‍‌‍‌​‌‍​‌‌‌​‌‍‌‍​‌‍‌‌​​‍‍‌‍​‌‍‌‍‌​‍​‍​‍​​‍​‍‌‍‍​‌​‍‌‍‌‌‌‍‌‍​‍​‍​‍‍​‍​‍‌‍‍​‌‌​‌‌​‌​​‌​​‍‍​‍​‍‌‍​‍‌‍​‌‌​‌‍‍‌‌​​‍‍‌‍​‌‌‍‌​‌‍‌‌‍‍‌‌‍‍​‍‍‌‍‌​‌‍​‌‌‌​‌‍‌‍​‌‍‌‌​​‍‍‌‍​‌‍‌‍‌​‍‌‍‌‌‌‍‌​‌‍‍‌‌‌​‌‍‌​‍​‍‌‍‍‌‌‌​‌‍‌‌‌‍‌‌‌‌‌​‌‍‌‌​​‌‍‌‌‌​​‍‌‌‍​​‍‌‌​‌‌‌‌‌‌‌‌​‌‌‌​​‌​‍‌‌​‌‌​‌​‍‌​‌​‌‌‍‍‌​‌​​‌‌‌‌‌​‌‌‍‍‍‌‍‌‌‌‌‌‌‌​‌‌​‌​‍‌‍‍‌‌‌​‌‍‌‌‌‍‌‌​​‍‌​‍‌​‍‌​​​‌‍‍​‌‌​‍​‌​‌‌​‌​​​‍‌‌‍‌​​​‍​‌‌​​‌‍‍‌​‍‌‍‌‌‌‌‌​‌‌‍‌‌‌​‍‌‍‌‌‌‍‌​‌‍‍‌‌‌​​‍​‌‍‌‍‌‍‍‌‌‍‌‌‌‍​‌‍‌​‌‌​​‌‍​‌‌‌​‌‍‍​​‌‌‍​‌‌‍‌​‌‌‍‌‍‍‌‌​‌‍‌​‍​‍​‍‌‌
Internship Location: Kulandaivelu Kalai DDS​​​​‌‍​‍​‍‌‍‌​‍‌‍‍‌‌‍‌‌‍‍‌‌‍‍​‍​‍​‍‍​‍​‍‌‍‌​‌‍​‌‌‌​‌‍‌‍​‌‍‌‌​​‍‍‌‍​‌‍‌‍‌​‍​‍​‍​​‍​‍‌‍‍​‌​‍‌‍‌‌‌‍‌‍​‍​‍​‍‍​‍​‍‌‍‍​‌‌​‌‌​‌​​‌​​‍‍​‍​‍‌‍​‍‌‍​‌‌​‌‍‍‌‌​​‍‍‌‍​‌‌‍‌​‌‍‌‌‍‍‌‌‍‍​‍‍‌‍‌​‌‍​‌‌‌​‌‍‌‍​‌‍‌‌​​‍‍‌‍​‌‍‌‍‌​‍‌‍‌‌‌‍‌​‌‍‍‌‌‌​‌‍‌​‍​‍‌‍‍‌‌‌​‌‍‌‌‌‍‌‌‌‌‌​‌‍‌‌​​‌‍‌‌‌​​‍‌‌‍​​‍‌‌​‌‌‌‌‌‌‌‌​‌‌‌​​‌​‍‌‌​‌‌​‌​‍‌​‌​‌‌‍‍‌​‌​​‌‌‌‌‌​‌‌‍‍‍‌‍‌‌‌‌‌‌‌​‌‌​‌​‍‌‍‍‌‌‌​‌‍‌‌‌‍‌‌​​‍‌​‍‌​‍‌​​​‌‍‍​‌‌​‍​‌​‌‌​‌​​​‍‌‌‍‌​​​‍​‌‌​​‌‍‍‌​‍‌‍‌‌‌‌‌​‌‌‍‌‌‌​‍‌‍‌‌‌‍‌​‌‍‍‌‌‌​​‍​‌‍‌‍‌‍‍‌‌‍‌‌‌‍​‌‍‌​‌‌​​‌‍​‌‌‌​‌‍‍​​‌‌‍‍‌‌‍‍‌‌​‌‍‌‌‌​‍‌‍‍‌​‌‍‍​‌‍‍‌‌​​‌‌‌‍​‌‍‌‍​‌‍​‌‌‌​‌‍‍‌‌‍‌‍‍​‍​‍‌‌
Onsite Mentor: Dr. Kalai Kulandaivelu​​​​‌‍​‍​‍‌‍‌​‍‌‍‍‌‌‍‌‌‍‍‌‌‍‍​‍​‍​‍‍​‍​‍‌‍‌​‌‍​‌‌‌​‌‍‌‍​‌‍‌‌​​‍‍‌‍​‌‍‌‍‌​‍​‍​‍​​‍​‍‌‍‍​‌​‍‌‍‌‌‌‍‌‍​‍​‍​‍‍​‍​‍‌‍‍​‌‌​‌‌​‌​​‌​​‍‍​‍​‍‌‍​‍‌‍​‌‌​‌‍‍‌‌​​‍‍‌‍​‌‌‍‌​‌‍‌‌‍‍‌‌‍‍​‍‍‌‍‌​‌‍​‌‌‌​‌‍‌‍​‌‍‌‌​​‍‍‌‍​‌‍‌‍‌​‍‌‍‌‌‌‍‌​‌‍‍‌‌‌​‌‍‌​‍​‍‌‍‍‌‌‌​‌‍‌‌‌‍‌‌‌‌‌​‌‍‌‌​​‌‍‌‌‌​​‍‌‌‍​​‍‌‌​‌‌‌‌‌‌‌‌​‌‌‌​​‌​‍‌‌​‌‌​‌​‍‌​‌​‌‌‍‍‌​‌​​‌‌‌‌‌​‌‌‍‍‍‌‍‌‌‌‌‌‌‌​‌‌​‌​‍‌‍‍‌‌‌​‌‍‌‌‌‍‌‌​​‍‌​‍‌​‍‌​​​‌‍‍​‌‌​‍​‌​‌‌​‌​​​‍‌‌‍‌​​​‍​‌‌​​‌‍‍‌​‍‌‍‌‌‌‌‌​‌‌‍‌‌‌​‍‌‍‌‌‌‍‌​‌‍‍‌‌‌​​‍​‌‍‌‍‌‍‍‌‌‍‌‌‌‍​‌‍‌​‌‌​​‌‍​‌‌‌​‌‍‍​​‌‌‍‌‍‍‌​‌‍‍‌‌‌​‌‍‌‌‌‌‌‍‌‌‍‌‌‌‍‍‌‌​‌‍‌​‍​‍​‍‌‌

I aim to simplify patient-doctor interactions by creating a chatbot that recommends treatments based on patients’ stated problems and medical history.​​​​‌‍​‍​‍‌‍‌​‍‌‍‍‌‌‍‌‌‍‍‌‌‍‍​‍​‍​‍‍​‍​‍‌‍‌​‌‍​‌‌‌​‌‍‌‍​‌‍‌‌​​‍‍‌‍​‌‍‌‍‌​‍​‍​‍​​‍​‍‌‍‍​‌​‍‌‍‌‌‌‍‌‍​‍​‍​‍‍​‍​‍‌‍‍​‌‌​‌‌​‌​​‌​​‍‍​‍​‍‌‍​‍‌‍​‌‌​‌‍‍‌‌​​‍‍‌‍​‌‌‍‌​‌‍‌‌‍‍‌‌‍‍​‍‍‌‍‌​‌‍​‌‌‌​‌‍‌‍​‌‍‌‌​​‍‍‌‍​‌‍‌‍‌​‍‌‍‌‌‌‍‌​‌‍‍‌‌‌​‌‍‌​‍​‍‌‍‍‌‌‌​‌‍‌‌‌‍‌‌‌‌‌​‌‍‌‌​​‌‍‌‌‌​​‍‌‌‍​​‍‌‌​‌‌‌‌‌‌‌‌​‌‌‌​​‌​‍‌‌​‌‌​‌​‍‌​‌​‌‌‍‍‌​‌​​‌‌‌‌‌​‌‌‍‍‍‌‍‌‌‌‌‌‌‌​‌‌​‌​‍‌‍‍‌‌‌​‌‍‌‌‌‍‌‌​​‍‌​‍‌​‍‌​​​‌‍‍​‌‌​‍​‌​‌‌​‌​​​‍‌‌‍‌​​​‍​‌‌​​‌‍‍‌​‍‌‍‌‌‌‌‌​‌‌‍‌‌‌​‍‌‍‌‌‌‍‌​‌‍‍‌‌‌​​‍​‌‍‌‍‌‍‍‌‌‍‌‌‌‍​‌‍‌​‌‌​​‌‍​‌‌‌​‌‍‍​​‌‌‍‌‌‍‌‍‌‌‌​‍‌‌‍‌‍‍‌‌‍‌‌‌‌​‍​‍‌‌

As input data, I will use a list of sample data that includes patient history, medical records, the patient’s stated problem, and LLM training data. Using this information, the chatbot will be able to support the patient by providing oral-care tips or Over-The-Counter (OTC) medication if they are experiencing any pain. I will create a sample database in consultation with my external advisor that includes patient history and medical records. Based on this data, if the patient has had similar issues in the past, the chatbot will provide oral remedies.

Project Blog

Week 1: Brace yourself​​​​‌‍​‍​‍‌‍‌​‍‌‍‍‌‌‍‌‌‍‍‌‌‍‍​‍​‍​‍‍​‍​‍‌‍‌​‌‍​‌‌‌​‌‍‌‍​‌‍‌‌​​‍‍‌‍​‌‍‌‍‌​‍​‍​‍​​‍​‍‌‍‍​‌​‍‌‍‌‌‌‍‌‍​‍​‍​‍‍​‍​‍‌‍‍​‌‌​‌‌​‌​​‌​​‍‍​‍​‍‌‍​‍‌‍​‌‌​‌‍‍‌‌​​‍‍‌‍​‌‌‍‌​‌‍‌‌‍‍‌‌‍‍​‍‍‌‍‌​‌‍​‌‌‌​‌‍‌‍​‌‍‌‌​​‍‍‌‍​‌‍‌‍‌​‍‌‍‌‌‌‍‌​‌‍‍‌‌‌​‌‍‌​‍​‍‌‍‍‌‌‌​‌‍‌‌‌‍‌‌‌‌‌​‌‍‌‌​​‌‍‌‌‌​​‍‌‌‍​​‍‌‌​‌‌‌‌‌‌‌‌​‌‌‌​​‌​‍‌‌​‌‌​‌​‍‌​‌​‌‌‍‍‌​‌​​‌‌‌‌‌​‌‌‍‍‍‌‍‌‌‌‌‌‌‌​‌‌​‌​‍‌‍‍‌‌‌​‌‍‌‌‌‍‌‌​​‍‌​‍‌​‍‌​​​‌‍‍​‌‌​‍​‌​‌‌​‌​​​‍‌‌‍‌​​​‍​‌‌​​‌‍‍‌​‍‌‍‌‌‌‌‌​‌‌‍‌‌‌​‍‌‍‌‌‌‍‌​‌‍‍‌‌‌​​‍​‌‍‌‍‌‍‍‌‌‍‌‌‌‍​‌‍‌​‌‌​​‌‍​‌‌‌​‌‍‍​​‌‌‍​‍‌‍​‌‍‌‍‌‌‌‌​​‌‍‌​‌‌​‌​​‍‍​​​​‍‍‌‍‌‍‌‌‌‌‍​‌‍​‌‌‌‌​‌‍‍‌‌‌​‌‍​‌‍‌‌​‍​‍‌‌

March 5, 2024

Hi everyone! I’m Aadya, and I’m excited to kick off my first blog post. This week, I will be focusing on the applications of AI in medicine and how exactly machine learning can be used to simplify doctor-patient interactions. So, let’s dive into it!​​​​‌‍​‍​‍‌‍‌​‍‌‍‍‌‌‍‌‌‍‍‌‌‍‍​‍​‍​‍‍​‍​‍‌‍‌​‌‍​‌‌‌​‌‍‌‍​‌‍‌‌​​‍‍‌‍​‌‍‌‍‌​‍​‍​‍​​‍​‍‌‍‍​‌​‍‌‍‌‌‌‍‌‍​‍​‍​‍‍​‍​‍‌‍‍​‌‌​‌‌​‌​​‌​​‍‍​‍​‍‌‍​‍‌‍​‌‌​‌‍‍‌‌​​‍‍‌‍​‌‌‍‌​‌‍‌‌‍‍‌‌‍‍​‍‍‌‍‌​‌‍​‌‌‌​‌‍‌‍​‌‍‌‌​​‍‍‌‍​‌‍‌‍‌​‍‌‍‌‌‌‍‌​‌‍‍‌‌‌​‌‍‌​‍​‍‌‍‍‌‌‌​‌‍‌‌‌‍‌‌‌‌‌​‌‍‌‌​​‌‍‌‌‌​​‍‌‌‍​​‍‌‌​‌‌‌‌‌‌‌‌​‌‌‌​​‌​‍‌‌​‌‌​‌​‍‌​‌​‌‌‍‍‌​‌​​‌‌‌‌‌​‌‌‍‍‍‌‍‌‌‌‌‌‌‌​‌‌​‌​‍‌‍‍‌‌‌​‌‍‌‌‌‍‌‌​​‍‌​‍‌​‍‌​​​‌‍‍​‌‌​‍​‌​‌‌​‌​​​‍‌‌‍‌​​​‍​‌‌​​‌‍‍‌​‍‌‍‌‌‌‌‌​‌‌‍‌‌‌​‍‌‍‌‌‌‍‌​‌‍‍‌‌‌​​‍​‌‍‌‍‌‍‍‌‌‍‌‌‌‍​‌‍‌​‌‌​​‌‍​‌‌‌​‌‍‍​​‌‌‍​‍‌‍​‌‍‌‍‌‌‌‌​​‌‍‌​‌‌​‌​​‍‍​​​​‍‍‌‍​‌‌​‍‌‌​‌‍‍‌‌‍​‌‍​‌‍‌‌​‍​‍‌‌

Background and Introduction:

I was trying to schedule an appointment with my dentist and noticed that the website was last updated in 2002. This makes it difficult for patients to consult their dentist since patients must resort to calling the office if they want to schedule an appointment or address any concerns. When you need non-emergency immediate support, rather than waiting for a time when both the patient and doctor are available, patients can utilize an offline mode of communication to receive oral-care instructions that best suit their needs.

Additionally, according to the CDC, 65.5% of adults in America visited a dentist in 2019, which means that oral care is a heavily overlooked concern. Whether patients may not be able to find a dentist due to lack of availability or they simply cannot afford one, oral hygiene is incredibly important to prevent any diseases in the long term.

With my chatbot, patients will be able to receive immediate attention to resolve their issues in a timely manner. As a stretch goal, I hope to improve managing the doctor’s administrative tasks, such as schedule management. This would be beneficial to doctors since they are now able to keep track of patient history in a more efficient way. Therefore, through my chatbot, I will be able to help not only patients receive personalized care in a timely manner but also doctors, as they are often tasked with navigating countless files on patient data. This improves the dentist’s productivity, which allows them to address the needs of more patients.

Clinical Decision-Making with the Use of AI:

Currently, there is patient data that includes the patient’s medical history. As input, I will use a dataset that consists of patient history, medical records, and their stated problem. Using this information, the chatbot will be able to support the patient by providing oral-care tips or Over-The-Counter (OTC) medication if they are experiencing any pain. I plan on finding an EHR (electronic health record) system that would be beneficial to data acquisition as I will be equipped with large samples of data while ensuring patient privacy. These EHRs are HIPAA-compliant, so there would be no risk to both the patient and the doctor.

This application of Evidence-Based decision making uses neural networks to imitate how the human brain works in order to make clinical decisions similar to a dentist. In fact, machine learning helps dentists since it is able to learn from large samples of data to make accurate predictions.

Conclusion:

My model will look at patients’ medical history and find the solution to the problem they are facing now. For example, if the patient had X issue in the past and they’re having dental issues now, the information I hope to find is how accurate the model can find the correlation between these problems and find a treatment to provide support. Using Large Language Models, my chatbot will find the best possible solution to improve oral hygiene without harming any past treatments/ surgery. Overall, my model should be able to provide personalized recommendations to improve the patient’s health.

I hope to learn how to improve the accuracy of my model’s diagnoses and create a system with the support of medical professionals. By providing personalized assistance to patients, my algorithm will simplify doctor-patient interactions through immediate support.

Week 2: Here's the Drill​​​​‌‍​‍​‍‌‍‌​‍‌‍‍‌‌‍‌‌‍‍‌‌‍‍​‍​‍​‍‍​‍​‍‌‍‌​‌‍​‌‌‌​‌‍‌‍​‌‍‌‌​​‍‍‌‍​‌‍‌‍‌​‍​‍​‍​​‍​‍‌‍‍​‌​‍‌‍‌‌‌‍‌‍​‍​‍​‍‍​‍​‍‌‍‍​‌‌​‌‌​‌​​‌​​‍‍​‍​‍‌‍​‍‌‍​‌‌​‌‍‍‌‌​​‍‍‌‍​‌‌‍‌​‌‍‌‌‍‍‌‌‍‍​‍‍‌‍‌​‌‍​‌‌‌​‌‍‌‍​‌‍‌‌​​‍‍‌‍​‌‍‌‍‌​‍‌‍‌‌‌‍‌​‌‍‍‌‌‌​‌‍‌​‍​‍‌‍‍‌‌‌​‌‍‌‌‌‍‌‌‌‌‌​‌‍‌‌​​‌‍‌‌‌​​‍‌‌‍​​‍‌‌​‌‌‌‌‌‌‌‌​‌‌‌​​‌​‍‌‌​‌‌​‌​‍‌​‌​‌‌‍‍‌​‌​​‌‌‌‌‌​‌‌‍‍‍‌‍‌‌‌‌‌‌‌​‌‌​‌​‍‌‍‍‌‌‌​‌‍‌‌‌‍‌‌​​‍‌​‍‌​‍‌​​​‌‍‍​‌‌​‍​‌​‌‌​‌​​​‍‌‌‍‌​​​‍​‌‌​​‌‍‍‌​‍‌‍‌‌‌‌‌​‌‌‍‌‌‌​‍‌‍‌‌‌‍‌​‌‍‍‌‌‌​​‍​‌‍‌‍‌‍‍‌‌‍‌‌‌‍​‌‍‌​‌‌​​‌‍​‌‌‌​‌‍‍​​‌‌‍​‍‌‍​‌‍‌‍‌‌‌‌​​‌‍‌​‌‌​‌​​‍‍​​‌​‍‍‌‍‌‍‌‌‌‌‍​‌‍​‌‌‌‌​‌‍‍‌‌‌​‌‍​‌‍‌‌​‍​‍‌‌

March 8, 2024

Hi everyone, and welcome back! For week two, I will go over the process for creating my virtual dentist chatbot. I had the chance to start creating a virtual dentist chatbot as part of my capstone project for Advanced Java Topics. However, there is still a long way to go before I complete the development of my large language model. So, let's get into it!​​​​‌‍​‍​‍‌‍‌​‍‌‍‍‌‌‍‌‌‍‍‌‌‍‍​‍​‍​‍‍​‍​‍‌‍‌​‌‍​‌‌‌​‌‍‌‍​‌‍‌‌​​‍‍‌‍​‌‍‌‍‌​‍​‍​‍​​‍​‍‌‍‍​‌​‍‌‍‌‌‌‍‌‍​‍​‍​‍‍​‍​‍‌‍‍​‌‌​‌‌​‌​​‌​​‍‍​‍​‍‌‍​‍‌‍​‌‌​‌‍‍‌‌​​‍‍‌‍​‌‌‍‌​‌‍‌‌‍‍‌‌‍‍​‍‍‌‍‌​‌‍​‌‌‌​‌‍‌‍​‌‍‌‌​​‍‍‌‍​‌‍‌‍‌​‍‌‍‌‌‌‍‌​‌‍‍‌‌‌​‌‍‌​‍​‍‌‍‍‌‌‌​‌‍‌‌‌‍‌‌‌‌‌​‌‍‌‌​​‌‍‌‌‌​​‍‌‌‍​​‍‌‌​‌‌‌‌‌‌‌‌​‌‌‌​​‌​‍‌‌​‌‌​‌​‍‌​‌​‌‌‍‍‌​‌​​‌‌‌‌‌​‌‌‍‍‍‌‍‌‌‌‌‌‌‌​‌‌​‌​‍‌‍‍‌‌‌​‌‍‌‌‌‍‌‌​​‍‌​‍‌​‍‌​​​‌‍‍​‌‌​‍​‌​‌‌​‌​​​‍‌‌‍‌​​​‍​‌‌​​‌‍‍‌​‍‌‍‌‌‌‌‌​‌‌‍‌‌‌​‍‌‍‌‌‌‍‌​‌‍‍‌‌‌​​‍​‌‍‌‍‌‍‍‌‌‍‌‌‌‍​‌‍‌​‌‌​​‌‍​‌‌‌​‌‍‍​​‌‌‍​‍‌‍​‌‍‌‍‌‌‌‌​​‌‍‌​‌‌​‌​​‍‍​​‌​‍‍‌‍​‌‌​‍‌‌​‌‍‍‌‌‍​‌‍​‌‍‌‌​‍​‍‌‌

Current Progress

As of submission of my capstone final, I successfully created a chatbot that checks whether the patient is included in the patient records. If so, it then checks for any previous treatments that the user has undergone.

First, I created two lists of sample data in the form of patient information and patient history using a Google spreadsheet. I am unable to add pictures right now, but essentially, the patient_information dataset contains basic information on patients’ ID numbers, Date of Birth, contact numbers, and the date of their last scheduled appointment. The patient_history dataset includes their ID number and any past treatments they’ve had (such as root canals, wisdom tooth extraction, and crown treatments). When the patient enters their ID number, my model will traverse through the list of patient history and return the specific treatments and/or procedures the patient has had in the past.

In order to successfully program this chatbot, I created four classes. The first class is patient_info, which reads the patient_info.csv file and then displays this data. The next class is patient_history, which reads the patient_history.csv file and then displays this data. The information displayed includes the patients’ ID number and whether they’ve had dental surgery, crown treatment, wisdom tooth extraction, or root canal treatment. Next is analyze_data, which checks whether the patient’s inputted ID number is found in the patient records. If the patient is included in the dentist’s records, the chatbot will check whether the patient has had dental surgery, crown treatment, wisdom tooth extraction, or root canal treatment. If so, the model returns the treatments the patient has had. Finally, the run_chatbot, which is the driver class, asks the user to input their ID number. Then, it calls the analyze_data class and patient_history csv file to analyze the patient’s past procedures.

Methodology

This week, I began creating a custom GPT using OpenAI’s GPT-4 by feeding it instructions to focus on dental issues and preventative care. To provide some context, GPT-4 is a form of generative AI that utilizes large language models. It is then able to read large amounts of text to understand and generate human-like text. In the next week, I hope to finish constructing this custom GPT and install it into Google Colab, where I will combine it with my current chatbot.

While conducting my research, it may take time to acquire my data set since large amounts of data are required in order to train and test my model successfully. When creating an AI model, it is imperative to have large amounts of data to improve generalization. If the model is trained with a small amount, this may cause issues as it will be unable to adapt to new data, causing it to be inaccurate. Additionally, it will adapt to complex data, as when my model is implemented in the real world, it will have to deal with situations that it may have never seen before.

However, training the model with large amounts of data with variability will improve representation so it is able to deal with new scenarios. This is important because, since we are dealing with patient diagnosis, it is important that the algorithm is accurate in order to protect the health of the patients. To create an ethical chatbot that protects consumers, I will find and integrate an EHR (electronic health record) to safely access patient records for implementation and then split this up into training and testing data.

I will use a list of patient history, medical records, and the patient’s stated problem as input. With this training set, the model will be able to accurately diagnose by learning the proper treatments. Finally, to implement my algorithm while continuously regulating my model, I will use the testing data and work closely with medical professionals to ensure the product is effective and performing well.

That's all for Week 2. See you all next week!

Week 3: Rooting for GPT-4​​​​‌‍​‍​‍‌‍‌​‍‌‍‍‌‌‍‌‌‍‍‌‌‍‍​‍​‍​‍‍​‍​‍‌‍‌​‌‍​‌‌‌​‌‍‌‍​‌‍‌‌​​‍‍‌‍​‌‍‌‍‌​‍​‍​‍​​‍​‍‌‍‍​‌​‍‌‍‌‌‌‍‌‍​‍​‍​‍‍​‍​‍‌‍‍​‌‌​‌‌​‌​​‌​​‍‍​‍​‍‌‍​‍‌‍​‌‌​‌‍‍‌‌​​‍‍‌‍​‌‌‍‌​‌‍‌‌‍‍‌‌‍‍​‍‍‌‍‌​‌‍​‌‌‌​‌‍‌‍​‌‍‌‌​​‍‍‌‍​‌‍‌‍‌​‍‌‍‌‌‌‍‌​‌‍‍‌‌‌​‌‍‌​‍​‍‌‍‍‌‌‌​‌‍‌‌‌‍‌‌‌‌‌​‌‍‌‌​​‌‍‌‌‌​​‍‌‌‍​​‍‌‌​‌‌‌‌‌‌‌‌​‌‌‌​​‌​‍‌‌​‌‌​‌​‍‌​‌​‌‌‍‍‌​‌​​‌‌‌‌‌​‌‌‍‍‍‌‍‌‌‌‌‌‌‌​‌‌​‌​‍‌‍‍‌‌‌​‌‍‌‌‌‍‌‌​​‍‌​‍‌​‍‌​​​‌‍‍​‌‌​‍​‌​‌‌​‌​​​‍‌‌‍‌​​​‍​‌‌​​‌‍‍‌​‍‌‍‌‌‌‌‌​‌‌‍‌‌‌​‍‌‍‌‌‌‍‌​‌‍‍‌‌‌​​‍​‌‍‌‍‌‍‍‌‌‍‌‌‌‍​‌‍‌​‌‌​​‌‍​‌‌‌​‌‍‍​​‌‌‍​‍‌‍​‌‍‌‍‌‌‌‌​​‌‍‌​‌‌​‌​​‍‍​​‍​‍‍‌‍‌‍‌‌‌‌‍​‌‍​‌‌‌‌​‌‍‍‌‌‌​‌‍​‌‍‌‌​‍​‍‌‌

March 15, 2024

Hi everyone, and welcome back! As I discussed last week, I began creating a custom GPT using OpenAI’s GPT-4. The process for creating your own GPT is pretty simple, but I will go more in-depth on how exactly I was able to customize this chatbot. In this post, I will cover the steps for creating a GPT as well as what it can do.​​​​‌‍​‍​‍‌‍‌​‍‌‍‍‌‌‍‌‌‍‍‌‌‍‍​‍​‍​‍‍​‍​‍‌‍‌​‌‍​‌‌‌​‌‍‌‍​‌‍‌‌​​‍‍‌‍​‌‍‌‍‌​‍​‍​‍​​‍​‍‌‍‍​‌​‍‌‍‌‌‌‍‌‍​‍​‍​‍‍​‍​‍‌‍‍​‌‌​‌‌​‌​​‌​​‍‍​‍​‍‌‍​‍‌‍​‌‌​‌‍‍‌‌​​‍‍‌‍​‌‌‍‌​‌‍‌‌‍‍‌‌‍‍​‍‍‌‍‌​‌‍​‌‌‌​‌‍‌‍​‌‍‌‌​​‍‍‌‍​‌‍‌‍‌​‍‌‍‌‌‌‍‌​‌‍‍‌‌‌​‌‍‌​‍​‍‌‍‍‌‌‌​‌‍‌‌‌‍‌‌‌‌‌​‌‍‌‌​​‌‍‌‌‌​​‍‌‌‍​​‍‌‌​‌‌‌‌‌‌‌‌​‌‌‌​​‌​‍‌‌​‌‌​‌​‍‌​‌​‌‌‍‍‌​‌​​‌‌‌‌‌​‌‌‍‍‍‌‍‌‌‌‌‌‌‌​‌‌​‌​‍‌‍‍‌‌‌​‌‍‌‌‌‍‌‌​​‍‌​‍‌​‍‌​​​‌‍‍​‌‌​‍​‌​‌‌​‌​​​‍‌‌‍‌​​​‍​‌‌​​‌‍‍‌​‍‌‍‌‌‌‌‌​‌‌‍‌‌‌​‍‌‍‌‌‌‍‌​‌‍‍‌‌‌​​‍​‌‍‌‍‌‍‍‌‌‍‌‌‌‍​‌‍‌​‌‌​​‌‍​‌‌‌​‌‍‍​​‌‌‍​‍‌‍​‌‍‌‍‌‌‌‌​​‌‍‌​‌‌​‌​​‍‍​​‍​‍‍‌‍​‌‌​‍‌‌​‌‍‍‌‌‍​‌‍​‌‍‌‌​‍​‍‌‌

The Steps

Installing GPT-4 is a crucial step, as OpenAI’s latest model provides tools to create your own large language model. I had a lot of fun playing around and exploring the GPTs, such as DALL·E, which generates an image based on the user’s inputted text. More impressive, however, is the ability to create your own GPT through the GPT builder.

Once you open the GPT Builder, it prompts the user to provide a gist of what they are trying to accomplish. For example:

For this step, I asked the GPT Builder to create a virtual dentist focusing on dental issues and preventive care. From that, it generated some conversation starters on the preview side, such as: “How can I prevent cavities?”. However, I later found that when prompted, the GPT doesn’t have a very colloquial style of speaking, which is important when supporting human interactions. Since we are dealing with a very personal issue regarding medical history and health, it is important to handle patients with a sense of empathy. This is difficult to tackle with a chatbot since patients seek that one-on-one human interaction for a sense of understanding and comfort. While this is hard to achieve, I asked the GPT to emphasize a friendly tone so that the audience is able to understand what is being advised. With these changes, the description of this chatbot is now: “A virtual dentist focusing on dental issues and preventive care, using accessible language.”

Next, the GPT Builder prompts for the role and goal of this virtual dentist. I asked it to focus on providing general oral care tips and preventative care. This step proved to be a challenge, as when the user inputs their stated problem, the LLM provides a large amount of text. If the chatbot's messages are difficult for the user to understand, it defeats the purpose of having a chatbot, as there is no effective way for the user to communicate with it. Additionally, if the user states a problem that requires more inquiry, such as their specific symptoms, I asked the chatbot to ask more questions so that it is medically accurate and doesn’t misdiagnose.

Even after prompting the GPT Builder to ask them questions one at a time and separate the text, it did not seem to understand this command. This is something I definitely have to fix when implementing my model in Google Colab as useablity is an important element.

One issue I came across when brainstorming this project is the risk of misdiagnosis as, since we are dealing with patient diagnosis, it is important that the algorithm is accurate in order to protect the health of the patients. Learning from the patient’s medical history is necessary as it could be harmful to recommend a treatment that could worsen the patient’s symptoms. To combat this problem, I placed a limitation stating that the GPT should not provide invasive treatments that have long-term side effects but rather focus on general treatments and over-the-counter (OTC) remedies.

Summary

To provide a summary of the instructions I gave the GPT builder, these are the configurations of the chatbot.

Now, with these instructions, my custom GPT is able to provide OTC treatments for a patient’s stated problem. This is a preview of what my model looks like in GPT-4:

Conclusion

Next week, I hope to fix these bugs in my custom GPT by finding a way for the LLM chatbot to be more communicative with the user. Currently, it asks the user for their problem and generates a large amount of text without truly going in-depth on their exact symptoms. This is harmful because if the chatbot is not medically accurate on the exact issue a patient has, it can worsen their symptoms by providing the wrong treatment. Once I implement this chatbot in Google Colab, I hope to solve this problem by breaking down the generated text.

That is all for Week 3! Thanks for reading, and let me know if you have any questions. See you next week!

Week 4: Filling in the Gaps​​​​‌‍​‍​‍‌‍‌​‍‌‍‍‌‌‍‌‌‍‍‌‌‍‍​‍​‍​‍‍​‍​‍‌‍‌​‌‍​‌‌‌​‌‍‌‍​‌‍‌‌​​‍‍‌‍​‌‍‌‍‌​‍​‍​‍​​‍​‍‌‍‍​‌​‍‌‍‌‌‌‍‌‍​‍​‍​‍‍​‍​‍‌‍‍​‌‌​‌‌​‌​​‌​​‍‍​‍​‍‌‍​‍‌‍​‌‌​‌‍‍‌‌​​‍‍‌‍​‌‌‍‌​‌‍‌‌‍‍‌‌‍‍​‍‍‌‍‌​‌‍​‌‌‌​‌‍‌‍​‌‍‌‌​​‍‍‌‍​‌‍‌‍‌​‍‌‍‌‌‌‍‌​‌‍‍‌‌‌​‌‍‌​‍​‍‌‍‍‌‌‌​‌‍‌‌‌‍‌‌‌‌‌​‌‍‌‌​​‌‍‌‌‌​​‍‌‌‍​​‍‌‌​‌‌‌‌‌‌‌‌​‌‌‌​​‌​‍‌‌​‌‌​‌​‍‌​‌​‌‌‍‍‌​‌​​‌‌‌‌‌​‌‌‍‍‍‌‍‌‌‌‌‌‌‌​‌‌​‌​‍‌‍‍‌‌‌​‌‍‌‌‌‍‌‌​​‍‌​‍‌​‍‌​​​‌‍‍​‌‌​‍​‌​‌‌​‌​​​‍‌‌‍‌​​​‍​‌‌​​‌‍‍‌​‍‌‍‌‌‌‌‌​‌‌‍‌‌‌​‍‌‍‌‌‌‍‌​‌‍‍‌‌‌​​‍​‌‍‌‍‌‍‍‌‌‍‌‌‌‍​‌‍‌​‌‌​​‌‍​‌‌‌​‌‍‍​​‌‌‍​‍‌‍​‌‍‌‍‌‌‌‌​​‌‍‌​‌‌​‌​​‍‍​​​‍‍‌‍‌‍‌‌‌‌‍​‌‍​‌‌‌‌​‌‍‍‌‌‌​‌‍​‌‍‌‌​‍​‍‌‌

March 22, 2024

Hi everyone, and welcome to Week 4 of my senior project! This week, I focused on fixing the errors of my custom GPT. As I mentioned last week, the chatbot would provide the user with large amounts of text, which affects readability. So, let’s go over the process for enhancing user experience!​​​​‌‍​‍​‍‌‍‌​‍‌‍‍‌‌‍‌‌‍‍‌‌‍‍​‍​‍​‍‍​‍​‍‌‍‌​‌‍​‌‌‌​‌‍‌‍​‌‍‌‌​​‍‍‌‍​‌‍‌‍‌​‍​‍​‍​​‍​‍‌‍‍​‌​‍‌‍‌‌‌‍‌‍​‍​‍​‍‍​‍​‍‌‍‍​‌‌​‌‌​‌​​‌​​‍‍​‍​‍‌‍​‍‌‍​‌‌​‌‍‍‌‌​​‍‍‌‍​‌‌‍‌​‌‍‌‌‍‍‌‌‍‍​‍‍‌‍‌​‌‍​‌‌‌​‌‍‌‍​‌‍‌‌​​‍‍‌‍​‌‍‌‍‌​‍‌‍‌‌‌‍‌​‌‍‍‌‌‌​‌‍‌​‍​‍‌‍‍‌‌‌​‌‍‌‌‌‍‌‌‌‌‌​‌‍‌‌​​‌‍‌‌‌​​‍‌‌‍​​‍‌‌​‌‌‌‌‌‌‌‌​‌‌‌​​‌​‍‌‌​‌‌​‌​‍‌​‌​‌‌‍‍‌​‌​​‌‌‌‌‌​‌‌‍‍‍‌‍‌‌‌‌‌‌‌​‌‌​‌​‍‌‍‍‌‌‌​‌‍‌‌‌‍‌‌​​‍‌​‍‌​‍‌​​​‌‍‍​‌‌​‍​‌​‌‌​‌​​​‍‌‌‍‌​​​‍​‌‌​​‌‍‍‌​‍‌‍‌‌‌‌‌​‌‌‍‌‌‌​‍‌‍‌‌‌‍‌​‌‍‍‌‌‌​​‍​‌‍‌‍‌‍‍‌‌‍‌‌‌‍​‌‍‌​‌‌​​‌‍​‌‌‌​‌‍‍​​‌‌‍​‍‌‍​‌‍‌‍‌‌‌‌​​‌‍‌​‌‌​‌​​‍‍​​​‍‍‌‍​‌‌​‍‌‌​‌‍‍‌‌‍​‌‍​‌‍‌‌​‍​‍‌‌

Installing the GPT on Colab

Initially, I tried cutting down the chatbot’s content through Google Colab but later found a much simpler way of doing so. To install the GPT, I had to access my API key, which I could find on OpenAI’s website. Once you create your API account, you can create your key and use it to provide authorization to any project you’re working on. This is useful because now Colab has access to my project and can access the features of my custom GPT.

Fixing the Chatbot

When running the chatbot, I decided to give very generic symptoms, such as “I have a fever,” and see how the model responds to this text. And this is where I found the first issue. While it did ask a series of questions, if the user only answered one question, the model would provide treatments rather than inquire further to give a more accurate response. This is harmful because without knowing the depth of someone’s symptoms, the chatbot could be providing treatments that don’t improve the patient’s well-being. For example:

To solve this problem, I configured the chatbot to restate the questions that the user does not answer. This will ensure a more accurate model since it now knows how severe the symptom is before telling the user what they can do to improve their well-being.

Next, I wanted the model to know the extent of the situation before recommending oral care tips. Initially, the GPT would only ask about one symptom and learn how severe that symptom is instead of inquiring about anything else the user is facing.

So, I changed its configurations to if the user is experiencing any other symptoms so it can provide more specific and accurate guidance. Now it is able to learn how severe the patient’s symptoms are before giving them advice.

A New and Improved Model

I then tested whether my chatbot could improve accuracy by understanding the extent of the situation. I first provided a symptom, such as “My wisdom teeth are hurting.” The chatbot then asked a series of questions to learn how severe the symptom was.

To this, I only answered one question. Therefore, the model re-stated the other questions before providing any guidance. It seems as though if the model asks two yes-or-no questions and the user only answers one, it will assume the user answered the first question and move on.

Since I aim to improve user experience, I will focus on making the chatbot ask one question at a time when I finalize my model on Colab.

Conclusion

Next week, I plan to acquire my patient dataset and install it on Colab. As I mentioned in previous blog posts, I aim to mimic Electronic Health Record (EHR) data to create a usable model. Stay tuned as I go over the process of acquiring and (hopefully) preprocessing the dataset.

That’s all for week 4! Thanks for reading, and please let me know if you have any questions. See you in week 5!

Citations

GPT-4, openai.com/research/gpt-4.

Kondratiuk, Alex. “Supercharge Your OpenAI GPT Experiments with Google Colab: Here’s How.” Medium, Medium, 27 Oct. 2023

Week 5: Data Implants​​​​‌‍​‍​‍‌‍‌​‍‌‍‍‌‌‍‌‌‍‍‌‌‍‍​‍​‍​‍‍​‍​‍‌‍‌​‌‍​‌‌‌​‌‍‌‍​‌‍‌‌​​‍‍‌‍​‌‍‌‍‌​‍​‍​‍​​‍​‍‌‍‍​‌​‍‌‍‌‌‌‍‌‍​‍​‍​‍‍​‍​‍‌‍‍​‌‌​‌‌​‌​​‌​​‍‍​‍​‍‌‍​‍‌‍​‌‌​‌‍‍‌‌​​‍‍‌‍​‌‌‍‌​‌‍‌‌‍‍‌‌‍‍​‍‍‌‍‌​‌‍​‌‌‌​‌‍‌‍​‌‍‌‌​​‍‍‌‍​‌‍‌‍‌​‍‌‍‌‌‌‍‌​‌‍‍‌‌‌​‌‍‌​‍​‍‌‍‍‌‌‌​‌‍‌‌‌‍‌‌‌‌‌​‌‍‌‌​​‌‍‌‌‌​​‍‌‌‍​​‍‌‌​‌‌‌‌‌‌‌‌​‌‌‌​​‌​‍‌‌​‌‌​‌​‍‌​‌​‌‌‍‍‌​‌​​‌‌‌‌‌​‌‌‍‍‍‌‍‌‌‌‌‌‌‌​‌‌​‌​‍‌‍‍‌‌‌​‌‍‌‌‌‍‌‌​​‍‌​‍‌​‍‌​​​‌‍‍​‌‌​‍​‌​‌‌​‌​​​‍‌‌‍‌​​​‍​‌‌​​‌‍‍‌​‍‌‍‌‌‌‌‌​‌‌‍‌‌‌​‍‌‍‌‌‌‍‌​‌‍‍‌‌‌​​‍​‌‍‌‍‌‍‍‌‌‍‌‌‌‍​‌‍‌​‌‌​​‌‍​‌‌‌​‌‍‍​​‌‌‍​‍‌‍​‌‍‌‍‌‌‌‌​​‌‍‌​‌‌​‌​​‍‍​‌​​‍‍‌‍‌‍‌‌‌‌‍​‌‍​‌‌‌‌​‌‍‍‌‌‌​‌‍​‌‍‌‌​‍​‍‌‌

March 30, 2024

Hello everyone, and welcome to Week 5 of my senior project. Thank you all so much for following along! Let’s get into this week’s updates as I provide a timeline for completing my project as well as uncover the journey of finding my dataset.​​​​‌‍​‍​‍‌‍‌​‍‌‍‍‌‌‍‌‌‍‍‌‌‍‍​‍​‍​‍‍​‍​‍‌‍‌​‌‍​‌‌‌​‌‍‌‍​‌‍‌‌​​‍‍‌‍​‌‍‌‍‌​‍​‍​‍​​‍​‍‌‍‍​‌​‍‌‍‌‌‌‍‌‍​‍​‍​‍‍​‍​‍‌‍‍​‌‌​‌‌​‌​​‌​​‍‍​‍​‍‌‍​‍‌‍​‌‌​‌‍‍‌‌​​‍‍‌‍​‌‌‍‌​‌‍‌‌‍‍‌‌‍‍​‍‍‌‍‌​‌‍​‌‌‌​‌‍‌‍​‌‍‌‌​​‍‍‌‍​‌‍‌‍‌​‍‌‍‌‌‌‍‌​‌‍‍‌‌‌​‌‍‌​‍​‍‌‍‍‌‌‌​‌‍‌‌‌‍‌‌‌‌‌​‌‍‌‌​​‌‍‌‌‌​​‍‌‌‍​​‍‌‌​‌‌‌‌‌‌‌‌​‌‌‌​​‌​‍‌‌​‌‌​‌​‍‌​‌​‌‌‍‍‌​‌​​‌‌‌‌‌​‌‌‍‍‍‌‍‌‌‌‌‌‌‌​‌‌​‌​‍‌‍‍‌‌‌​‌‍‌‌‌‍‌‌​​‍‌​‍‌​‍‌​​​‌‍‍​‌‌​‍​‌​‌‌​‌​​​‍‌‌‍‌​​​‍​‌‌​​‌‍‍‌​‍‌‍‌‌‌‌‌​‌‌‍‌‌‌​‍‌‍‌‌‌‍‌​‌‍‍‌‌‌​​‍​‌‍‌‍‌‍‍‌‌‍‌‌‌‍​‌‍‌​‌‌​​‌‍​‌‌‌​‌‍‍​​‌‌‍​‍‌‍​‌‍‌‍‌‌‌‌​​‌‍‌​‌‌​‌​​‍‍​‌​​‍‍‌‍​‌‌​‍‌‌​‌‍‍‌‌‍​‌‍​‌‍‌‌​‍​‍‌‌

Timeline:

Before starting this project, I created a timeline as shown below of what I hope to accomplish weekly:

Week One- Begin reading Lee’s The AI Revolution in Medicine: GPT-4 and Beyond.

Week Two- Finish reading Lee’s The AI Revolution in Medicine: GPT-4 and Beyond. Begin reading Wilkerson’s The Shift.

Week Three- Finish reading Wilkerson’s Revolution in Medicine: GPT-4 and Beyond. Begin work with Dr. Kalai to find the EHR dataset.

Week Four- Finish reading all scholarly sources. At this point, with the help of Dr. Kalai, I should be equipped with the knowledge to begin developing my chatbot. Assemble the data into csv files.

Week Five- Begin creating an outline of the steps needed to create the chatbot. Work with Dr. Kalai to ensure the dataset is accurate.

Week Six- Integrate a custom GPT into Google Collab and add the patient information.

Week Seven- Split the data into training and testing data. Work on training the LLM with the patient history data (p1).

Week Eight- Work on training the LLM with the patient history data (p2).

Week Nine- Use the testing data to ensure the model is accurate.

Week Ten- Work with Dr. Kalai to ensure that the chatbot is providing accurate treatments. Fix any errors that arise.

Week Eleven- Improve the chatbot to make it more user-friendly. If time permits, work on adding an option for patients to schedule an appointment with their dentist.

Week Twelve- Last changes to chatbot + ensure functionality.

Originally, I had planned for more time for research but upon reading up on numerous scholarly articles on creating custom GPTs and the use of Generative AI in medicine, I had gotten a kickstart on my project. Here is an updated timeline of what I have accomplished as well as what I hope to accomplish within the next couple of weeks:

Week One- Begin research on clinical and evidence-based decision making

Week Two- Go over the methodology and steps to create my AI model

Week Three- Begin creating a custom GPT using OpenAI’s GPT-4 tools.

Week Four- Fix the bugs in my custom GPT in order to make a more user-friendly chatbot.

Week Five- Begin finding an open-sourced EHR dataset.

Week Six- Finish implementing the EHR data.

Week Seven- Integrate a custom GPT into Google Colab. Work on training the LLM with the patient history data (p1).

Week Eight- Work on training the LLM with the patient history data (p2).

Week Nine- Use the testing data to ensure the model is accurate.

Week Ten- Work with Dr. Kalai to ensure that the chatbot is providing accurate treatments. Fix any errors that arise.

Week Eleven- Improve the chatbot to make it more user-friendly. If time permits, work on adding an option for patients to schedule an appointment with their dentist. Create a slideshow for the final presentation.

Week Twelve- Last changes to chatbot + ensure functionality. Finish the slideshow for the final presentation.

Acquiring the Dataset:

This week, I focused on acquiring my patient dataset. As mentioned in previous blog posts, I wanted to find an Electronic Health Record (EHR) to ensure accuracy when implementing my model in the real world. However, since it is difficult to use actual data from medical professionals due to confidentiality, I diverted my efforts to finding an open-source EHR.

I came across a Dental Practice Management Software on Github, called DentneD, where I could find data on patient history, appointments, reports, billing information, and other files that may be found in a dentist’s office.

These features are important since they provide me with access to the information I need (and more) to successfully create my AI model. However, all of the files were C#, which meant that I couldn’t use GoogleColab to directly import the data. Therefore, I used VS Code but ran into a problem with the Licensing agreements since when I executed the files, it would output “Restricted Access”. This is the error that I am getting on Terminal:

In order to successfully solve this issue, I will download the Microsoft SQL server (as highlighted above).

Conclusion

Thanks for reading this week’s blog post! Next week, I hope to gain access to the open-source database through MSSQL and use this information to continue creating my model. Stay tuned for updates as I implement my EHR data on Colab. Let me know if you have any questions!

Week 6: Finding a New Floss-ophy​​​​‌‍​‍​‍‌‍‌​‍‌‍‍‌‌‍‌‌‍‍‌‌‍‍​‍​‍​‍‍​‍​‍‌‍‌​‌‍​‌‌‌​‌‍‌‍​‌‍‌‌​​‍‍‌‍​‌‍‌‍‌​‍​‍​‍​​‍​‍‌‍‍​‌​‍‌‍‌‌‌‍‌‍​‍​‍​‍‍​‍​‍‌‍‍​‌‌​‌‌​‌​​‌​​‍‍​‍​‍‌‍​‍‌‍​‌‌​‌‍‍‌‌​​‍‍‌‍​‌‌‍‌​‌‍‌‌‍‍‌‌‍‍​‍‍‌‍‌​‌‍​‌‌‌​‌‍‌‍​‌‍‌‌​​‍‍‌‍​‌‍‌‍‌​‍‌‍‌‌‌‍‌​‌‍‍‌‌‌​‌‍‌​‍​‍‌‍‍‌‌‌​‌‍‌‌‌‍‌‌‌‌‌​‌‍‌‌​​‌‍‌‌‌​​‍‌‌‍​​‍‌‌​‌‌‌‌‌‌‌‌​‌‌‌​​‌​‍‌‌​‌‌​‌​‍‌​‌​‌‌‍‍‌​‌​​‌‌‌‌‌​‌‌‍‍‍‌‍‌‌‌‌‌‌‌​‌‌​‌​‍‌‍‍‌‌‌​‌‍‌‌‌‍‌‌​​‍‌​‍‌​‍‌​​​‌‍‍​‌‌​‍​‌​‌‌​‌​​​‍‌‌‍‌​​​‍​‌‌​​‌‍‍‌​‍‌‍‌‌‌‌‌​‌‌‍‌‌‌​‍‌‍‌‌‌‍‌​‌‍‍‌‌‌​​‍​‌‍‌‍‌‍‍‌‌‍‌‌‌‍​‌‍‌​‌‌​​‌‍​‌‌‌​‌‍‍​​‌‌‍​‍‌‍​‌‍‌‍‌‌‌‌​​‌‍‌​‌‌​‌​​‍‍​‌‌​‍‍‌‍‌‍‌‌‌‌‍​‌‍​‌‌‌‌​‌‍‍‌‌‌​‌‍​‌‍‌‌​‍​‍‌‌

April 6, 2024

Hi everyone, and welcome to Week 6 of my senior project! This week I tried out different options to acquire my patient dataset. As I mentioned last week, I found a Virtual Dental management software on Github but was not able to execute the files as I needed the Microsoft SQL (MSSQL) server. I started the week trying to install MSSQL but ran into problems that would prohibit me from accessing the patient data. So, let’s dive into the different paths I took!​​​​‌‍​‍​‍‌‍‌​‍‌‍‍‌‌‍‌‌‍‍‌‌‍‍​‍​‍​‍‍​‍​‍‌‍‌​‌‍​‌‌‌​‌‍‌‍​‌‍‌‌​​‍‍‌‍​‌‍‌‍‌​‍​‍​‍​​‍​‍‌‍‍​‌​‍‌‍‌‌‌‍‌‍​‍​‍​‍‍​‍​‍‌‍‍​‌‌​‌‌​‌​​‌​​‍‍​‍​‍‌‍​‍‌‍​‌‌​‌‍‍‌‌​​‍‍‌‍​‌‌‍‌​‌‍‌‌‍‍‌‌‍‍​‍‍‌‍‌​‌‍​‌‌‌​‌‍‌‍​‌‍‌‌​​‍‍‌‍​‌‍‌‍‌​‍‌‍‌‌‌‍‌​‌‍‍‌‌‌​‌‍‌​‍​‍‌‍‍‌‌‌​‌‍‌‌‌‍‌‌‌‌‌​‌‍‌‌​​‌‍‌‌‌​​‍‌‌‍​​‍‌‌​‌‌‌‌‌‌‌‌​‌‌‌​​‌​‍‌‌​‌‌​‌​‍‌​‌​‌‌‍‍‌​‌​​‌‌‌‌‌​‌‌‍‍‍‌‍‌‌‌‌‌‌‌​‌‌​‌​‍‌‍‍‌‌‌​‌‍‌‌‌‍‌‌​​‍‌​‍‌​‍‌​​​‌‍‍​‌‌​‍​‌​‌‌​‌​​​‍‌‌‍‌​​​‍​‌‌​​‌‍‍‌​‍‌‍‌‌‌‌‌​‌‌‍‌‌‌​‍‌‍‌‌‌‍‌​‌‍‍‌‌‌​​‍​‌‍‌‍‌‍‍‌‌‍‌‌‌‍​‌‍‌​‌‌​​‌‍​‌‌‌​‌‍‍​​‌‌‍​‍‌‍​‌‍‌‍‌‌‌‌​​‌‍‌​‌‌​‌​​‍‍​‌‌​‍‍‌‍​‌‌​‍‌‌​‌‍‍‌‌‍​‌‍​‌‍‌‌​‍​‍‌‌

Option 1: Installing MSSQL

I was facing issues with “Restricted Access” and licensing agreements while accessing the files on Terminal, so I needed to install MSSQL to use the patient management software. To do so, I installed Docker on my laptop but realized some potential problems as all the files would be running through Terminal. This makes it difficult to connect with Colab as I am executing the files on the cloud and not locally.

Therefore, I diverted my efforts to installing MSSQL on Amazon Web Services (AWS). This, however, was far too costly, and unfortunately proved that I couldn’t use the dataset on Github. While this was disappointing, I was determined to find an alternate way of acquiring my patient data.

Option 2: Using ChatGPT Directly

My next resort was to ask the GPT Builder to access specific databases. While there is no dataset for the model to refer to, I wanted to see if it could potentially learn from patient data. First, I configured my GPT to ask the user for their patient ID number before providing assistance. This proved that if prompted, the model could look for a patient ID in a sample dataset to find their medical history.

Additionally, this requires minimal programming as the model can access a dataset when prompted. The issue with this however is that OpenAI cannot access EHR data and therefore cannot be used in professional fields. This led me to my third option.

Option 3: Creating a Sample EHR Dataset

In this option, I will collaborate with Dr. Kalai, my external advisor, to create my own sample dataset and import it on Colab. This not only ensures accuracy of my model but also allows for more programmatic control as I can train the model with sample data and not just feed it data to refer to. This option provides access to a wider range of databases since I'm not limited to using only EHR data, enhancing the performance of my model in practical applications. For the GPTBuilder to access a dataset, it is necessary to establish a connection between Google Colab and the GPTBuilder.

Conclusion

Next week, I hope to have my sample dataset ready to go and connect the GPTBuilder with Colab. Thank you all so much for reading, and follow along to see if Option 3 worked for me! Please let me know if you have any questions!

Week 7: Word of Mouth​​​​‌‍​‍​‍‌‍‌​‍‌‍‍‌‌‍‌‌‍‍‌‌‍‍​‍​‍​‍‍​‍​‍‌‍‌​‌‍​‌‌‌​‌‍‌‍​‌‍‌‌​​‍‍‌‍​‌‍‌‍‌​‍​‍​‍​​‍​‍‌‍‍​‌​‍‌‍‌‌‌‍‌‍​‍​‍​‍‍​‍​‍‌‍‍​‌‌​‌‌​‌​​‌​​‍‍​‍​‍‌‍​‍‌‍​‌‌​‌‍‍‌‌​​‍‍‌‍​‌‌‍‌​‌‍‌‌‍‍‌‌‍‍​‍‍‌‍‌​‌‍​‌‌‌​‌‍‌‍​‌‍‌‌​​‍‍‌‍​‌‍‌‍‌​‍‌‍‌‌‌‍‌​‌‍‍‌‌‌​‌‍‌​‍​‍‌‍‍‌‌‌​‌‍‌‌‌‍‌‌‌‌‌​‌‍‌‌​​‌‍‌‌‌​​‍‌‌‍​​‍‌‌​‌‌‌‌‌‌‌‌​‌‌‌​​‌​‍‌‌​‌‌​‌​‍‌​‌​‌‌‍‍‌​‌​​‌‌‌‌‌​‌‌‍‍‍‌‍‌‌‌‌‌‌‌​‌‌​‌​‍‌‍‍‌‌‌​‌‍‌‌‌‍‌‌​​‍‌​‍‌​‍‌​​​‌‍‍​‌‌​‍​‌​‌‌​‌​​​‍‌‌‍‌​​​‍​‌‌​​‌‍‍‌​‍‌‍‌‌‌‌‌​‌‌‍‌‌‌​‍‌‍‌‌‌‍‌​‌‍‍‌‌‌​​‍​‌‍‌‍‌‍‍‌‌‍‌‌‌‍​‌‍‌​‌‌​​‌‍​‌‌‌​‌‍‍​​‌‌‍​‍‌‍​‌‍‌‍‌‌‌‌​​‌‍‌​‌‌​‌​​‍‍​‌‍​‍‍‌‍‌‍‌‌‌‌‍​‌‍​‌‌‌‌​‌‍‍‌‌‌​‌‍​‌‍‌‌​‍​‍‌‌

April 13, 2024

Hi everyone, and welcome to Week 7 of my senior project! As I mentioned last week, I would need to create my own dataset as I needed to install MSSQL to use the patient management software that I found on Github. Therefore, I needed to create my own sample dataset.​​​​‌‍​‍​‍‌‍‌​‍‌‍‍‌‌‍‌‌‍‍‌‌‍‍​‍​‍​‍‍​‍​‍‌‍‌​‌‍​‌‌‌​‌‍‌‍​‌‍‌‌​​‍‍‌‍​‌‍‌‍‌​‍​‍​‍​​‍​‍‌‍‍​‌​‍‌‍‌‌‌‍‌‍​‍​‍​‍‍​‍​‍‌‍‍​‌‌​‌‌​‌​​‌​​‍‍​‍​‍‌‍​‍‌‍​‌‌​‌‍‍‌‌​​‍‍‌‍​‌‌‍‌​‌‍‌‌‍‍‌‌‍‍​‍‍‌‍‌​‌‍​‌‌‌​‌‍‌‍​‌‍‌‌​​‍‍‌‍​‌‍‌‍‌​‍‌‍‌‌‌‍‌​‌‍‍‌‌‌​‌‍‌​‍​‍‌‍‍‌‌‌​‌‍‌‌‌‍‌‌‌‌‌​‌‍‌‌​​‌‍‌‌‌​​‍‌‌‍​​‍‌‌​‌‌‌‌‌‌‌‌​‌‌‌​​‌​‍‌‌​‌‌​‌​‍‌​‌​‌‌‍‍‌​‌​​‌‌‌‌‌​‌‌‍‍‍‌‍‌‌‌‌‌‌‌​‌‌​‌​‍‌‍‍‌‌‌​‌‍‌‌‌‍‌‌​​‍‌​‍‌​‍‌​​​‌‍‍​‌‌​‍​‌​‌‌​‌​​​‍‌‌‍‌​​​‍​‌‌​​‌‍‍‌​‍‌‍‌‌‌‌‌​‌‌‍‌‌‌​‍‌‍‌‌‌‍‌​‌‍‍‌‌‌​​‍​‌‍‌‍‌‍‍‌‌‍‌‌‌‍​‌‍‌​‌‌​​‌‍​‌‌‌​‌‍‍​​‌‌‍​‍‌‍​‌‍‌‍‌‌‌‌​​‌‍‌​‌‌​‌​​‍‍​‌‍​‍‍‌‍​‌‌​‍‌‌​‌‍‍‌‌‍​‌‍​‌‍‌‌​‍​‍‌‌

Columns Included

This week, I focused on figuring out the columns I would need to establish an accurate dataset. Since I can’t use actual patient data, I spoke with Dr. Kalai, my external advisor, to format my data so it is as accurate to an actual Electronic Health Record (EHR) as possible. During our meeting, I had the opportunity to learn more about what is included inside a patient’s file. Here are the categories:

PatientID | Name | DoB | Contact | AppointmentDate | MedicalHistory | Intra-oralExam | Extra-oralExam

Essentially, the PatientID column consists of a numerical sequence to identify each patient. Their AppointmentDate comprises of the date of their last scheduled appointment. MedicalHistory includes any past procedures that they’ve had, such as root canal treatments or wisdom tooth extraction. The Intra and Oral-Exam categories include any information on the patient’s oral health if there is anything worth noting such as dark pigmentation or issues with their lips.

During our conversation, I learned that a patient's medical history (outside of just oral history) is also included, which can consist of surgeries such as hip replacement, slipped disc, or a knee replacement. This is important because the dentist would want to make sure that they know of any metal in their body. If so, they would provide pre-medication which is an antibiotic given to the patient before their procedure.

I was also curious as to whether anything in the patient’s medical history could affect the treatment that they’re now receiving. I learned that any past surgeries that are worth noting, are included in the patient’s file through a color-coded system so that the dentist is aware of anything that could affect the treatment they are now receiving. For example, if a patient is pregant, this would be included in their file since it is recommended for them to get any dental work in their second trimester or six weeks after pregnancy. This is the safest period as the fetus is still developing in the first trimester and it’s fully developed in the third, so any procedures could also affect its health. Therefore, it is recommended that patients don’t perform an oral surgery within a certain period of time after performing another surgery.

New Patients

When asking Dr. Kalai how she handles patients whose medical history is not in the system, I learned that new patients must fill out a form that asks if they’ve had any procedures, whether dental or medical. This improves transparency between the patient and doctor as the doctor now knows of anything that could affect their oral health. Similarly, I plan on incorporating a similar system in my chatbot to reduce the amount of NaNs. If the patient’s ID number is found in the system but there is no data on their medical history, the chatbot will ask them to fill out a form to learn how to provide the best personalized treatments for their needs.

Conclusion

I am currently in the process of creating this dataset. Since the dataset I had previously created to run my basic dental chatbot consists of similar categories, I plan on adding onto it by adding the Intra and Extra-oral exam categories. That is all for this week! Thank you so much for reading and please let me know if you have any questio

Week 8: A Toothrific New Dataset​​​​‌‍​‍​‍‌‍‌​‍‌‍‍‌‌‍‌‌‍‍‌‌‍‍​‍​‍​‍‍​‍​‍‌‍‌​‌‍​‌‌‌​‌‍‌‍​‌‍‌‌​​‍‍‌‍​‌‍‌‍‌​‍​‍​‍​​‍​‍‌‍‍​‌​‍‌‍‌‌‌‍‌‍​‍​‍​‍‍​‍​‍‌‍‍​‌‌​‌‌​‌​​‌​​‍‍​‍​‍‌‍​‍‌‍​‌‌​‌‍‍‌‌​​‍‍‌‍​‌‌‍‌​‌‍‌‌‍‍‌‌‍‍​‍‍‌‍‌​‌‍​‌‌‌​‌‍‌‍​‌‍‌‌​​‍‍‌‍​‌‍‌‍‌​‍‌‍‌‌‌‍‌​‌‍‍‌‌‌​‌‍‌​‍​‍‌‍‍‌‌‌​‌‍‌‌‌‍‌‌‌‌‌​‌‍‌‌​​‌‍‌‌‌​​‍‌‌‍​​‍‌‌​‌‌‌‌‌‌‌‌​‌‌‌​​‌​‍‌‌​‌‌​‌​‍‌​‌​‌‌‍‍‌​‌​​‌‌‌‌‌​‌‌‍‍‍‌‍‌‌‌‌‌‌‌​‌‌​‌​‍‌‍‍‌‌‌​‌‍‌‌‌‍‌‌​​‍‌​‍‌​‍‌​​​‌‍‍​‌‌​‍​‌​‌‌​‌​​​‍‌‌‍‌​​​‍​‌‌​​‌‍‍‌​‍‌‍‌‌‌‌‌​‌‌‍‌‌‌​‍‌‍‌‌‌‍‌​‌‍‍‌‌‌​​‍​‌‍‌‍‌‍‍‌‌‍‌‌‌‍​‌‍‌​‌‌​​‌‍​‌‌‌​‌‍‍​​‌‌‍​‍‌‍​‌‍‌‍‌‌‌‌​​‌‍‌​‌‌​‌​​‍‍​‌​‍‍‌‍‌‍‌‌‌‌‍​‌‍​‌‌‌‌​‌‍‍‌‌‌​‌‍​‌‍‌‌​‍​‍‌‌

April 19, 2024

Hello everyone, and welcome to Week 8 of my Senior Project! This week, I worked on designing my patient dataset so let’s get into the categories and steps!​​​​‌‍​‍​‍‌‍‌​‍‌‍‍‌‌‍‌‌‍‍‌‌‍‍​‍​‍​‍‍​‍​‍‌‍‌​‌‍​‌‌‌​‌‍‌‍​‌‍‌‌​​‍‍‌‍​‌‍‌‍‌​‍​‍​‍​​‍​‍‌‍‍​‌​‍‌‍‌‌‌‍‌‍​‍​‍​‍‍​‍​‍‌‍‍​‌‌​‌‌​‌​​‌​​‍‍​‍​‍‌‍​‍‌‍​‌‌​‌‍‍‌‌​​‍‍‌‍​‌‌‍‌​‌‍‌‌‍‍‌‌‍‍​‍‍‌‍‌​‌‍​‌‌‌​‌‍‌‍​‌‍‌‌​​‍‍‌‍​‌‍‌‍‌​‍‌‍‌‌‌‍‌​‌‍‍‌‌‌​‌‍‌​‍​‍‌‍‍‌‌‌​‌‍‌‌‌‍‌‌‌‌‌​‌‍‌‌​​‌‍‌‌‌​​‍‌‌‍​​‍‌‌​‌‌‌‌‌‌‌‌​‌‌‌​​‌​‍‌‌​‌‌​‌​‍‌​‌​‌‌‍‍‌​‌​​‌‌‌‌‌​‌‌‍‍‍‌‍‌‌‌‌‌‌‌​‌‌​‌​‍‌‍‍‌‌‌​‌‍‌‌‌‍‌‌​​‍‌​‍‌​‍‌​​​‌‍‍​‌‌​‍​‌​‌‌​‌​​​‍‌‌‍‌​​​‍​‌‌​​‌‍‍‌​‍‌‍‌‌‌‌‌​‌‌‍‌‌‌​‍‌‍‌‌‌‍‌​‌‍‍‌‌‌​​‍​‌‍‌‍‌‍‍‌‌‍‌‌‌‍​‌‍‌​‌‌​​‌‍​‌‌‌​‌‍‍​​‌‌‍​‍‌‍​‌‍‌‍‌‌‌‌​​‌‍‌​‌‌​‌​​‍‍​‌​‍‍‌‍​‌‌​‍‌‌​‌‍‍‌‌‍​‌‍​‌‍‌‌​‍​‍‌‌

As I mentioned last week, after talking with Dr. Kalai, I added two more categories to my dataset: Intra-oral and Extra-oral Exam. Essentially, an intra-oral exam is anything that could be noted on the patient’s mouth, such as their bite (whether they have an overbite or underbite) or missing teeth. An extra-oral exam is anything worth noting outside of their oral hygiene, such as facial symmetry or lymph node palpitations.

Since the intra-oral exam category requires more in-depth details on the patient’s health, I split this up into four categories:

Visual Exam (Teeth) | Gum Health | Soft Tissues | Dental Charting

Visual Exam includes details on the patient’s teeth, such as if they have a cavity or an over/underbite. This includes anything a doctor can see with the naked eye or with an X-ray scan. The Gum Health column includes information on each patient’s gum history, such as gingivitis or periodontitis. Soft Tissues includes information on the patient’s lips, tongue, cheeks, throat, and the roof of their mouth. Some examples of the notes in this column are oral ulcers and Leukoplakia. Dental Charting includes any notes about the condition of each patient’s teeth and gums and whether they are currently or planning to undergo treatment.

Next, I included the Extra-oral exam category which includes any dentist’s observations about the structure of the patient’s mouth/face that are worth noting. This can include whether the patient is pregnant or has oral lesions. The main difference between intra and extra-oral examinations is that the former includes any observations on the patient’s mouth while the latter includes any abnormalities on their facial nerve assessment (including their necks, ears, and collarbone).

With these categories, I created a dataset with 40 patients and have begun training my model using an 80-20 split. Here is an overview of what my dataset looks like:

I don’t plan on using some of the classifying information such as the patient’s name or contact number as they do not change the outcome. Additionally, using these categories would affect the integrity of the chatbot as I want to ensure the patient’s privacy is protected.

Next week, I will report back on the accuracy of my model and whether it can read and understand my dataset successfully. Thank you all for reading, and please let me know if you have any questions!

Citations

Al-Helou, Noor. “The Extra Oral and Intra Oral Examination.” Nature News, Nature Publishing Group, 21 May 2021, www.nature.com/articles/s41407-021-0622-z.

Week 9: Root Access​​​​‌‍​‍​‍‌‍‌​‍‌‍‍‌‌‍‌‌‍‍‌‌‍‍​‍​‍​‍‍​‍​‍‌‍‌​‌‍​‌‌‌​‌‍‌‍​‌‍‌‌​​‍‍‌‍​‌‍‌‍‌​‍​‍​‍​​‍​‍‌‍‍​‌​‍‌‍‌‌‌‍‌‍​‍​‍​‍‍​‍​‍‌‍‍​‌‌​‌‌​‌​​‌​​‍‍​‍​‍‌‍​‍‌‍​‌‌​‌‍‍‌‌​​‍‍‌‍​‌‌‍‌​‌‍‌‌‍‍‌‌‍‍​‍‍‌‍‌​‌‍​‌‌‌​‌‍‌‍​‌‍‌‌​​‍‍‌‍​‌‍‌‍‌​‍‌‍‌‌‌‍‌​‌‍‍‌‌‌​‌‍‌​‍​‍‌‍‍‌‌‌​‌‍‌‌‌‍‌‌‌‌‌​‌‍‌‌​​‌‍‌‌‌​​‍‌‌‍​​‍‌‌​‌‌‌‌‌‌‌‌​‌‌‌​​‌​‍‌‌​‌‌​‌​‍‌​‌​‌‌‍‍‌​‌​​‌‌‌‌‌​‌‌‍‍‍‌‍‌‌‌‌‌‌‌​‌‌​‌​‍‌‍‍‌‌‌​‌‍‌‌‌‍‌‌​​‍‌​‍‌​‍‌​​​‌‍‍​‌‌​‍​‌​‌‌​‌​​​‍‌‌‍‌​​​‍​‌‌​​‌‍‍‌​‍‌‍‌‌‌‌‌​‌‌‍‌‌‌​‍‌‍‌‌‌‍‌​‌‍‍‌‌‌​​‍​‌‍‌‍‌‍‍‌‌‍‌‌‌‍​‌‍‌​‌‌​​‌‍​‌‌‌​‌‍‍​​‌‌‍​‍‌‍​‌‍‌‍‌‌‌‌​​‌‍‌​‌‌​‌​​‍‍​‍​​‍‍‌‍‌‍‌‌‌‌‍​‌‍​‌‌‌‌​‌‍‍‌‌‌​‌‍​‌‍‌‌​‍​‍‌‌

April 27, 2024

Hi everyone, and welcome to Week 9 of my senior project! I’m so excited to share this week’s updates as my custom GPT is almost complete. This week, I fed my data into the large language model so that my model would be able to provide assistance in context. So, let’s get into it!​​​​‌‍​‍​‍‌‍‌​‍‌‍‍‌‌‍‌‌‍‍‌‌‍‍​‍​‍​‍‍​‍​‍‌‍‌​‌‍​‌‌‌​‌‍‌‍​‌‍‌‌​​‍‍‌‍​‌‍‌‍‌​‍​‍​‍​​‍​‍‌‍‍​‌​‍‌‍‌‌‌‍‌‍​‍​‍​‍‍​‍​‍‌‍‍​‌‌​‌‌​‌​​‌​​‍‍​‍​‍‌‍​‍‌‍​‌‌​‌‍‍‌‌​​‍‍‌‍​‌‌‍‌​‌‍‌‌‍‍‌‌‍‍​‍‍‌‍‌​‌‍​‌‌‌​‌‍‌‍​‌‍‌‌​​‍‍‌‍​‌‍‌‍‌​‍‌‍‌‌‌‍‌​‌‍‍‌‌‌​‌‍‌​‍​‍‌‍‍‌‌‌​‌‍‌‌‌‍‌‌‌‌‌​‌‍‌‌​​‌‍‌‌‌​​‍‌‌‍​​‍‌‌​‌‌‌‌‌‌‌‌​‌‌‌​​‌​‍‌‌​‌‌​‌​‍‌​‌​‌‌‍‍‌​‌​​‌‌‌‌‌​‌‌‍‍‍‌‍‌‌‌‌‌‌‌​‌‌​‌​‍‌‍‍‌‌‌​‌‍‌‌‌‍‌‌​​‍‌​‍‌​‍‌​​​‌‍‍​‌‌​‍​‌​‌‌​‌​​​‍‌‌‍‌​​​‍​‌‌​​‌‍‍‌​‍‌‍‌‌‌‌‌​‌‌‍‌‌‌​‍‌‍‌‌‌‍‌​‌‍‍‌‌‌​​‍​‌‍‌‍‌‍‍‌‌‍‌‌‌‍​‌‍‌​‌‌​​‌‍​‌‌‌​‌‍‍​​‌‌‍​‍‌‍​‌‍‌‍‌‌‌‌​​‌‍‌​‌‌​‌​​‍‍​‍​​‍‍‌‍​‌‌​‍‌‌​‌‍‍‌‌‍​‌‍​‌‍‌‌​‍​‍‌‌

Experimenting with the Dataset

My first step to put the data in context was to feed my sample dataset into the custom GPT. However, this proved to be unsuccessful as OpenAI restricts its users from using the GPT to read datasets directly due to lack of confidentiality. This led me to manually input my dataset and have the model provide an overview of each patient’s medical history in a readable format. (I can’t provide pictures right now as I have reached my GPT-4 limit but I’ll make sure to do that when the limit time is over.)

As I mentioned a couple of weeks ago, I configured the model to ask the user for their patient ID number. However, there was no way for it to confirm whether their ID is valid as there was no dataset for it to refer to. Which is why when I fed the data into the chatbot, I ensured that it would look for the patient’s ID number within the patient information I provided. So now, my model is able to put this information in context and keep their medical history in mind while providing treatments.

NaN

This raises the question: What if the patient’s ID number or medical history isn’t included in the system? To further my project’s goal of making oral care accessible to more communities, my model still helps the user by inquiring more on their issue and issuing immediate remedies.

During my last talk with Dr. Kalai, I gained insight into how she handles new patients and was informed that if there is no data on their medical history, patients must fill out a medical examination form. I plan to use a similar system by asking the user questions such as: Have you had any surgeries or Do you have/ plan to have any metal objects in your body?

SQL

Manually inputting the dataset would be ineffective since when implementing this project in the real world, it would require a lot of manpower as we are exposed to large amounts of information. To ease this potential problem, I plan on feeding in the data using either Llamaindex or PostgreSQL and then connecting this with ChatGPT using my API key.

After selecting the database, I plan on training and testing my model to predict the dental charting. The model will look at each patient’s information (medical history, intra, and extra oral exams) to predict the treatment they will need.

Follow along to see which database works and whether I am able to successfully connect my model with the dataset. Thank you all so much for reading and see you next week! Please let me know if you have any questions.

Citations

Seabra, Antony. “Unleashing the Power of Knowledge: Connecting Chatgpt to Databases for Advanced Question-Answering...” Medium, Medium, 10 Aug. 2023, medium.com/@antonyseabra/unleashing-the-power-of-knowledge-connecting-chatgpt-to-databases-for-advanced-question-answering-8dfe5f140b1b.

Week 10: Tooth Be Told...​​​​‌‍​‍​‍‌‍‌​‍‌‍‍‌‌‍‌‌‍‍‌‌‍‍​‍​‍​‍‍​‍​‍‌‍‌​‌‍​‌‌‌​‌‍‌‍​‌‍‌‌​​‍‍‌‍​‌‍‌‍‌​‍​‍​‍​​‍​‍‌‍‍​‌​‍‌‍‌‌‌‍‌‍​‍​‍​‍‍​‍​‍‌‍‍​‌‌​‌‌​‌​​‌​​‍‍​‍​‍‌‍​‍‌‍​‌‌​‌‍‍‌‌​​‍‍‌‍​‌‌‍‌​‌‍‌‌‍‍‌‌‍‍​‍‍‌‍‌​‌‍​‌‌‌​‌‍‌‍​‌‍‌‌​​‍‍‌‍​‌‍‌‍‌​‍‌‍‌‌‌‍‌​‌‍‍‌‌‌​‌‍‌​‍​‍‌‍‍‌‌‌​‌‍‌‌‌‍‌‌‌‌‌​‌‍‌‌​​‌‍‌‌‌​​‍‌‌‍​​‍‌‌​‌‌‌‌‌‌‌‌​‌‌‌​​‌​‍‌‌​‌‌​‌​‍‌​‌​‌‌‍‍‌​‌​​‌‌‌‌‌​‌‌‍‍‍‌‍‌‌‌‌‌‌‌​‌‌​‌​‍‌‍‍‌‌‌​‌‍‌‌‌‍‌‌​​‍‌​‍‌​‍‌​​​‌‍‍​‌‌​‍​‌​‌‌​‌​​​‍‌‌‍‌​​​‍​‌‌​​‌‍‍‌​‍‌‍‌‌‌‌‌​‌‌‍‌‌‌​‍‌‍‌‌‌‍‌​‌‍‍‌‌‌​​‍​‌‍‌‍‌‍‍‌‌‍‌‌‌‍​‌‍‌​‌‌​​‌‍​‌‌‌​‌‍‍​​‌‌‍​‍‌‍​‌‍‌‍‌‌‌‌​​‌‍‌​‌‌​‌​​‍‍​‍‌​‍‍‌‍‌‍‌‌‌‌‍​‌‍​‌‌‌‌​‌‍‍‌‌‌​‌‍​‌‍‌‌​‍​‍‌‌

May 3, 2024

Hi everyone, and welcome to Week 10 of my senior project! I would like to share some major updates on my virtual dentist chatbot as I was finally able to connect my GPT with my dataset. So, let’s get into it!​​​​‌‍​‍​‍‌‍‌​‍‌‍‍‌‌‍‌‌‍‍‌‌‍‍​‍​‍​‍‍​‍​‍‌‍‌​‌‍​‌‌‌​‌‍‌‍​‌‍‌‌​​‍‍‌‍​‌‍‌‍‌​‍​‍​‍​​‍​‍‌‍‍​‌​‍‌‍‌‌‌‍‌‍​‍​‍​‍‍​‍​‍‌‍‍​‌‌​‌‌​‌​​‌​​‍‍​‍​‍‌‍​‍‌‍​‌‌​‌‍‍‌‌​​‍‍‌‍​‌‌‍‌​‌‍‌‌‍‍‌‌‍‍​‍‍‌‍‌​‌‍​‌‌‌​‌‍‌‍​‌‍‌‌​​‍‍‌‍​‌‍‌‍‌​‍‌‍‌‌‌‍‌​‌‍‍‌‌‌​‌‍‌​‍​‍‌‍‍‌‌‌​‌‍‌‌‌‍‌‌‌‌‌​‌‍‌‌​​‌‍‌‌‌​​‍‌‌‍​​‍‌‌​‌‌‌‌‌‌‌‌​‌‌‌​​‌​‍‌‌​‌‌​‌​‍‌​‌​‌‌‍‍‌​‌​​‌‌‌‌‌​‌‌‍‍‍‌‍‌‌‌‌‌‌‌​‌‌​‌​‍‌‍‍‌‌‌​‌‍‌‌‌‍‌‌​​‍‌​‍‌​‍‌​​​‌‍‍​‌‌​‍​‌​‌‌​‌​​​‍‌‌‍‌​​​‍​‌‌​​‌‍‍‌​‍‌‍‌‌‌‌‌​‌‌‍‌‌‌​‍‌‍‌‌‌‍‌​‌‍‍‌‌‌​​‍​‌‍‌‍‌‍‍‌‌‍‌‌‌‍​‌‍‌​‌‌​​‌‍​‌‌‌​‌‍‍​​‌‌‍​‍‌‍​‌‍‌‍‌‌‌‌​​‌‍‌​‌‌​‌​​‍‍​‍‌​‍‍‌‍​‌‌​‍‌‌​‌‍‍‌‌‍​‌‍​‌‍‌‌​‍​‍‌‌

Using SQL

As I mentioned last week, I wanted to use either PostgreSQL or LlammaIdex to connect to a database. This would ensure that the GPT is referring to my custom-made data set. One crucial step of doing so is loading my custom GPT model. While I was doing this, I imported a transformers library but ran into similar problems that occurred in the past as I had to load my GPT model locally (which GPT-4 isn’t trained to do), which meant that I couldn’t use a GPT4 tokenizer.

A (Different?) Approach

As a last resort, while configuring my chatbot, I tried uploading my dataset and asked my model to use it as a reference point when reading patient information. And this worked! My chatbot was now successfully able to ask for the patient’s ID number AND use their ID as a source to their medical history, intra-oral exams, and extra-oral exams. The chatbot asks the user for their ID number and refers to the patient sample data.

What does this mean? So now, when a patient provides their stated problem, my model will keep in mind any factors that are included in their medical history when providing oral-care tips. Here is an overview of the steps the GPT takes to provide tips.

Finalizing my Model

As some final steps, I will work on refining my model and create a new patient questionnaire for patients to fill out if they’re new to the clinic or if their medical history isn’t included in the system. I’ll work on this during the next week so stay tuned to find out how more users can use my project for oral-health.

Thanks for reading and please let me know if you have any questions! See you next week!

Week 11: Buccal Up!​​​​‌‍​‍​‍‌‍‌​‍‌‍‍‌‌‍‌‌‍‍‌‌‍‍​‍​‍​‍‍​‍​‍‌‍‌​‌‍​‌‌‌​‌‍‌‍​‌‍‌‌​​‍‍‌‍​‌‍‌‍‌​‍​‍​‍​​‍​‍‌‍‍​‌​‍‌‍‌‌‌‍‌‍​‍​‍​‍‍​‍​‍‌‍‍​‌‌​‌‌​‌​​‌​​‍‍​‍​‍‌‍​‍‌‍​‌‌​‌‍‍‌‌​​‍‍‌‍​‌‌‍‌​‌‍‌‌‍‍‌‌‍‍​‍‍‌‍‌​‌‍​‌‌‌​‌‍‌‍​‌‍‌‌​​‍‍‌‍​‌‍‌‍‌​‍‌‍‌‌‌‍‌​‌‍‍‌‌‌​‌‍‌​‍​‍‌‍‍‌‌‌​‌‍‌‌‌‍‌‌‌‌‌​‌‍‌‌​​‌‍‌‌‌​​‍‌‌‍​​‍‌‌​‌‌‌‌‌‌‌‌​‌‌‌​​‌​‍‌‌​‌‌​‌​‍‌​‌​‌‌‍‍‌​‌​​‌‌‌‌‌​‌‌‍‍‍‌‍‌‌‌‌‌‌‌​‌‌​‌​‍‌‍‍‌‌‌​‌‍‌‌‌‍‌‌​​‍‌​‍‌​‍‌​​​‌‍‍​‌‌​‍​‌​‌‌​‌​​​‍‌‌‍‌​​​‍​‌‌​​‌‍‍‌​‍‌‍‌‌‌‌‌​‌‌‍‌‌‌​‍‌‍‌‌‌‍‌​‌‍‍‌‌‌​​‍​‌‍‌‍‌‍‍‌‌‍‌‌‌‍​‌‍‌​‌‌​​‌‍​‌‌‌​‌‍‍​​‌‌‍​‍‌‍​‌‍‌‍‌‌‌‌​​‌‍‌​‌‌​‌​​‍‍​​‌​​​​‍‍‌‍‌‍‌‌‌‌‍​‌‍​‌‌‌‌​‌‍‍‌‌‌​‌‍​‌‍‌‌​‍​‍‌‌

May 10, 2024

Hi everyone, and welcome to Week 11 of my senior project! As we reach our final stretch of this project, I would like to share this week’s updates and the steps to refine my model. So, let’s get into it!​​​​‌‍​‍​‍‌‍‌​‍‌‍‍‌‌‍‌‌‍‍‌‌‍‍​‍​‍​‍‍​‍​‍‌‍‌​‌‍​‌‌‌​‌‍‌‍​‌‍‌‌​​‍‍‌‍​‌‍‌‍‌​‍​‍​‍​​‍​‍‌‍‍​‌​‍‌‍‌‌‌‍‌‍​‍​‍​‍‍​‍​‍‌‍‍​‌‌​‌‌​‌​​‌​​‍‍​‍​‍‌‍​‍‌‍​‌‌​‌‍‍‌‌​​‍‍‌‍​‌‌‍‌​‌‍‌‌‍‍‌‌‍‍​‍‍‌‍‌​‌‍​‌‌‌​‌‍‌‍​‌‍‌‌​​‍‍‌‍​‌‍‌‍‌​‍‌‍‌‌‌‍‌​‌‍‍‌‌‌​‌‍‌​‍​‍‌‍‍‌‌‌​‌‍‌‌‌‍‌‌‌‌‌​‌‍‌‌​​‌‍‌‌‌​​‍‌‌‍​​‍‌‌​‌‌‌‌‌‌‌‌​‌‌‌​​‌​‍‌‌​‌‌​‌​‍‌​‌​‌‌‍‍‌​‌​​‌‌‌‌‌​‌‌‍‍‍‌‍‌‌‌‌‌‌‌​‌‌​‌​‍‌‍‍‌‌‌​‌‍‌‌‌‍‌‌​​‍‌​‍‌​‍‌​​​‌‍‍​‌‌​‍​‌​‌‌​‌​​​‍‌‌‍‌​​​‍​‌‌​​‌‍‍‌​‍‌‍‌‌‌‌‌​‌‌‍‌‌‌​‍‌‍‌‌‌‍‌​‌‍‍‌‌‌​​‍​‌‍‌‍‌‍‍‌‌‍‌‌‌‍​‌‍‌​‌‌​​‌‍​‌‌‌​‌‍‍​​‌‌‍​‍‌‍​‌‍‌‍‌‌‌‌​​‌‍‌​‌‌​‌​​‍‍​​‌​​​​‍‍‌‍​‌‌​‍‌‌​‌‍‍‌‌‍​‌‍​‌‍‌‌​‍​‍‌‌

Making my Model More Secure

As I was testing out my chatbot, I realized that it is not that hard for anyone to get lucky and input a patient ID number that is in the system. Once they input an ID number and it is found, the patient now has access to their patient information, which includes confidential information such as their medical history and birthday.

In order to solve this issue, I went back to my sample patient dataset and created another column named Patient PIN Number. This means that every patient is assigned a six digit number that they would have to memorize in order to confirm their identity.

However, while testing out this new method, I ran into a bug where if the user inputs any PIN found in the system (not just that specific patient’s), it would still work and the chatbot will assume that the patient is authorized. To debug this problem, I configured the chatbot to only authorize the patient if and only if the PIN corresponds to the ID number.

Essentially, after the user inputs a patient ID that is in the system, the chatbot will ask them to type in the corresponding PIN number. If the PIN number is typed in wrong more than 3 times, the chatbot will end the session. This ensures a more secure way of protecting the patient’s privacy and ensuring that someone else is getting access to confidential information.

New Patient Questionnaire

As I mentioned last week, I wanted to mimic a new patient questionnaire for anyone using my chatbot who isn’t included in the system. This will ensure that the chatbot has a sense of anything that might affect their treatments before providing them with any oral care tips.

This is a section of the questionnaire:

If the user states that they are new or if they input an ID number that isn’t in the system, the chatbot will refer them to this questionnaire. Once they fill it out, they will need to input it back into the chatbot and my model will be able to learn from their symptoms and medical history to provide them with the best possible treatment for their stated problem.

Final Product

Over the next week, while continuously regulating my model, I plan to integrate my model into a website. The website will be a mock-up for dental professionals to use if needed. Stay tuned to find out what my website looks like! Thanks for reading and please let me know if you have any questions!

Week 12: Love at First Bite​​​​‌‍​‍​‍‌‍‌​‍‌‍‍‌‌‍‌‌‍‍‌‌‍‍​‍​‍​‍‍​‍​‍‌‍‌​‌‍​‌‌‌​‌‍‌‍​‌‍‌‌​​‍‍‌‍​‌‍‌‍‌​‍​‍​‍​​‍​‍‌‍‍​‌​‍‌‍‌‌‌‍‌‍​‍​‍​‍‍​‍​‍‌‍‍​‌‌​‌‌​‌​​‌​​‍‍​‍​‍‌‍​‍‌‍​‌‌​‌‍‍‌‌​​‍‍‌‍​‌‌‍‌​‌‍‌‌‍‍‌‌‍‍​‍‍‌‍‌​‌‍​‌‌‌​‌‍‌‍​‌‍‌‌​​‍‍‌‍​‌‍‌‍‌​‍‌‍‌‌‌‍‌​‌‍‍‌‌‌​‌‍‌​‍​‍‌‍‍‌‌‌​‌‍‌‌‌‍‌‌‌‌‌​‌‍‌‌​​‌‍‌‌‌​​‍‌‌‍​​‍‌‌​‌‌‌‌‌‌‌‌​‌‌‌​​‌​‍‌‌​‌‌​‌​‍‌​‌​‌‌‍‍‌​‌​​‌‌‌‌‌​‌‌‍‍‍‌‍‌‌‌‌‌‌‌​‌‌​‌​‍‌‍‍‌‌‌​‌‍‌‌‌‍‌‌​​‍‌​‍‌​‍‌​​​‌‍‍​‌‌​‍​‌​‌‌​‌​​​‍‌‌‍‌​​​‍​‌‌​​‌‍‍‌​‍‌‍‌‌‌‌‌​‌‌‍‌‌‌​‍‌‍‌‌‌‍‌​‌‍‍‌‌‌​​‍​‌‍‌‍‌‍‍‌‌‍‌‌‌‍​‌‍‌​‌‌​​‌‍​‌‌‌​‌‍‍​​‌‌‍​‍‌‍​‌‍‌‍‌‌‌‌​​‌‍‌​‌‌​‌​​‍‍​​‌​​‌​‍‍‌‍‌‍‌‌‌‌‍​‌‍​‌‌‌‌​‌‍‍‌‌‌​‌‍​‌‍‌‌​‍​‍‌‌

May 22, 2024

Hi everyone, and welcome to the final week of my senior project (and sadly, my last week of dental puns)! Thank you all so much for watching my presentation and following along with my project. For those of you who were unable to attend senior project presentations last Saturday, I have included a video of my presentation if you would like to watch it!​​​​‌‍​‍​‍‌‍‌​‍‌‍‍‌‌‍‌‌‍‍‌‌‍‍​‍​‍​‍‍​‍​‍‌‍‌​‌‍​‌‌‌​‌‍‌‍​‌‍‌‌​​‍‍‌‍​‌‍‌‍‌​‍​‍​‍​​‍​‍‌‍‍​‌​‍‌‍‌‌‌‍‌‍​‍​‍​‍‍​‍​‍‌‍‍​‌‌​‌‌​‌​​‌​​‍‍​‍​‍‌‍​‍‌‍​‌‌​‌‍‍‌‌​​‍‍‌‍​‌‌‍‌​‌‍‌‌‍‍‌‌‍‍​‍‍‌‍‌​‌‍​‌‌‌​‌‍‌‍​‌‍‌‌​​‍‍‌‍​‌‍‌‍‌​‍‌‍‌‌‌‍‌​‌‍‍‌‌‌​‌‍‌​‍​‍‌‍‍‌‌‌​‌‍‌‌‌‍‌‌‌‌‌​‌‍‌‌​​‌‍‌‌‌​​‍‌‌‍​​‍‌‌​‌‌‌‌‌‌‌‌​‌‌‌​​‌​‍‌‌​‌‌​‌​‍‌​‌​‌‌‍‍‌​‌​​‌‌‌‌‌​‌‌‍‍‍‌‍‌‌‌‌‌‌‌​‌‌​‌​‍‌‍‍‌‌‌​‌‍‌‌‌‍‌‌​​‍‌​‍‌​‍‌​​​‌‍‍​‌‌​‍​‌​‌‌​‌​​​‍‌‌‍‌​​​‍​‌‌​​‌‍‍‌​‍‌‍‌‌‌‌‌​‌‌‍‌‌‌​‍‌‍‌‌‌‍‌​‌‍‍‌‌‌​​‍​‌‍‌‍‌‍‍‌‌‍‌‌‌‍​‌‍‌​‌‌​​‌‍​‌‌‌​‌‍‍​​‌‌‍​‍‌‍​‌‍‌‍‌‌‌‌​​‌‍‌​‌‌​‌​​‍‍​​‌​​‌​‍‍‌‍​‌‌​‍‌‌​‌‍‍‌‌‍​‌‍​‌‍‌‌​‍​‍‌‌

Link to video!

Making the Website

As I mention in the video, I plan on creating a mock-up website that includes a link to my custom GPT. Here is the link to this website: https://aadyas-vd.webflow.io/.

The first step to integrate my chatbot was to use Chatbase. I first inputted my GPT’s configurations into chatbase and fed it my sample dataset. Using Chatbase also allows me to change this dataset so if I need to update the data or replace it with new data, I can just manually input the new dataset. Next, I used Webflow to actually create my mock-up website and once my website was created, I embedded a link to the Chatbase chatbot.

Conclusion

These last 12 weeks have been an amazing experience and I was able to learn so much from working on this project. I loved having this opportunity to put this idea into life and I am looking forward to seeing how this product plays out in real life. I would like to thank my advisors, Ms. Bhattacharya and Dr. Kalai for all their help and for supporting me throughout this project.

Thank you all so much for following along and please let me know if you have any questions!