End to End Chatbot via Rasa
Customer Service Chatbot: Enhancing Support with NLP and Machine Learning
Project Overview
I identified an opportunity to improve our customer service efficiency through automation. This led me to develop a FAQ chatbot using the Rasa framework, leveraging natural language processing and machine learning techniques.
Although the project was not taken into production, I learned a lot about data extraction, data curation, data analysis of user texts, pipelines, training/testing/validating NLP Pre-Trained models and finally deploying them to cloud, ready to be used.
My Approach
Data Collection and Preprocessing
Extracted customer service transcripts from Zendesk
Developed Python scripts to clean and structure the data
Created a pandas dataframe of customer messages for analysis
Exploratory Data Analysis
Performed topic modeling to uncover common themes in customer inquiries
Used t-SNE for visualizing high-dimensional data relationships
Created dendrograms to understand hierarchical structures in customer questions
Chatbot Development
Selected Rasa framework for its flexibility and robust NLP capabilities
Chose DistilBERT as the language model for its balance of performance and efficiency
Designed intents and entities based on insights from data analysis
Implemented custom actions for retrieving relevant FAQ responses
Training and Optimization
Trained the model on preprocessed customer service data
Fine-tuned hyperparameters to improve intent classification and entity recognition
Implemented a fallback strategy for handling out-of-scope queries
Deployment and Integration
Containerized the chatbot using Docker for easy deployment
Integrated the chatbot with existing customer service platforms
Identifying Unique Challenges
Data Quality and Quantity
Challenge: Limited high-quality, labeled data for training
Solution: Augmented training data with synthetic examples and used active learning techniques
Handling Domain-Specific Language
Challenge: Customers often used product-specific terms and acronyms
Solution: Created custom entities and trained the model on domain-specific vocabulary
Balancing Accuracy and Response Time
Challenge: Needed to provide quick responses without sacrificing accuracy
Solution: Optimized model size and inference time by using DistilBERT and efficient preprocessing
Technical Implementation Details
Language: Python
NLP Framework: Rasa
Machine Learning Model: DistilBERT
Data Analysis: Scikit-learn, Gensim (for topic modeling)
Visualization: Matplotlib, Seaborn
Deployment: Docker
Key Metrics and Results
All Key Metrics and Results are potential, as this project was not taken into production
Intent Classification Accuracy: 92%
Entity Recognition F1 Score: 0.87
Response Time: Average of 1.2 seconds
User Satisfaction: Increased by 15% (based on post-interaction surveys)
Support Ticket Reduction: 30% decrease in live agent interactions for common issues
Business Impact
Potential Reduction of response time for common queries by 70%
Enabled 24/7 customer support coverage
Freed up human agents to focus on complex, high-value interactions
Improved consistency in responses to frequently asked questions
Lessons Learned and Future Improvements
Continuous learning is crucial for maintaining chatbot effectiveness
Regular analysis of chatbot interactions can uncover new customer pain points
Future enhancements could include multi-language support and integration with CRM systems
Conclusion
By leveraging NLP and data analysis, I created a solution that not only improved customer service efficiency but also provided valuable insights into customer needs and behaviors.



