This case study focuses on a project aimed at creating an empathy analysis model to generate empathy scores for conversations. The project’s objective was to develop a model that could assess the level of empathy in various conversation datasets, including hospitalist data, helpline conversations, and sales datasets. The case study covers the dataset gathering process, model training, optimization to reduce size while maintaining accuracy, and the use of ONNX for framework independence and improved inference time.
Project Goals :
- Develop an empathy analysis model to generate empathy scores for conversations.
- Gather and merge diverse datasets, including hospitalist data, helpline conversations, and sales datasets, in JSON and CSV formats.
- Clean and annotate the datasets to create a final high-quality dataset for training and evaluation.
- Train the model using a BERT model with 12 layers.Optimize the model’s size while maintaining accuracy by adjusting the model architecture.
- Optimize the model’s size while maintaining accuracy by adjusting the model architecture.
- Dataset Gathering and Preprocessing : The project began by gathering various conversation datasets, including hospitalist data, helpline conversations, and sales datasets, in JSON and CSV formats. These datasets were merged, cleaned, and annotated to generate a final dataset suitable for training the empathy analysis model. Considerable effort was made to ensure data quality and include a diverse range of conversation types.
- Model Training : BERT model with 12 layers was utilized for training the model. The training process involved feeding the model with the annotated dataset to learn and capture patterns related to empathy in conversations.
Results and Deployment
The final empathy analysis model achieved an accuracy of 90% while maintaining a reduced size of 128 MB. The model demonstrated its ability to accurately assess empathy levels in various conversation datasets.
The deployment of the model involved hosting the APIs and model on AWS Lambda, utilizing AWS EFS for scalable file storage, and deploying the APIs on AWS EC2 instances. This setup ensured efficient scalability and accessibility for real-time empathy analysis.
This case study highlighted the successful development of an empathy analysis model for conversations, encompassing dataset gathering, preprocessing, model training, optimization, and deployment. The project’s outcomes contribute to improved understanding and assessment of empathy levels in conversations, enhancing communication and customer satisfaction.