How cngchis/support-ticket-router works
Support Ticket Router generates labeled intent examples, fine-tunes a Phi-4 classifier, and serves single or batch ticket classification with intent-based team and action metadata. The runtime normalizes input, runs available local and optional OpenAI models concurrently, votes across valid predictions, then the API maps the winning intent to routing metadata. Training, evaluation, and data preparation are distinct product workflows. The README describes a generation-to-training progression, but the checked-in paths do not establish how generated raw data becomes the processed training dataset.
Main entry points: train.py Fine-tuning and export · classifier.py Input and consensus · main.py REST endpoints · data_prep.py Dataset preparation
Components 15
Data generation
- Intent taxonomy
data/intent_taxonomy.json - Synthetic example generation
scripts/generate_data.py - Dataset files
data/processed
Model development
- Dataset preparation
scripts/data_prep.py - Base model and LoRA
scripts/model_loader.py - Fine-tuning and export
scripts/train.py - Model evaluation
scripts/evalute.py
Inference service
- REST endpoints
api/main.py - Input and consensus
api/classifier.py - Fine-tuned Phi model
api/classifier.py - GGUF inference
api/classifier.py - GPT-4o-mini
api/classifier.py
Ticket routing
- Team and action maps
api/config.py
Other components
- Ticket submitter
- Support teams
Connections 16
- Ticket submitter → REST endpoints: submits ticket
README.md - REST endpoints → Input and consensus: calls predict
api/main.py - Input and consensus → Fine-tuned Phi model: runs inference
api/classifier.py - Input and consensus → GGUF inference: runs inference
api/classifier.py - Input and consensus → GPT-4o-mini: optionally queries
api/classifier.py - REST endpoints → Team and action maps: maps intent
api/main.py - Team and action maps → Support teams: routes ticket
README.md - Synthetic example generation → Intent taxonomy: reads definitions
scripts/generate_data.py - Synthetic example generation → GPT-4o-mini: generates examples
scripts/generate_data.py - Dataset preparation → Base model and LoRA: imports helper
scripts/data_prep.py - Fine-tuning and export → Dataset preparation: loads and splits
scripts/train.py - Fine-tuning and export → Base model and LoRA: loads and adapts
scripts/train.py - Fine-tuning and export → Dataset files: writes splits
scripts/train.py - Model evaluation → Dataset preparation: uses prompt formatter
scripts/evalute.py - Model evaluation → Dataset files: reads test data
- Fine-tuning and export → Fine-tuned Phi model: exports model