Skip to content

Arijitsen-ece/faq-chatbot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🤖 AI FAQ Chatbot (Flask + NLP)

An intelligent FAQ chatbot built using Flask, Natural Language Processing (NLP), and TF-IDF vectorization.
The chatbot understands user queries and returns the most relevant response using cosine similarity.


🚀 Project Overview

This project demonstrates:

  • Text preprocessing using NLTK
  • Stopword removal
  • TF-IDF feature extraction
  • Cosine similarity for semantic matching
  • Flask-based web interface
  • Dynamic Jinja template rendering

The chatbot intelligently matches user queries with a predefined FAQ database.


🖼 Chatbot Interface

Chatbot UI


🧠 How It Works

1️⃣ User enters a message
2️⃣ Text is preprocessed (tokenized + cleaned)
3️⃣ Converted into TF-IDF vector
4️⃣ Cosine similarity calculated with FAQ dataset
5️⃣ Most similar answer returned
6️⃣ If similarity score is low → fallback response


📂 Project Structure

faq-chatbot/
│
├── templates/
│   └── index.html
├── static/
│   └── chatbot-ui.png
├── app.py
├── requirements.txt
└── README.md

⚙️ Technologies Used

  • Python
  • Flask
  • NLTK
  • Scikit-learn
  • TF-IDF Vectorizer
  • Cosine Similarity
  • HTML + CSS (Custom UI)

🎯 Key Features

✔ Intelligent semantic matching
✔ Clean modern chat interface
✔ Greeting / Thanks / Goodbye handling
✔ Fallback response logic
✔ Lightweight and fast
✔ Modular and easy to expand


📊 NLP Pipeline

  • Lowercasing
  • Tokenization
  • Stopword removal
  • TF-IDF transformation
  • Similarity scoring

🔮 Future Enhancements

  • Add conversation memory
  • Upgrade to Deep Learning (LSTM / BERT)
  • Add REST API endpoint
  • Add database-backed dynamic FAQs
  • Add voice integration

👨‍💻 Author

Arijit Sen
BTech – Electronics & Communication Engineering
AI & Intelligent Systems Enthusiast


⭐ If you find this project useful, consider giving it a star!

About

AI FAQ Chatbot using Flask, NLP and TF-IDF similarity

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors