This project implements an AI Chatbot using Python, Neural Networks, and Natural Language Processing (NLP) techniques. The chatbot is designed to understand user intents, provide relevant responses, and continuously improve through user feedback and periodic model updates.
This AI Chatbot addresses the challenge of providing automated, intelligent responses to user queries in a conversational interface. It uses advanced AI techniques to understand user intent and generate appropriate responses, making it suitable for various applications such as customer support, information retrieval, and interactive user assistance.
The project utilizes the following AI technologies:
- Natural Language Processing (NLP) for text preprocessing and understanding
- Neural Networks for intent classification
- Transfer Learning techniques (TF-IDF and LSA) for feature extraction
- Continuous Learning through feedback collection and model updates
The main algorithm used in this project is a Deep Neural Network for intent classification. The model architecture includes:
- Input layer based on TF-IDF and LSA transformed features
- Multiple dense layers with ReLU activation
- Dropout layers for regularization
- Output layer with softmax activation for multi-class classification
The model is trained using the Adam optimizer and sparse categorical crossentropy loss function.
project_root/
│
├── data/
│ └── your_custom_data.json
│
├── images/
│ ├── user_icon.png
│ └── bot_icon.png
│
├── models/
│ ├── intent_classifier.pkl
│ ├── tfidf_vectorizer.pkl
│ └── lsa.pkl
│
├── src/
│ ├── data_preparation.py
│ ├── preprocessing.py
│ ├── feature_engineering.py
│ ├── model.py
│ ├── hyperparameter_tuning.py
│ └── modern_chatbot_ui.py
│
├── custom_widgets.py
├── evaluate_and_retrain.py
├── feedback_handler.py
├── main.py
├── model_updater.py
├── requirements.txt
└── README.md
- Ensure you have Python 3.12 installed on your system.
- Clone this repository to your local machine.
- Navigate to the project root directory in your terminal.
- Install the required dependencies: pip install -r requirements.txt
- Run the main script to start the chatbot:
-
The chatbot uses a modern GUI implemented with customtkinter.
-
User feedback is collected and stored in a SQLite database.
-
The model is periodically retrained using collected feedback and new data.
-
Hyperparameter tuning is performed to optimize the model's performance.
-
The Model Scales in performance with increased usage.
-
Unfortunately during my tesing, Sometimes after updating the model with the user feedback, would sometimes cause unexpected decreases in acuraccy, due to faulty intent classification. I was not able to adress this Issue adequately yet.
-
The Other Gui file, located in the repo is a legacy version of my current UI.