Skip to content

ChatBotFAQs is a lightweight web-based chatbot that answers frequently asked questions using NLP techniques. It uses TF-IDF vectorization and cosine similarity to find the most relevant answer from a predefined set of FAQs.

Notifications You must be signed in to change notification settings

Bilal-73/ChatBotFAQs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python Flask NLP scikit-learn Status License

🤖 ChatBotFAQs – FAQ Chatbot using Flask & NLP

A simple yet effective FAQ-based chatbot web application built using Flask, TF-IDF vectorization, and Cosine Similarity.
The chatbot intelligently matches user queries with predefined FAQs and returns the most relevant response in real time.

This project demonstrates basic NLP concepts, Flask backend development, and clean frontend integration.



✨ Features

  • 💬 Interactive web-based chat interface
  • 🧠 NLP-powered question matching using TF-IDF + Cosine Similarity
  • 📚 Predefined FAQ dataset (JSON-based, easy to extend)
  • ⚡ Fast and lightweight Flask backend
  • 🎯 Confidence-based response selection
  • 🧩 Clean and modular project structure

🛠️ Tech Stack

Backend

  • Python
  • Flask

Frontend

  • HTML
  • CSS
  • Vanilla JavaScript

NLP / ML

  • TF-IDF Vectorizer (scikit-learn)
  • Cosine Similarity
  • Text preprocessing

📂 Project Structure

ChatBotFAQs/
│
├── app.py                  # Flask application
├── requirements.txt        # Python dependencies
├── README.md               # Project documentation
│
├── data/
│   └── faqs.json           # FAQ dataset
│
├── templates/
│   └── index.html          # Frontend UI
│
├── static/
│   └── style.css           # Styling
│
└── utils/
    └── text_preprocessing.py  # Text cleaning utilities

⚙️ Installation & Setup

#1️⃣ Clone the repository

image

#2️⃣ Install dependencies

image

3️⃣ Run the Application

python app.py

🧪 How It Works

  • User enters a question in the chat interface
  • Input text is cleaned and vectorized using TF-IDF
  • Cosine similarity is calculated against stored FAQ questions
  • The most relevant answer is returned if confidence exceeds the threshold

🔮 Future Improvements

  • Upgrade to Sentence-BERT for semantic similarity
  • Add admin panel to manage FAQs
  • REST API version (FastAPI)
  • Database integration
  • Multi-language support

👤 Author

Bilal Imran

💼 AI / ML & Full-Stack Enthusiast 🔗 GitHub: https://github.com/Bilal-73

⭐ ### Show Your Support

If you found this project useful: ⭐ Star the repository 🍴 Fork it 🧠 Suggest improvements


About

ChatBotFAQs is a lightweight web-based chatbot that answers frequently asked questions using NLP techniques. It uses TF-IDF vectorization and cosine similarity to find the most relevant answer from a predefined set of FAQs.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages