Skip to content

daivikhrajesh/CustomerChatbot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

7 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

CustomerChatbot πŸ€–πŸ’¬

CustomerChatbot is a conversational AI designed to simulate customer support interactions. This project implements chatbots for several customer service channels, including:

These chatbots are trained on publicly available conversations between customer support agents and users on Twitter. The goal is to provide users with an intelligent and interactive support experience.


Features 🎯

  • Trainable Seq2Seq Chatbot with encoder-decoder architecture.
  • Supports multiple RNN cells (LSTM/GRU).
  • Implements Bahdanau and Luong attention mechanisms.
  • Customizable embedding layers with GloVe support.
  • Pre-trained customer service models for Apple, Amazon, Uber, Delta, and Spotify.
  • Interactive chat interface for seamless user interaction.
  • GPU and multi-GPU support for efficient training and inference.

Sample Conversations πŸ’¬

Example Conversation:

Bot: Hi, how can I help you?  
Me: I need help with my account.  
Bot: Sure! Can you tell me more about the issue?  
Me: My payment is not going through.  
Bot: Let me check that for you. Have you tried updating your payment method?  

Installation πŸ› οΈ

Install Dependencies:

First, clone the repository and install the required dependencies:

git clone https://github.com/daivikhrajesh/CustomerChatbot.git
cd CustomerChatbot
pip install -r requirements.txt
python3 -m spacy download en

Model Architecture πŸ—οΈ

  • Encoder: Bidirectional RNN (LSTM/GRU) with optional embedding layers.
  • Attention: Supports both Bahdanau and Luong mechanisms for better context understanding.
  • Decoder: RNN with attention for sequence prediction, making it suitable for dynamic responses.

Dataset πŸ“Š

The dataset used for training this chatbot can be found on Kaggle. This dataset was created by collecting publicly available conversations between customer support agents and users on Twitter. A big thanks to the author of the dataset!


Pre-trained Models 🎯

To quickly get started, download and set up pre-trained customer service models by running the following commands:

wget https://www.dropbox.com/s/ibm49gx1gefpqju/pretrained-models.zip
unzip pretrained-models.zip
rm pretrained-models.zip
python predict.py

You can now interact with any of the customer service chatbots by running the predict.py script. For example, to interact with the Apple customer support bot, use the following command:

./predict.py -cs apple

Available Customer Service Chatbots:

  • apple
  • amazon
  • uber
  • delta
  • spotify

Training Your Own Model πŸš€

You can also train the chatbot from scratch. First, download and format the Twitter dataset:

wget https://www.dropbox.com/s/nmnlcncn7jtb7i9/twcs.zip
unzip twcs.zip
mkdir data
mv twcs.csv data
rm twcs.zip
python3 datasets/twitter_customer_support/format.py  # This may take a couple of hours!

⚠️ Warning: The dataset formatting step may take several hours, depending on your machine.

Once the dataset is ready, you can begin training the chatbot by running:

python train.py

License πŸ“œ

This project is licensed under the MIT License. See the LICENSE file for more information.

About

A customer support chatbot built with Seq2Seq, LSTM/GRU RNNs, and attention mechanisms. Trained on Twitter data from top brands, providing interactive, real-time assistance for Apple, Amazon, Uber, Delta, and Spotify. πŸ€–πŸ’¬

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors