## 3 Results and Discussion
Notably, RF had the lowest recall (0.49), indicating that many TB cases were misclassified as other diseases. This could be due to TB's long incubation period and overlapping symptoms with RTI, making it harder for the model to distinguish. The Random Forest model was chosen due to its balance between interpretability and diagnostic performance. While RF models operate based on simple logical rules, their ensemble nature helps improve prediction reliability. To mitigate potential inconsistencies in rule-based decision-making, we incorporated explainability techniques such as LIME to ensure transparency and provide insights into model decisions. Regarding model performance, while the F1 score for malaria was 88%, some diseases such as HIV/AIDS (51%) and tuberculosis (60%) had lower scores. It is important to note that AI-based diagnostic tools are not meant to replace professional diagnoses but rather to assist healthcare practitioners by highlighting potential conditions based on patient symptoms. Lower F1 scores in certain categories suggest that additional improvements such as data augmentation and hyperparameter optimization could further enhance performance. Future work will focus on refining the model to improve predictive stability and increase the reliability of diagnoses for diseases with lower performance metrics. A Model Interpretability Framework (MIF) was incorporated into the diagnostic system to address the vital need for explainability and transparency in disease diagnosis. The LIME framework and LLM (ChatGPT) were selected for their ability to provide intuitive visual and textual explanations of model decisions. By applying LIME to the Random Forest model, it became clear how particular symptoms influenced the diagnostic predictions. By applying LIME to the test subset and locally approximating the model with an interpretable substitute model, this study was able to identify important symptoms that influenced the model's diagnoses for particular instances, as illustrated in Figures 7-9 for the three models. How much each symptom contributed to the final diagnosis is shown by the length of the bars. The diagnosis is moved into the positive class, which is the presence of disease, by the symptoms on the right, and into the negative class, which is the absence of a disease, by the symptoms on the left. This makes it possible for medical professionals to comprehend the logic behind predictions, and the system promotes adoption, builds trust, and facilitates well-informed decision-making. Figure 8: LIME explanation for the XGBoost model, highlighting the most influential symptoms in the model’s decision-making process. Figure 7: LIME explanation for the MLP model, illustrating the contribution of different symptoms to the model’s diagnostic decision. Figure 9: LIME explanation for the RF model, showing the impact of different symptoms on the model’s diagnostic predictions. Complex diagnostic outputs were translated into natural language using ChatGPT via its API. Since the development environment was based on Python, the OpenAI API was integrated into the system to automate this process. As shown in Table 6, a structured prompt was generated using the LIME model's diagnosed illnesses, patient symptoms, and their contributions to the diagnosis. This prompt was formatted as a JSON object and sent to the ChatGPT API for processing. The API returned an explanation of the diagnosis, highlighting key contributing symptoms and their respective influences. The minimum requirements for this basic app are an Android OS version 4.0 or higher, 4 GB of RAM (at least 2 GB), 8 GB of ROM, a portrait display layout, and an Internet connection. The healthcare worker can create an account following a successful installation. Once an account has been created, the system administrator must confirm the healthcare worker's information before sending the password to the healthcare worker's email address so they can log in. The healthcare professional logs into the system using their email address and password.