CoolFace
Apppublic

ehsanulhaque92/ai-customer-feedback-analysis-platform

sourceHugging Faceupdated 1y agoView on Hugging Face
0likes
App README

AI-Powered Customer Feedback & Product Insight Platform

Python Flask React TypeScript Pandas ChromaDB Groq Tesseract OCR

An end-to-end, full-stack platform that transforms unstructured customer feedback from multiple sources into a dynamic, queryable, and actionable business intelligence dashboard.

[image]


๐Ÿ”ด Live Demo

[Link to your deployed application] (We will add this once deployed)

โœจ Key Features in Action

Dynamic Dashboard & Document Ingestion

The dashboard provides a real-time overview of customer sentiment. Watch as a new document is uploaded, intelligently processed, and its contents are immediately reflected in the charts and recent feedback list.

[image]

Conversational AI Assistant (RAG with Filtering)

Ask complex questions in natural language. The AI assistant can query the entire 10,000+ review knowledge base or, with a single click, focus its search exclusively on the content of your uploaded documents to provide precise, context-aware answers.

[image]


๐Ÿ“Š Project Scope & Performance

This project was built and validated on a substantial and realistic dataset to ensure robust performance.

  • โ€”Initial Knowledge Base: The system was initialized with a dataset of 10,000 real-world apparel reviews from Amazon.
  • โ€”Dynamic Data Ingestion: The platform can ingest and process multi-page documents (.docx, .pdf) in real-time.
  • โ€”Intelligent Chunking Performance: The llama3-70b-versatile model successfully parsed and extracted 8 distinct feedback items from the Q3 report and 7 items from the Q4 report, including sentiment classification for each.
  • โ€”RAG Knowledge Base: The final ChromaDB vector database contains 10,015 queryable feedback items (9,999 from the initial dataset + 16 from the two ingested reports).
  • โ€”High-Speed AI Assistant: The llama-3.1-8b-instant model, powered by the Groq LPUโ„ข Inference Engine, delivers conversational responses with an average time-to-first-token of under 150ms, providing a truly real-time chat experience.

๐ŸŽฏ Introduction: The Problem

Product managers and businesses are inundated with vast amounts of unstructured customer feedback from reviews, support tickets, and internal reports. Manually sifting through this data to find actionable insights is slow, inefficient, and prone to human bias. This project solves that problem by creating an automated system that ingests, analyzes, and synthesizes this feedback into a single, intelligent interface.


๐Ÿš€ Core Features

  • โ€”Dynamic Analytics Dashboard:
  • โ€”Visualizes real-time sentiment trends (positive, negative, neutral) from thousands of reviews.
  • โ€”Displays topic distribution to quickly identify what customers are talking about.
  • โ€”Features a live-updating table of the 20 most recent feedback items, with sources clearly marked.
  • โ€”AI-Powered Document Ingestion & Analysis:
  • โ€”Intelligent Chunking: Upload unstructured documents (.docx, .pdf). The system uses a powerful LLM (llama3-70b-versatile) to intelligently parse the document, extract individual feedback points, and classify their sentiment.
  • โ€”Hybrid PDF Processing with OCR: The system first attempts direct text extraction from PDFs. If it detects a scanned (image-based) document, it automatically falls back to a powerful Tesseract OCR pipeline to ensure all data is captured.
  • โ€”Live Dashboard Updates: Once a document is ingested, the main dashboard automatically refreshes in real-time, incorporating the newly extracted feedback into all charts and tables.
  • โ€”Conversational AI Assistant (Advanced RAG):
  • โ€”Ask complex, natural language questions about the entire feedback knowledge base.
  • โ€”Metadata Filtering: A sophisticated search filter allows users to query the entire dataset or focus exclusively on knowledge extracted from uploaded documents, enabling precise and targeted analysis.
  • โ€”The backend leverages a sentence-transformers model for embeddings and a ChromaDB vector database for efficient semantic search. The final answer is synthesized by a high-speed llama-3.1-8b-instant model via the Groq API.

๐Ÿ”ง Technical Deep Dive: System Architecture

This project is built as a professional, decoupled, full-stack application.

  • โ€”Backend (Python/Flask):
  • โ€”Built using a scalable Application Factory pattern.
  • โ€”Features a Singleton `DataService` to manage the dashboard's data state in-memory, allowing for real-time updates without constant database reads.
  • โ€”The RAG pipeline is built from scratch, using chromadb for persistent vector storage and groq for high-speed LLM inference.
  • โ€”All dependencies are managed via a conda environment and a universal requirements.txt file.
  • โ€”Frontend (React/TypeScript):
  • โ€”A modern, responsive UI built with Vite, React, and TypeScript.
  • โ€”Styled with Tailwind CSS using a reusable component architecture (components/ui.tsx).
  • โ€”Features custom React hooks (useDashboardApi) for clean, separated data-fetching logic.
  • โ€”Stateful components, like the AI Assistant, use sessionStorage to persist conversation history, providing a seamless user experience.

๐Ÿ› ๏ธ Tech Stack

CategoryTechnology
FrontendReact, TypeScript, Vite, Tailwind CSS, axios, recharts
BackendPython, Flask, Pandas
AI / NLPGroq (LLaMA 3), Sentence-Transformers, ChromaDB, PyMuPDF, python-docx, Pytesseract OCR
DevOpsConda, Git, npm, pip

๐Ÿƒโ€โ™‚๏ธ Getting Started: Running Locally

  1. 1.Clone the repository:
bash
    git clone [your-repo-url]
    cd customer-feedback-ai
  1. 1.Backend Setup:
  2. 2.Navigate to the backend directory: cd backend
  3. 3.Create and activate the conda environment:
bash
        conda env create -f environment.yml
        conda activate FeedbackAI
  • โ€”Create a .env file and add your GROQ_API_KEY.
  • โ€”Run the server (this will take ~10 mins on the first run to build the database):
bash
        python run.py
  1. 1.Frontend Setup:
  2. 2.Open a new terminal and navigate to the frontend directory: cd frontend
  3. 3.Install dependencies: npm install
  4. 4.Run the development server: npm run dev

The application will be available at http://localhost:5173.


๐Ÿ’ก Future Work

This project provides a powerful foundation. Future enhancements could include:

  • โ€”V2 Computer Vision Module: Integrating a custom-trained YOLOv8 model to analyze user-submitted images for visual defects (e.g., torn fabric, stains).
  • โ€”Database Integration: Migrating the in-memory DataService to a persistent SQL or NoSQL database to handle larger datasets and provide user authentication.
  • โ€”Advanced RAG Techniques: Implementing re-ranking and query transformation to further improve the accuracy of the AI Assistant.

๐Ÿ“ซ Contact

Ehsanul Haque Kanan