This project focuses on constructing an advanced chatbot for an E-Commerce platform using Rasa NLU. A chatbot serves as a versatile tool for emulating and handling human-like conversations, ranging from rule-based responses to sophisticated machine learning-driven interactions.
- Rule-based Chatbots: Designed for structured queries, adhering to predefined rules.
- AI-based Chatbots: Incorporating machine learning, our project falls into this category, emphasizing understanding context and delivering natural language responses.
The efficacy of AI-driven chatbots hinges on grasping two fundamental elements:
- Intent: User message's intention or purpose.
- Entity: A specific extractable data point or value from a conversation.
Our E-Commerce chatbot derives data from sources like the Rasa NLU Trainer and Chatito. The critical aspects considered for our business case are:
- Intents: product_info, ask_price, cancel_order
- Entities: product, location, order_id
- Language:
Python
- Libraries:
pandas
,matplotlib
,Rasa
,pymongo
,TensorFlow
,spaCy
- Data Collection: Gather relevant data from diverse sources.
- Library Integration: Import necessary packages and libraries.
- Data Integration: Import and structure the acquired data.
- Data Transformation: Convert data into training and testing dataframes.
- Data Serialization: Convert dataframes to JSON files.
- Exploratory Analysis:
- Visualize data for insights.
- Configuration Setup: Create YAML files for spaCy and TensorFlow configurations.
- Model Development:
- Establish a function for Rasa NLU model training.
- Performance Evaluation:
- Develop a function for model evaluation using test data.
- Training Iterations:
- Train the model using spaCy and TensorFlow pipelines.
- Evaluation Metrics:
- Construct confusion matrices for both models.
- Model Understanding:
- Interpretation of model decisions.
- Database Integration:
- Install MongoDB and integrate pymongo.
- Chatbot Components:
- Implement IntentFlow and ContextManager classes.
- Message Processing:
- Develop a function for message processing.
- Testing and Deployment:
- Validate the chatbot's functionality.
- Input Folder: Holds data and configuration files.
- Src Folder: Encompasses modular code in
Engine.py
andML_Pipeline
directories. - Output Folder: Stores the optimized model for future deployment.
- Lib Folder: Houses reference IPython notebook.