Welcome to the MedChat repository! This project focuses on optimizing contextual augmentation for generative AI performance in medical chatbot responses. Specifically, it explores the use of large language models (LLMs) to answer questions related to theranostics and nuclear medicine. The LLMs used in this experiment are:
- GPT-4
- GPT-4o
- Gemini 1.5
- Claude 3 Opus
- Command R+
The repository is organized into the following main directories:
- Evaluation
- NoContext
- WithContext
In the NoContext directory, you will find the answers provided by the LLMs without any additional context. These responses are generated purely based on the pre-trained knowledge of the models.
The WithContext directory is further divided into two subdirectories: NaiveRAG and AdvancedRAG.
-
NaiveRAG: This subdirectory contains the answers generated by the LLMs using additional context files from the
context_filesfolder. These context files provide supplementary information to help the models generate more accurate responses. -
AdvancedRAG: In addition to the context files, the AdvancedRAG approach incorporates advanced techniques such as HyDE and LLM reranking to refine the answers further.
The Evaluation directory contains scripts and results for evaluating the performance of the LLM-generated answers. We used the Tonic Validate framework to evaluate the answers according to several metrics, ensuring a comprehensive assessment of the model performance.
To use this repository, follow these steps:
-
Clone the repository:
git clone https://github.com/piakoller/MedChat.git cd MedChat -
Explore the datasets:
- The
Evaluation-Questions.csvfile contains the questions related to theranostics and nuclear medicine. - The
context_filesfolder contains additional context documents used for theWithContextapproaches.
- The
-
Review the answers:
- Answers generated without context can be found in the
NoContext/csv-NoContextfolder. - Context-augmented answers are available in the
WithContext/NaiveRAG/csv-NaiveRAGandWithContext/AdvancedRAG/csv-AdvancedRAGfolders.
- Answers generated without context can be found in the
-
Evaluate the models:
- Navigate to the
Evaluationfolder to see the evaluation scripts and results using the Tonic Validate framework.
- Navigate to the
We hope you find this repository useful for your research and development in the field of medical chatbots and generative AI. If you have any questions or need further assistance, please don't hesitate to contact us.
Happy coding!