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.
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
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
Each comment is labeled as:
- Positive
- Neutral
- Negative
Sentiment distribution is used in:
- Insight generation
- Cluster summaries
- Business recommendations
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)
- Clean text
- Compute embeddings
- Compute sentiment
- Store results
- Retrieve top 300 semantically similar comments
- Compute sentiment distribution
- Pass context to LLM
LLM produces:
- Themes
- Patterns
- Recommendations
- Recovery plan
- Executive summary
- t‑SNE → 2D coordinates
- KMeans → cluster labels
- LLM → cluster names
- JSON → persistent naming
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
- 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
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
- Install dependencies Code pip install -r requirements.txt
- Set your Groq API key Code export GROQ_API_KEY="your_key_here" (Linux/Mac syntax) set GROQ_API_KEY=your_key_here (Windows)
- Run the app Code streamlit run app.py
- 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
This is not a basic NLP project — it is a full customer‑insight engine combining:
- Machine learning
- LLM reasoning
- RAG
- Clustering
- Visualization
- Business analytics