Skip to content

dasu07988/CodeAlpha_AI_FAQ_Chatbot

Repository files navigation

🤖 AI FAQ Assistant

AI FAQ Assistant Banner

Python Flask NLP TF-IDF License


📌 Project Overview

AI FAQ Assistant is a modern web-based chatbot built using Python, Flask, and Natural Language Processing (NLP).

Instead of matching exact keywords, the chatbot uses TF-IDF Vectorization and Cosine Similarity to understand user questions and retrieve the most relevant answer from a JSON knowledge base.

The application also displays a Confidence Score, helping users understand how closely their question matched the stored knowledge.


✨ Features

  • 🤖 AI-powered FAQ Assistant
  • 🌐 Flask Web Application
  • 🧠 NLP Text Preprocessing
  • 📊 TF-IDF Vectorization
  • 📐 Cosine Similarity Matching
  • 📁 JSON Knowledge Base
  • 📈 Confidence Score
  • 🌙 Dark Mode
  • 💬 Typing Animation
  • 💡 Suggested Questions
  • 🗑️ Clear Chat
  • 📱 Responsive User Interface
  • 🎨 Glassmorphism Design

🏗 System Architecture


🛠 Tech Stack

Technology Purpose
Python Backend Programming
Flask Web Framework
HTML5 Frontend
CSS3 User Interface
JavaScript Client-side Logic
NLTK NLP Preprocessing
Scikit-learn TF-IDF & Cosine Similarity
JSON Knowledge Base

📂 Project Structure

AI_FAQ_Assistant/

│
├── static/
│   ├── css/
│   ├── js/
│   └── images/
│
├── templates/
│   └── index.html
│
├── utils/
│   ├── preprocess.py
│   └── similarity.py
│
├── screenshots/
│
├── app.py
├── faq_data.json
├── requirements.txt
├── README.md
└── .gitignore

🚀 Installation

Clone the repository

git clone https://github.com/dasu07988/AI_FAQ_Assistant.git

Go to the project folder

cd AI_FAQ_Assistant

Create Virtual Environment

python -m venv venv

Activate Environment

Windows

venv\Scripts\activate

Install Dependencies

pip install -r requirements.txt

Run the Application

python app.py

Open

http://127.0.0.1:5000

📸 Screenshots

Home Page


Chat Demo


Dark Mode


🧠 NLP Workflow

User Question
      │
      ▼
Text Preprocessing
      │
      ▼
TF-IDF Vectorization
      │
      ▼
Cosine Similarity
      │
      ▼
FAQ Knowledge Base
      │
      ▼
Best Answer
      │
      ▼
Confidence Score

🔮 Future Improvements

  • OpenAI API Integration
  • Gemini API Integration
  • Voice Input
  • Voice Output
  • Database Support
  • User Authentication
  • Multi-language Support
  • Admin Dashboard
  • Conversation History
  • AI Memory

👨‍💻 Author

Dasuni Jayasundara


⭐ Support

If you found this project useful, consider giving it a ⭐ on GitHub.


📄 License

This project is licensed under the MIT License.

About

AI FAQ Assistant built with Python, Flask, NLP and TF-IDF for intelligent FAQ retrieval with confidence scoring.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages