Skip to content

HarshilBhatnagar/Customer-Support-Chatbot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

Customer Support Chatbot 🚀

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.

Table of Contents

Overview

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.

Features

  • 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.

Dataset

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.

Models

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.

Installation

To run this project locally, follow these steps:

Clone the Repository:

git clone https://github.com/HarshilBhatnagar/Customer-Support-Chatbot.git
cd Customer-Support-Chatbot

Install Dependencies:

Make sure you have Python 3.8 or higher installed. Then, run:

pip install -r requirements.txt

Download or Train the Models:

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

Usage

Start the Backend Server:

python src/backend.py

Start the Frontend:

Navigate to the frontend directory and start a local server:

cd frontend
python -m http.server 8000

Access the Chatbot Interface:

Open your browser and go to:

http://127.0.0.1:8000/index.html

Project Structure


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

Limitations

  • 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.

Contributing

Contributions are welcome! Please fork the repository and submit a pull request for any enhancements or bug fixes.

Chatbot Interface

Chatbot interface

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published