
Overview
An AI-powered chatbot built with Python and TypeScript. The chatbot can answer questions, provide recommendations, and learn from user interactions to improve over time.
Deployed on AWS using Lambda functions and DynamoDB for storage. Uses natural language processing (NLP) for understanding user intent.
Problem & Goals
Context
Customer support team was overwhelmed with repetitive questions, needed automated assistance.
Pain Points
- High volume of repetitive customer inquiries
- 24/7 support needed but limited staff
- Need to provide quick, accurate responses
- Want to reduce support costs while maintaining quality
Audience
Customer support team and end users
Goals
- Automate common customer inquiries
- Provide 24/7 support availability
- Improve response time and accuracy
- Reduce support team workload
Constraints
- Must handle multiple languages
- Need to integrate with existing CRM
- Privacy and data security requirements
- Budget constraints for AI/ML services
My Role
AI/ML Engineer
Responsibilities
- Designed chatbot architecture and NLP pipeline
- Implemented intent recognition and entity extraction
- Built response generation system
- Integrated with AWS services (Lambda, DynamoDB, S3)
- Created training data and fine-tuned models
- Implemented analytics and monitoring
Ownership
End-to-end chatbot development and deployment
Collaboration
Worked with customer support team for requirements and feedback
Demo
Demonstration of chatbot capabilities and architecture
Solution & Key Features
Built a hybrid chatbot using rule-based responses for common queries and machine learning for complex queries. Implemented using Python for ML components and TypeScript for the API layer.
Key features
Intent Recognition
Identifies user intent using NLP and machine learning models.

Entity Extraction
Extracts relevant entities (names, dates, products) from user input.

Response Generation
Generates contextual responses using templates and ML models.

Multi-language Support
Supports English and French with language detection.

Architecture
Serverless architecture using AWS Lambda for API endpoints, DynamoDB for conversation storage, and S3 for model storage. NLP pipeline uses spaCy for entity extraction and scikit-learn for intent classification.
Technical Decisions
Needed to understand user intent and extract information
| Option | Pros | Cons |
|---|---|---|
Rule-based | Fast, predictable, easy to debug | Limited flexibility, requires manual rule creation |
Machine Learning | Flexible, learns from data, handles variations | Requires training data, less predictable |
HybridChosen | Best of both worlds, handles common and complex queries | More complex to maintain |
Choice
Hybrid Approach
Rationale
Hybrid approach provides fast responses for common queries while using ML for complex, varied queries.
Trade-off
More complex system, but better user experience and coverage.
Challenges & Obstacles
Results
| Metric | Value | Context | Measured how |
|---|---|---|---|
| Response Accuracy | 92% | Percentage of correct intent recognition | Manual evaluation of 1000 test conversations |
| Response Time | < 2s | Average response time for user queries | CloudWatch metrics |
| Cost Savings | 40% | Reduction in support team workload | Support ticket volume analysis |
Quality & Delivery
| Area | Details |
|---|---|
| Testing | Unit tests for NLP components, integration tests for API, manual testing for edge cases |
| CI/CD | GitHub Actions for automated testing and deployment |
| Deployment | AWS Lambda with API Gateway, automated deployment with SAM |
| Security | API key authentication, input sanitization, rate limiting |
| Monitoring | CloudWatch for logs and metrics, custom dashboards for chatbot performance |
Retrospective
Went well
- Hybrid approach provided best user experience
- Serverless architecture scaled well with demand
- Continuous learning improved chatbot over time
Would change
- Should have invested more in training data quality earlier
- Could have used a more sophisticated NLP library
- Should have implemented better error handling for edge cases
Next steps
- Implement sentiment analysis for better responses
- Add voice support for accessibility
- Integrate with more CRM systems
Lessons
- 01
Data quality is the foundation of successful ML applications
- 02
Hybrid approaches often provide the best balance of performance and flexibility
- 03
Serverless architectures are ideal for variable workloads
- 04
User feedback is crucial for continuous improvement