# LeaBot: Maternal Health Chatbot
LeaBot is a domain-specific maternal healthcare chatbot project developed using a pre-trained Transformer model. The chatbot provides an interactive platform where women can ask questions and receive immediate, accurate responses on a variety of maternal health topics.
## About the Dataset
The chatbot is trained using a conversational dataset from Hugging Face:
**nyarkssss/maternal_1k**.
It consists of **1,035** question-answer conversational pairs on maternal health-related topics. These pairs help the model understand diverse user intents and provide accurate, domain-specific responses.
The dataset covers three key maternal health contexts:
1. **Antenatal** - Questions related to pregnancy before childbirth.
2. **Postnatal** - Questions related to immediate postpartum care.
3. **Postpartum** - Questions concerning long-term recovery after childbirth.
Each entry in the dataset contains the following fields:
**question** – User queries related to maternal health.
**answer** – Corresponding expert-informed responses.
**domain** – The specific maternal health category the question falls under.
**context** – Additional contextual information related to the question.
This dataset allows the chatbot to learn domain-specific language and give contextually accurate responses to various maternal health queries.
## Performance metrics
To evaluate the performance of the chatbot, several key metrics were considered during the model development phase. These metrics are essential for assessing the model's ability to generate meaningful, accurate responses.
**Evaluation metrics**
- **Loss:** Measures how well the model predicts the target response. Lower loss, better predictions.
- **Accuracy:** Evaluates the percentage of correctly predicted tokens in the reponses.
- **BLEU:** Measures the precision in generating matching reference responses.
- **F1 score:** Harmonic mean of precision and recall, balancing both false posit …