https://github.com/thelakshyadubey/automatic_ticket_classification_tool
Automatic ticket classification and document QA system with Pinecone vector search, GROQ LLaMA-3, and SVM-based department prediction
https://github.com/thelakshyadubey/automatic_ticket_classification_tool
embeddings groq langchain llama3 pinecone python streamlit svm-classifier ticket-classification ticketing-system vector-search
Last synced: 2 months ago
JSON representation
Automatic ticket classification and document QA system with Pinecone vector search, GROQ LLaMA-3, and SVM-based department prediction
- Host: GitHub
- URL: https://github.com/thelakshyadubey/automatic_ticket_classification_tool
- Owner: thelakshyadubey
- Created: 2025-06-08T06:14:05.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-06-30T18:55:43.000Z (12 months ago)
- Last Synced: 2025-06-30T19:48:16.135Z (12 months ago)
- Topics: embeddings, groq, langchain, llama3, pinecone, python, streamlit, svm-classifier, ticket-classification, ticketing-system, vector-search
- Language: Python
- Homepage: https://automatic-ticket-classification-tool.onrender.com/
- Size: 4.72 MB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Automatic Ticket Classification Tool
**An AI-powered Streamlit app for automatic classification and management of support tickets using Pinecone vector database, GROQ's LLaMA-3 model, and SVM classification.**
---
## Project Deployed on Render: [https://customer-care-call-summary-alert.onrender.com](https://automatic-ticket-classification-tool.onrender.com)
## Table of Contents
- [Project Overview](#project-overview)
- [Features](#features)
- [Tech Stack](#tech-stack)
- [Installation](#installation)
- [Usage](#usage)
- [Folder Structure](#folder-structure)
- [How It Works](#how-it-works)
- [Author](#author)
---
## Project Overview
This project is a scalable and modular ticket classification system designed to automate the support ticket routing across departments like HR, IT, and Transport. It leverages:
- Semantic similarity search using **Pinecone** vector database
- Contextual question answering powered by **GROQ's LLaMA-3**
- Text embedding via **SentenceTransformers**
- Classification using **Support Vector Machines (SVM)**
- A clean **Streamlit** UI with custom CSS styling for seamless user experience
Use the interface to:
- Enter queries and get answers based on uploaded document knowledge
- Raise tickets automatically classified into departments
- Navigate tabs to view pending tickets
- Upload your own PDFs and CSVs to train or update the classification model
- Save the trained model and reload it later for continued use
- Upload PDFs to build or update the Pinecone vector store
---
## Features
- **Document ingestion:** Extract text from PDFs, chunk it, and embed into Pinecone
- **Semantic search:** Retrieve relevant docs using vector similarity
- **LLM-powered QA:** Generate answers with LLaMA-3 model through GROQ API
- **Ticket classification:** Classify user input into HR, IT, or Transport using SVM
- **Custom UI:** Interactive Streamlit app with session management and CSS styling
- **Model lifecycle:** Train, evaluate, save, and load classification models
- **Departmental ticket views:** Separate tabs to view pending tickets per department
- **User uploads:** You can add your own PDFs and CSV files to train the model, save it, and re-upload for later use
---
---
## Tech Stack
- Python 3.10+
- [Streamlit](https://streamlit.io/) — Frontend framework
- [Pinecone](https://www.pinecone.io/) — Vector database for similarity search
- [GROQ LLaMA-3](https://groq.com/) — Large language model API
- [LangChain](https://langchain.com/) — Chain of LLM components
- [SentenceTransformers](https://www.sbert.net/) — Embeddings generation
- [Scikit-learn](https://scikit-learn.org/) — SVM classification and evaluation
- [PyPDF](https://pypdf.readthedocs.io/en/latest/) — PDF text extraction
- [Python-dotenv](https://pypi.org/project/python-dotenv/) — Environment variable management
---
## Installation
1. Clone the repo:
```bash
git clone https://github.com/thelakshyadubey/Automatic_Ticket_Classification_Tool.git
cd yourrepo
```
2. Install dependencies:
```bash
pip install -r requirements.txt
```
4. Setup environment variables in a .env file:
```bash
PINECONE_API_KEY=your_pinecone_api_key
GROQ_API_KEY=your_groq_api_key
```
## How It Works
- Data ingestion: PDFs are read and split into text chunks, which are embedded using SentenceTransformers and stored in Pinecone.
- User query: When a user submits a query, the app retrieves semantically similar documents from Pinecone.
- Answer generation: GROQ's LLaMA-3 model answers the query based on the retrieved documents.
- Ticket classification: User queries are embedded and classified via a trained SVM to determine the responsible department.
- Ticket management: Tickets are stored in Streamlit session state and displayed under respective department tabs.
- Model lifecycle: Admin interface allows loading CSV data, training the SVM model, evaluating accuracy, and saving/loading the model for future use.
## Author
Lakshya Dubey
## Preview



