An intelligent ML-powered customer support chatbot using NLP & semantic similarity
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
This project uses a Customer Support Q&A Dataset, containing:
- customer_support_QA_dataset.csv - https://drive.google.com/file/d/1EEUd736xVvEhMtH7yseNn9Bt7UxvOl7V/view?usp=drive_link
Each record includes:
- β Customer query
- π¬ Predefined support response
The dataset simulates real-world customer service conversations across multiple support scenarios.
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.
The system includes:
- Confidence threshold handling
- Contextual chat memory
- Session-based conversation history
- Typing animation for realistic UX
- ChatGPT-style dark theme
- Real-time chat interaction
- Sidebar memory panel
- Smooth typing animation
Built entirely using Streamlit + custom HTML/CSS.
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
pip install -r requirements.txt
streamlit run ProServeAI.py- Customer Support Automation
- FAQ & Helpdesk Systems
- SaaS Support Bots
- AI Knowledge Base Assistants
- Business Service Chatbots
- Sentence-BERT embeddings
- FAISS vector database
- Multilingual support
- Intent classification
- Cloud deployment (AWS / GCP)
- 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.
- πΌLinkedIn: https://linkedin.com/in/ayush130
- π»GitHub: https://github.com/ayush13-0
- βοΈEmail- bhanuseenu914@gmail.com
π License
- This project is licensed under the MIT License.