A professional FAQ Chatbot built with Python and Streamlit, powered by TF-IDF Vectorisation and Cosine Similarity for intelligent question matching.
| Feature | Details |
|---|---|
| 💬 Chat Interface | ChatGPT-style dark-themed UI |
| 📚 FAQ Dataset | 25 curated AI / ML / Python FAQs |
| 🧠 Algorithm | TF-IDF + Cosine Similarity |
| 📊 Confidence Score | Visual confidence bar per answer |
| 🕑 Chat History | Full session history with timestamps |
| ⬇️ Download | Export chat history as CSV |
| 📋 Sidebar | Live stats and project information |
| Graceful fallback for unmatched queries |
- Python 3.9+
- Streamlit — web app framework
- Scikit-learn — TF-IDF vectoriser & cosine similarity
- Pandas — data export
- NumPy — numerical operations
git clone https://github.com/yourusername/faq-chatbot.git
cd faq-chatbot# Windows
python -m venv venv
venv\Scripts\activate
# macOS / Linux
python3 -m venv venv
source venv/bin/activatepip install -r requirements.txtstreamlit run app.pyThe app opens automatically at http://localhost:8501
faq-chatbot/
├── app.py # Main Streamlit application
├── requirements.txt # Python dependencies
├── README.md # This file
└── Project_Report.md # Detailed project report
User Question
│
▼
TF-IDF Vectorisation ←── FAQ Questions (pre-vectorised at startup)
│
▼
Cosine Similarity Computation
│
▼
Best Match (score ≥ threshold) ──► Return Answer + Confidence
│
▼ (score < threshold)
Fallback "No match" message
- What is artificial intelligence?
- How does TF-IDF work?
- What is cosine similarity?
- How do I run a Streamlit app?
- What is overfitting?
- What is CodeAlpha?
This project is submitted as part of the CodeAlpha AI Internship program.
Free to use for educational purposes.