BizInsight AI is an enterprise-grade customer feedback analytics platform that automates customer sentiment analysis, groups customer complaints into category-mapped topic clusters, and provides a Retrieval-Augmented Generation (RAG) assistant for querying review data.
This project was recently migrated from a legacy monolithic Streamlit application to a modern microservices architecture consisting of a Next.js 14 frontend and a FastAPI backend.
- Automated Sentiment Analysis: Instant processing of customer review datasets with metric tracking (Average Sentiment, analyzed review counts, risk thresholds).
- Categorized Complaint Clustering: Unsupervised topic modeling grouping negative reviews into business-relevant categories (Payment, Delivery, Technical, Account, Product Quality, Customer Service, etc.).
- Retrieval-Augmented Generation (RAG) Chatbot: A contextual question-answering assistant that responds to business queries using only the uploaded customer reviews, preventing hallucinations.
- Standalone Guest RAG Sandbox: A public-facing chat interface that does not require user authentication, utilizing a direct ChromaDB integration.
- Structured Alerts: Monitoring of risk levels, negative review spikes, and notifications.
- Frontend: Next.js 14, React, Tailwind CSS, Lucide Icons.
- Backend API: FastAPI, Uvicorn, Python, SQLite.
- Machine Learning & NLP:
- Sentiment Analysis: NLTK VADER.
- Topic Clustering: BERTopic, HDBSCAN, UMAP.
- Sentence Embeddings: Sentence-Transformers (using
all-mpnet-base-v2).
- Vector DB & RAG Pipeline: LangChain, ChromaDB, OpenRouter (Gemini LLM).
BizInsight-AI/
├── bizinsight_api/ # FastAPI backend application
│ ├── routes/ # API router files (auth, reviews, dashboard, clustering, admin)
│ ├── models/ # Database models and schemas
│ └── main.py # Backend entry point
├── bizinsight-web/ # Next.js 14 frontend application
│ ├── src/
│ │ ├── app/ # Next.js App Router (dashboard pages, chat sandbox, landing page)
│ │ ├── components/ # UI components
│ │ └── lib/ # API client utilities
│ └── public/ # Static assets
├── rag_api/ # Core RAG chatbot service logic
├── clustering/ # Clustering algorithms and category mapping
├── database.py # Database initialization and connection helpers
├── sentiment.py # NLTK VADER sentiment analyzer wrapper
├── download_model.py # Utility to download NLTK data and models
├── sync_vectors.py # Vector store synchronization script
└── requirements.txt # Backend Python dependencies
git clone https://github.com/Prateekiiitg56/BizInsight-AI.git
cd BizInsight-AI-
Navigate to the project root directory and set up a virtual environment:
python -m venv venv source venv/bin/activate # On Windows, use: venv\Scripts\activate
-
Install the required Python packages:
pip install -r requirements.txt
-
Download the NLTK and SentenceTransformer models:
python download_model.py
-
Configure the environment variables by creating a
.envfile in the root directory:OPENROUTER_API_KEY=your_openrouter_api_key_here
-
Start the FastAPI backend server:
uvicorn bizinsight_api.main:app --host 0.0.0.0 --port 8001 --reload
-
Navigate to the
bizinsight-webdirectory:cd bizinsight-web -
Install Node.js dependencies:
npm install
-
Start the Next.js development server:
npm run dev
-
Open http://localhost:3000 in your browser.
To upload review datasets, the CSV files must include at least one column labeled review containing the textual customer feedback.
- Prateek Singh - AI & Software Developer