File size: 3,261 Bytes
fe86d03
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
---
language: en
license: apache-2.0
tags:
- text-classification
- distilbert
- ticket-classification
- customer-support
- it-support
datasets:
- custom
metrics:
- accuracy
- f1
widget:
- text: "I can't log into my account, password reset not working"
- text: "System is very slow, taking forever to load pages"
- text: "How do I integrate with Salesforce API?"
---

# TicketCat: IT Support Ticket Classification Model

This is a fine-tuned DistilBERT model for classifying IT support tickets into 9 categories.

## Model Description

This model was fine-tuned on customer support tickets to automatically categorize incoming IT support requests. It uses DistilBERT as the base model and was trained to classify tickets into 9 distinct categories.

## Intended Use

This model is designed to automatically categorize IT support tickets to help route them to the appropriate support team or department.

## Categories

The model classifies tickets into the following categories:

- Account Access / Login Issues
- Billing & Payments
- Bug / Defect Reports
- Feature Requests
- General Inquiries / Other
- How-To / Product Usage Questions
- Integration Issues
- Performance Problems
- Security & Compliance

## Usage

```python
from transformers import DistilBertForSequenceClassification, DistilBertTokenizer
import torch

# Load model and tokenizer
model_name = "YOUR_HF_USERNAME/ticketcat-distilbert"  # Replace with your actual model name
tokenizer = DistilBertTokenizer.from_pretrained(model_name)
model = DistilBertForSequenceClassification.from_pretrained(model_name)

# Classify a ticket
ticket_text = "I can't access my account, password reset link is not working"
inputs = tokenizer(ticket_text, return_tensors="pt", padding=True, truncation=True, max_length=128)

with torch.no_grad():
    outputs = model(**inputs)
    probs = torch.softmax(outputs.logits, dim=1)
    predicted_class = torch.argmax(probs, dim=1).item()
    confidence = probs.max().item()

# Map to category name
categories = {'0': 'Account Access / Login Issues', '1': 'Billing & Payments', '2': 'Bug / Defect Reports', '3': 'Feature Requests', '4': 'General Inquiries / Other', '5': 'How-To / Product Usage Questions', '6': 'Integration Issues', '7': 'Performance Problems', '8': 'Security & Compliance'}
predicted_category = categories[str(predicted_class)]

print(f"Category: {predicted_category}")
print(f"Confidence: {confidence:.4f}")
```

## Training Details

- **Base Model**: distilbert-base-uncased
- **Framework**: Hugging Face Transformers
- **Task**: Multi-class text classification
- **Number of Classes**: 9
- **Max Sequence Length**: 128 tokens
- **Training Approach**: Fine-tuning with class weights for imbalanced data

## Limitations

- The model was trained on IT/customer support tickets and may not perform well on other domains
- Performance may vary on tickets that don't fit clearly into one category
- Low confidence predictions (< 0.6) may need human review

## Citation

If you use this model, please cite:

```
@misc{ticketcat2024,
  author = {TicketCat Team},
  title = {TicketCat: IT Support Ticket Classification},
  year = {2024},
  publisher = {Hugging Face},
  howpublished = {\url{https://huggingface.co/YOUR_USERNAME/ticketcat-distilbert}}
}
```