RESOLVEAI is an AI-powered customer complaint management system built using Streamlit. It intelligently classifies complaints by category and urgency, generates AI-based responses, and provides separate interfaces for customers and administrators to manage and resolve issues effectively.
- Submit new complaints with auto-tagging of category and urgency
- AI-generated response using Groq LLM (Gemma2 9B IT)
- View history of past complaints
- Submit follow-up messages
- Secure login for admins
- View, search, and filter all customer complaints
- Update complaint status and resolution messages
- Track urgency and categorize complaints
- Machine Learning model for category prediction
- Sentiment model for urgency prediction
- Urgency detection using a custom classifier
- Vector Search with FAISS for semantic understanding
- LLM response generation using HuggingFace embeddings + Groq’s Gemma 2B
Final AI CCR/
│
├──main/
│ ├── pages/
│ ├── admin_dashboard.py # Admin dashboard and functionality
│ ├── chatbot.py # Standalone chatbot interface
│ └── customer_form.py # Customer UI for complaint submission & history
│ ├── app.py # Entry point (Login & routing logic)
│ ├── complaint_classifier.pkl # Classification model
│ ├── classifier.py # Complaint classification, FAISS vector search, LLM response
│ └── improved_complaint_classifier_training.ipynb # ML training model
│
├── data/
│ └── realistic_complaints_dataset_9990_cleaned.csv
│
├── faiss_index/
│ ├── index.faiss
│ └── index.pkl # FAISS vector store for semantic search
│
├── .gitignore
├── complaint_responder.sql # SQL schema and initialization
├── data.txt
├── venv/ # Virtual environment
└── improved_complaint_classifier_training.ipynb
The system uses a MySQL database with the following structure:
-- Create the complaints table (if it doesn't exist)
CREATE TABLE IF NOT EXISTS complaints (
Id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
C_id INT NOT NULL,
Complaint_text TEXT,
Predicted_category VARCHAR(100),
Auto_response TEXT,
Timestamp DATETIME DEFAULT CURRENT_TIMESTAMP,
Complaint_status VARCHAR(50) DEFAULT 'None',
Urgency VARCHAR(10),
Followup TEXT,
Admin_note TEXT
);
-- Simplified Customers Table
CREATE TABLE IF NOT EXISTS customers (
customer_id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(100) NOT NULL,
email VARCHAR(100) NOT NULL UNIQUE
);
-- Simplified Admins Table
CREATE TABLE IF NOT EXISTS admins (
admin_id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(100) NOT NULL,
email VARCHAR(100) NOT NULL UNIQUE
);
- Frontend: Streamlit
- Backend: Python, Hugging Face Transformers, Groq API
- ML Models: BERT classifier (sklearn), Urgency classifier
- Vector Store: FAISS
- Database: MySQL (via complaint_responder.sql)
- Embeddings: Hugging Face sentence transformer
-
Clone the repository
git clone https://github.com/yourusername/RESOLVEAI.git cd RESOLVEAI -
Create and activate a virtual environment
python -m venv venv source venv/bin/activate # on Unix .\venv\Scripts\activate # on Windows
-
Install dependencies
pip install -r requirements.txt
-
Configure Groq API key
Inclassifier.py, set your API key:os.environ["GROQ_API_KEY"] = "your-api-key"
-
Run the app
streamlit run app.py