An AI-powered chatbot designed to handle customer queries efficiently, built using state-of-the-art machine learning models for intent recognition, named entity recognition, and dynamic dialogue generation.
- Overview
- Features
- Dataset
- Models
- Installation
- Usage
- Project Structure
- Limitations
- Future Enhancements
- Contributing
- License
The Customer Support Chatbot leverages advanced AI techniques to understand user queries, extract key entities, and generate meaningful responses. This chatbot aims to enhance user experience by automating common customer service tasks such as checking order status, handling cancellations, and providing product information.
Note: Due to GitHub’s file size limitations, the trained model files are not included in the repository. However, you can generate the models locally by running the provided training scripts.
- Intent Recognition: Accurately classifies user intents using a fine-tuned BERT model.
- Named Entity Recognition (NER): Identifies key entities such as order IDs using a custom-trained NER model.
- Dynamic Dialogue Generation: Uses a fine-tuned DialoGPT model for generating context-aware responses.
- Seamless API Integration: Built with a Flask backend and a user-friendly frontend interface.
The chatbot was trained using a diverse, augmented dataset containing over 3,700 examples of customer queries and responses:
- Conversation Data: Includes multi-turn dialogues for realistic conversation flow.
- FAQ Data: Contains frequently asked questions and their corresponding answers.
- NER Data: Annotated data for training the NER model to recognize entities like order IDs.
The project includes the following models:
- Intent Recognition Model: Built using BERT for accurate intent classification.
- NER Model: Custom-trained model for extracting named entities from user input.
- Dialogue Generation Model: Fine-tuned DialoGPT model for generating dynamic responses.
Note: Due to the large file size, the models/
folder could not be uploaded to the repository. You can train the models locally using the provided training scripts or load pretrained models using the scripts in the src/
directory.
To run this project locally, follow these steps:
git clone https://github.com/HarshilBhatnagar/Customer-Support-Chatbot.git
cd Customer-Support-Chatbot
Make sure you have Python 3.8 or higher installed. Then, run:
pip install -r requirements.txt
Run the model training scripts in the src/
folder to generate the required models:
python src/train_intent_model.py
python src/train_entity_model.py
python src/train_dialogue_model.py
python src/backend.py
Navigate to the frontend
directory and start a local server:
cd frontend
python -m http.server 8000
Open your browser and go to:
http://127.0.0.1:8000/index.html
Customer-Support-Chatbot/
├── data/
│ ├── raw/ # Raw datasets
│ ├── processed/ # Preprocessed datasets
├── models/ # (Not included due to large file size)
├── src/
│ ├── backend.py # Flask backend API
│ ├── train_intent_model.py # Intent model training script
│ ├── train_entity_model.py # NER model training script
│ ├── train_dialogue_model.py# Dialogue model training script
├── frontend/ # Frontend web interface
├── README.md # Project documentation
├── requirements.txt # Python dependencies
- File Size Restrictions: The pretrained model files are too large to include in the repository. Please use the training scripts to generate the models locally.
- Limited Responses: The chatbot may echo user input if the query falls outside the scope of the trained dataset.
Contributions are welcome! Please fork the repository and submit a pull request for any enhancements or bug fixes.