Update README.md
Browse files
README.md
CHANGED
|
@@ -7,59 +7,103 @@ license: mit
|
|
| 7 |
language:
|
| 8 |
- en
|
| 9 |
metrics:
|
| 10 |
-
-
|
| 11 |
-
-
|
| 12 |
-
-
|
|
|
|
|
|
|
| 13 |
---
|
| 14 |
|
| 15 |
-
# π₯ First Aid
|
| 16 |
|
| 17 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 18 |
|
| 19 |
## π’ **Ownership and Attribution**
|
| 20 |
> **β οΈ Disclaimer:**
|
| 21 |
> - The **First Aid Assistant chatbot** is the property of **Mysore Medical College and Research Institute**.
|
| 22 |
-
> - The uploaded **FIRST AID PDF** that forms the basis of the Retrieval-Augmented Generation (RAG) process is an **official course material** and the property of **Mysore Medical College and Research Institute**.
|
| 23 |
|
| 24 |
---
|
| 25 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 26 |
## π Evaluation Metrics
|
| 27 |
-
The chatbot's responses were evaluated using **
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 28 |
|
| 29 |
-
|
| 30 |
-
|-----------|--------|
|
| 31 |
-
| Precision | **1.00** |
|
| 32 |
-
| Recall | **1.00** |
|
| 33 |
-
| F1 Score | **1.00** |
|
| 34 |
|
| 35 |
-
|
| 36 |
|
| 37 |
## π Evaluation Visualization
|
| 38 |
-
|
|
|
|
|
|
|
| 39 |
|
| 40 |
-

|
| 41 |
|
| 42 |
---
|
| 43 |
|
| 44 |
-
## π
|
| 45 |
-
- Used **
|
| 46 |
-
- Evaluated on **10 first-aid-related questions** covering:
|
| 47 |
-
- High fever in infants
|
| 48 |
-
- Low blood sugar treatment
|
| 49 |
-
- First-aid steps for burns, seizures, choking, etc.
|
| 50 |
-
- **Expected answers** were sourced from medical literature.
|
| 51 |
|
| 52 |
---
|
| 53 |
|
| 54 |
-
## π₯
|
| 55 |
You can **re-evaluate the chatbot** by running the following:
|
| 56 |
|
| 57 |
```
|
| 58 |
git clone https://huggingface.co/DrSyedFaizan/First_Aid_Assistant_Evaluation
|
| 59 |
cd First_Aid_Assistant_Evaluation
|
| 60 |
-
python eval.py
|
| 61 |
```
|
| 62 |
|
| 63 |
-
|
| 64 |
-
|
| 65 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 7 |
language:
|
| 8 |
- en
|
| 9 |
metrics:
|
| 10 |
+
- faithfulness
|
| 11 |
+
- answer_relevancy
|
| 12 |
+
- context_recall
|
| 13 |
+
- answer_correctness
|
| 14 |
+
- semantic_similarity
|
| 15 |
---
|
| 16 |
|
| 17 |
+
# π₯ First Aid Tutor
|
| 18 |
|
| 19 |
+

|
| 20 |
+
|
| 21 |
+
## π About the Project
|
| 22 |
+
First Aid Tutor is an **AI-powered chatbot** designed to evaluate the efficacy of **Retrieval-Augmented Generation (RAG)** in medical education for paramedical and medical students. It provides **first-aid guidance** based on medical literature to assess learning outcomes and response accuracy.
|
| 23 |
+
|
| 24 |
+
This repository contains the **codebase** for the **First Aid Assistant** chatbot, tested on **10 first-aid-related questions**.
|
| 25 |
|
| 26 |
## π’ **Ownership and Attribution**
|
| 27 |
> **β οΈ Disclaimer:**
|
| 28 |
> - The **First Aid Assistant chatbot** is the property of **Mysore Medical College and Research Institute**.
|
| 29 |
+
> - The uploaded **FIRST AID PDF** that forms the basis of the **Retrieval-Augmented Generation (RAG)** process is an **official course material** and the property of **Mysore Medical College and Research Institute**.
|
| 30 |
|
| 31 |
---
|
| 32 |
|
| 33 |
+
# π First Aid Tutor - RAG Chatbot
|
| 34 |
+
|
| 35 |
+
The **First Aid Tutor** is a **Retrieval-Augmented Generation (RAG)** chatbot designed to assist **medical and paramedical students** in learning **first-aid protocols**. It is strictly trained on a **verified first-aid guide** and only provides information present in the **First Aid PDF**.
|
| 36 |
+
|
| 37 |
+
## π― Features
|
| 38 |
+
β
**Evidence-Based Responses** - The chatbot only retrieves and generates answers based on the **First Aid PDF**.
|
| 39 |
+
β
**User-Friendly Interface** - Developed using **Gradio**, featuring a modern and intuitive UI.
|
| 40 |
+
β
**Medical Education Research** - Used for evaluating **RAG efficacy in medical education**.
|
| 41 |
+
|
| 42 |
+
## π¬ How It Works
|
| 43 |
+
- Uses **TF-IDF + Cosine Similarity** for retrieving contextually relevant information.
|
| 44 |
+
- Queries are answered based strictly on **verified medical content**.
|
| 45 |
+
- Integrated with **Gradio UI** for an easy-to-use chatbot experience.
|
| 46 |
+
|
| 47 |
+
## π Live Demo
|
| 48 |
+
π **[Try the First Aid Tutor Chatbot](https://huggingface.co/spaces/DrSyedFaizan/First_Aid_Assistant)**
|
| 49 |
+
|
| 50 |
+
## π₯ How to Run Locally
|
| 51 |
+
You can run the chatbot locally using the following commands:
|
| 52 |
+
|
| 53 |
+
```
|
| 54 |
+
git clone https://github.com/SYEDFAIZAN1987/First-Aid-Tutor
|
| 55 |
+
cd First-Aid-Tutor
|
| 56 |
+
pip install -r requirements.txt
|
| 57 |
+
python raggpt.py
|
| 58 |
+
```
|
| 59 |
## π Evaluation Metrics
|
| 60 |
+
The chatbot's responses were evaluated using **faithfulness, answer relevancy, context recall, answer correctness, and semantic similarity**.
|
| 61 |
+
|
| 62 |
+
| Metric | Score |
|
| 63 |
+
|----------------------|--------|
|
| 64 |
+
| **Faithfulness** | **0.0900** |
|
| 65 |
+
| **Answer Relevancy** | **0.9609** |
|
| 66 |
+
| **Context Recall** | **1.0000** |
|
| 67 |
+
| **Answer Correctness** | **0.2689** |
|
| 68 |
+
| **Semantic Similarity** | **0.7756** |
|
| 69 |
|
| 70 |
+
π **[View Full Evaluation Report on WandB](https://api.wandb.ai/links/drsyedfaizan1987-northeastern-university/xrlfa4vq)**
|
|
|
|
|
|
|
|
|
|
|
|
|
| 71 |
|
| 72 |
+
---
|
| 73 |
|
| 74 |
## π Evaluation Visualization
|
| 75 |
+
### π Bar Chart of Evaluation Metrics
|
| 76 |
+

|
| 77 |
+
|
| 78 |
|
|
|
|
| 79 |
|
| 80 |
---
|
| 81 |
|
| 82 |
+
## π Evaluation Method
|
| 83 |
+
- Used **RAGAS evaluation framework with GPT-4** to assess **answer correctness, relevancy, and factual consistency**.
|
| 84 |
+
- Evaluated on **10 first-aid-related questions**, covering:
|
| 85 |
+
- β
High fever in infants
|
| 86 |
+
- β
Low blood sugar treatment
|
| 87 |
+
- β
First-aid steps for burns, seizures, choking, etc.
|
| 88 |
+
- **Expected answers** were sourced from **medical literature**.
|
| 89 |
|
| 90 |
---
|
| 91 |
|
| 92 |
+
## π₯ Download & Re-Evaluate
|
| 93 |
You can **re-evaluate the chatbot** by running the following:
|
| 94 |
|
| 95 |
```
|
| 96 |
git clone https://huggingface.co/DrSyedFaizan/First_Aid_Assistant_Evaluation
|
| 97 |
cd First_Aid_Assistant_Evaluation
|
| 98 |
+
python eval.py
|
| 99 |
```
|
| 100 |
|
| 101 |
+
---
|
| 102 |
+
|
| 103 |
+
## π Author
|
| 104 |
+
π¨ββ **Dr. Syed Faizan** | π₯ **Healthcare AI & Data Science**
|
| 105 |
+
π **Hugging Face Repo**: [First_Aid_Assistant_Evaluation](https://huggingface.co/DrSyedFaizan/First_Aid_Assistant_Evaluation)
|
| 106 |
+
|
| 107 |
+
π© **For collaborations, inquiries, or improvements, feel free to contribute or reach out!**
|
| 108 |
+
|
| 109 |
+
|