Skip to content

TMirza89/CX-360-Insight-Engine

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CX‑360 Insight Engine

AI‑Powered Customer Feedback Analysis with RAG, Clustering, Sentiment & Business Insights

The CX‑360 Insight Engine is an end‑to‑end customer‑experience analytics system built using:

  • LLM‑powered RAG (Groq + Llama 3.1)
  • Semantic embeddings
  • Topic clustering (t‑SNE + KMeans)
  • Sentiment analysis
  • Cluster naming using LLMs
  • Interactive Streamlit dashboard
  • Business‑ready insight generation

This project transforms raw customer feedback into actionable insights, root‑cause analysis, and prioritized recommendations — similar to enterprise VoC platforms like Medallia, Qualtrics, and Clarabridge.

Key Features

1. Intelligent RAG‑Based Insights

Ask any question about customer feedback and the engine will:

  • Retrieve the most relevant comments
  • Analyze sentiment distribution
  • Summarize themes
  • Provide executive‑ready insights
  • Recommend business actions
  • Generate a Customer Recovery Plan if negative sentiment is high

2. Topic Clustering (with Stable LLM‑Generated Names)

The system automatically:

  • Embeds all feedback
  • Reduces dimensionality (t‑SNE)
  • Clusters comments into topics
  • Uses an LLM to name each cluster
  • Saves names in cluster_names.json so they never change
  • Visualizes clusters in a 2D scatter plot

You also get:

  • A dropdown to inspect each cluster
  • All feedback belonging to that cluster
  • Clear explanation of what X/Y axes mean

3. Sentiment Analysis

Each comment is labeled as:

  • Positive
  • Neutral
  • Negative

Sentiment distribution is used in:

  • Insight generation
  • Cluster summaries
  • Business recommendations

4. Business Insight Engine

For every query, the system generates:

  • Executive summary
  • What customers are saying
  • Sentiment breakdown
  • Root‑cause analysis
  • Business impact
  • Prioritized recommendations
  • Customer recovery plan (if needed)
  • Strengths (if sentiment is positive)

How It Works

1. Data Processing

  • Clean text
  • Compute embeddings
  • Compute sentiment
  • Store results

2. RAG Retrieval

  • Retrieve top 300 semantically similar comments
  • Compute sentiment distribution
  • Pass context to LLM

3. Insight Generation

LLM produces:

  • Themes
  • Patterns
  • Recommendations
  • Recovery plan
  • Executive summary

4. Topic Clustering

  • t‑SNE → 2D coordinates
  • KMeans → cluster labels
  • LLM → cluster names
  • JSON → persistent naming

Cluster Visualization

The scatter plot shows:

  • Each point = one customer comment
  • Colors = cluster groups
  • X/Y axes = semantic dimensions (not sentiment)
  • Negative/positive values = position in embedding space

Interpretation:

  • Points close together → similar meaning
  • Points far apart → different topics

Tech Stack

  • Core
  • Python
  • Streamlit
  • Groq LLMs (Llama‑3.1‑8B‑Instant / Llama‑3.3‑70B‑Versatile)
  • SentenceTransformers
  • scikit‑learn
  • UMAP / t‑SNE
  • Pandas
  • LLM
  • Groq API
  • RAG retrieval
  • Insight generation
  • Cluster naming

Project Structure

Code CX-360/ │ ├── app.py ├── requirements.txt ├── README.md │ ├── src/ │ ├── rag.py │ ├── prompts.py │ ├── clustering.py │ ├── sentiment.py │ ├── utils.py │ └── cluster_names.json │ └── data/ └── sample_feedback.csv 🔧 Setup Instructions

  1. Install dependencies Code pip install -r requirements.txt
  2. Set your Groq API key Code export GROQ_API_KEY="your_key_here" (Linux/Mac syntax) set GROQ_API_KEY=your_key_here (Windows)
  3. Run the app Code streamlit run app.py

Future Improvements

  • Add topic‑level sentiment dashboards
  • Add SHAP explanations for sentiment model
  • Add multi‑language support
  • Add PDF export for insights
  • Add automated weekly CX reports

Why This Project Stands Out

This is not a basic NLP project — it is a full customer‑insight engine combining:

  • Machine learning
  • LLM reasoning
  • RAG
  • Clustering
  • Visualization
  • Business analytics

About

CX‑360 Insight Engine uses LLM‑powered RAG, sentiment analysis, and topic clustering to transform raw customer feedback into actionable insights. It identifies themes, names clusters, analyzes sentiment trends, and generates business recommendations through an interactive Streamlit dashboard.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages