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.
- 🤖 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
| 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 |
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
Clone the repository
git clone https://github.com/dasu07988/AI_FAQ_Assistant.gitGo to the project folder
cd AI_FAQ_AssistantCreate Virtual Environment
python -m venv venvActivate Environment
Windows
venv\Scripts\activateInstall Dependencies
pip install -r requirements.txtRun the Application
python app.pyOpen
http://127.0.0.1:5000
User Question
│
▼
Text Preprocessing
│
▼
TF-IDF Vectorization
│
▼
Cosine Similarity
│
▼
FAQ Knowledge Base
│
▼
Best Answer
│
▼
Confidence Score
- OpenAI API Integration
- Gemini API Integration
- Voice Input
- Voice Output
- Database Support
- User Authentication
- Multi-language Support
- Admin Dashboard
- Conversation History
- AI Memory
Dasuni Jayasundara
If you found this project useful, consider giving it a ⭐ on GitHub.
This project is licensed under the MIT License.




