Skip to content

ayush13-0/ProServe-AI-Customer-Support-Chatbot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

12 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ€–πŸ’¬ ProServe AI – Customer Support Chatbot

An intelligent ML-powered customer support chatbot using NLP & semantic similarity

GitHub

πŸš€ Project Overview

Modern businesses rely on AI-driven customer support systems to deliver fast and accurate responses at scale. ProServe AI replicates this real-world customer service automation using Machine Learning and Natural Language Processing.

ProServe AI is a retrieval-based customer support chatbot that understands user queries, converts them into numerical vectors, and retrieves the most relevant response from a structured knowledge base using TF-IDF vectorization and cosine similarity.

The system performs:

  • Query preprocessing & cleaning
  • TF-IDF feature extraction
  • Semantic similarity computation
  • Confidence-based response selection
  • Human-agent fallback handling

πŸ“‚ Dataset Used

This project uses a Customer Support Q&A Dataset, containing:

Each record includes:

  • ❓ Customer query
  • πŸ’¬ Predefined support response

The dataset simulates real-world customer service conversations across multiple support scenarios.

πŸ—οΈ Project Workflow

1️⃣ Importing Libraries Used for data handling, NLP processing, ML modeling, and UI development.

  • import pandas as pd
  • import re
  • from sklearn.feature_extraction.text import TfidfVectorizer
  • from sklearn.metrics.pairwise import cosine_similarity
  • import streamlit as st

2️⃣ Loading the Dataset

  • df = pd.read_csv("customer_support_QA_dataset.csv")

3️⃣ Text Preprocessing

  • Lowercasing text
  • Removing special characters
  • Normalizing extra spaces
def preprocess(text):
    text = text.lower()
    text = re.sub(r"[^a-z0-9\s]", " ", text)
    return re.sub(r"\s+", " ", text).strip()

4️⃣ TF-IDF Vectorization

  • Converts cleaned queries into numerical vectors.
vectorizer = TfidfVectorizer(max_features=6000, ngram_range=(1,2))
X = vectorizer.fit_transform(df['clean_query'])

5️⃣ Cosine Similarity Computation

  • Measures semantic similarity between user query and knowledge base.
similarity = cosine_similarity(user_vector, X)

6️⃣ Response Retrieval Logic

  • Highest similarity score determines the response.
  • Low-confidence queries trigger fallback to human support.

🧠 Chatbot Intelligence

The system includes:

  • Confidence threshold handling
  • Contextual chat memory
  • Session-based conversation history
  • Typing animation for realistic UX

🎨 User Interface

  • ChatGPT-style dark theme
  • Real-time chat interaction
  • Sidebar memory panel
  • Smooth typing animation

Built entirely using Streamlit + custom HTML/CSS.

πŸ“ Project Structure

ProServe-AI/
β”‚
β”œβ”€β”€ customer_support_QA_dataset.csv   # Support knowledge base
β”œβ”€β”€ ProServeAI.py                     # Streamlit chatbot app
β”œβ”€β”€ ProServeAI-v2                     # Streamlit v2 chatbot app 
β”œβ”€β”€ ProServe-AI-Main.ipynb            # Model development notebook
β”œβ”€β”€ requirements.txt                 # Dependencies
└── README.md                         # Documentation

▢️ How to Run

pip install -r requirements.txt
streamlit run ProServeAI.py

πŸ“Œ Use Cases

  • Customer Support Automation
  • FAQ & Helpdesk Systems
  • SaaS Support Bots
  • AI Knowledge Base Assistants
  • Business Service Chatbots

πŸ“ˆ Future Enhancements

  • Sentence-BERT embeddings
  • FAISS vector database
  • Multilingual support
  • Intent classification
  • Cloud deployment (AWS / GCP)

🏁 Conclusion

  • ProServe AI demonstrates how Machine Learning and NLP can automate customer support effectively.
  • By leveraging TF-IDF and cosine similarity, the system delivers fast, accurate, and scalable responses.
  • The project serves as a strong foundation for production-grade AI-powered support systems.

πŸ‘¨β€πŸ’» Developed By

Ayush


πŸ“œ License

  • This project is licensed under the MIT License.

About

πŸ€– πŸ‘©πŸ»β€πŸ’» An intelligent ML-based customer support chatbot leveraging NLP, TF-IDF, and cosine similarity to deliver accurate, real-time responses via a modern Streamlit UI.

Resources

License

Stars

1 star

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors