IT Support Ticket Classification Using DistilBERT

This project implements an IT Support Ticket Classification system using DistilBERT.

The objective is to automatically classify IT support tickets into predefined categories based on the text description of the ticket.

The project uses the pretrained DistilBERT (distilbert-base-uncased) transformer model and fine-tunes it for multi-class text classification.

Project Information

Information Details
Project Title IT Support Ticket Classification Using DistilBERT
Author Sonu Kumar
USN SCA25MSD066
Base Model distilbert-base-uncased
Task Multi-class Text Classification
Number of Classes 8

Support Categories

The model classifies IT support tickets into the following categories:

  • Access
  • Administrative rights
  • HR Support
  • Hardware
  • Internal Project
  • Miscellaneous
  • Purchase
  • Storage

Dataset

The dataset contains IT service and support tickets represented as text along with their corresponding topic/category.

Main Columns

Column Description
Document IT support ticket description
Topic_group Support category

Data Preprocessing

The preprocessing pipeline includes:

  1. Removing missing ticket descriptions.
  2. Removing missing category values.
  3. Removing duplicate records.
  4. Encoding category labels.
  5. Splitting the dataset into training, validation, and test sets.
  6. Tokenizing the text using the DistilBERT tokenizer.
  7. Applying a maximum sequence length of 128 tokens.

Model

The project uses:

Base Model: distilbert-base-uncased

Architecture: DistilBERT

Task: Multi-class text classification

Maximum Sequence Length: 128

Training Configuration

Parameter Value
Model distilbert-base-uncased
Number of Classes 8
Maximum Length 128
Training Epochs 2
Learning Rate 2e-5
Weight Decay 0.01
Training Batch Size 16
Evaluation Batch Size 32
Random Seed 42
Data Split 80/10/10

Evaluation Metrics

The model is evaluated using:

  • Accuracy
  • Precision
  • Recall
  • F1 Score

Final metric values should be added after completing model evaluation.

Metric Score
Accuracy Add Result
Precision Add Result
Recall Add Result
F1 Score Add Result

Example Prediction

Input

I am unable to access my company email account.

Predicted Category
Access

Another example:

Input
I need administrator privileges to install required software.
Predicted Category
Administrative rights
Using the Model
from transformers import AutoTokenizer, AutoModelForSequenceClassification

model_id = "YOUR_USERNAME/it-support-ticket-distilbert"

tokenizer = AutoTokenizer.from_pretrained(model_id)

model = AutoModelForSequenceClassification.from_pretrained(model_id)

Replace YOUR_USERNAME with your Hugging Face username.

Making a Prediction
import torch
from transformers import AutoTokenizer, AutoModelForSequenceClassification

model_id = "YOUR_USERNAME/it-support-ticket-distilbert"

tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForSequenceClassification.from_pretrained(model_id)

ticket = "I cannot access my company email."

inputs = tokenizer(
    ticket,
    return_tensors="pt",
    truncation=True,
    padding=True,
    max_length=128
)

with torch.no_grad():
    outputs = model(**inputs)

prediction = torch.argmax(outputs.logits, dim=-1).item()

print("Predicted Label:", prediction)
Technologies Used
Python
PyTorch
Hugging Face Transformers
Hugging Face Datasets
Scikit-learn
Pandas
NumPy
Matplotlib
Seaborn
DistilBERT
Applications

This model can be used for:

Automatic IT ticket routing
IT helpdesk automation
Support ticket categorization
Helpdesk workflow automation
Automatic assignment of support categories
Reducing manual ticket classification
Intelligent IT service management
Limitations

The model's performance depends on the quality and distribution of the training dataset.

The model may perform poorly on tickets that are significantly different from the training data.

Predictions should be treated as automated classification suggestions rather than guaranteed decisions.

This project is intended for educational and research purposes.

Future Improvements

Possible improvements include:

Increasing the training dataset
Adding more IT support categories
Hyperparameter tuning
Training for more epochs
Using larger transformer models
Adding ticket priority prediction
Adding urgency detection
Building a Streamlit web application
Creating a FastAPI prediction API
Integrating the model with an IT helpdesk system
Project Structure
it-support-ticket-distilbert/
β”‚
β”œβ”€β”€ README.md
β”œβ”€β”€ config.json
β”œβ”€β”€ model.safetensors
β”œβ”€β”€ tokenizer.json
β”œβ”€β”€ tokenizer_config.json
β”œβ”€β”€ special_tokens_map.json
β”œβ”€β”€ vocab.txt
β”œβ”€β”€ label_mapping.json
β”œβ”€β”€ notebook/
β”‚   └── it_support_ticket_classification.ipynb
└── test_predictions.csv
Author

Sonu Kumar

USN: SCA25MSD066

License

This project is intended for educational and academic purposes.
Downloads last month
43
Safetensors
Model size
67M params
Tensor type
F32
Β·
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support