| --- |
| language: en |
| tags: |
| - phi-2 |
| - customer-service |
| - transcript-analysis |
| - multi-issue |
| license: mit |
| --- |
| |
| # Phi-2 Multi-Issue Transcript Analysis Model |
|
|
| This model is based on Microsoft's Phi-2 for analyzing customer service transcripts with multiple issues. It can: |
|
|
| 1. Identify primary and secondary issues |
| 2. Analyze customer sentiment |
| 3. Rate agent performance |
| 4. Track resolution status |
| 5. Predict CSAT scores |
| 6. Extract key actions and outcomes |
|
|
| ## Model Details |
|
|
| - **Base Model**: microsoft/phi-2 |
| - **Task**: Multi-issue customer service transcript analysis |
| - **Training Data**: Customer service transcripts with multiple issues |
| - **Output Format**: Structured JSON with detailed analysis |
|
|
| ## Usage |
|
|
| ```python |
| from transformers import AutoModelForCausalLM, AutoTokenizer |
| |
| # Load model and tokenizer |
| model = AutoModelForCausalLM.from_pretrained("chendren/phi2-multi-issue-analysis") |
| tokenizer = AutoTokenizer.from_pretrained("chendren/phi2-multi-issue-analysis") |
| |
| # Prepare input |
| transcript = """[Your customer service transcript here]""" |
| |
| # Generate analysis |
| inputs = tokenizer(transcript, return_tensors="pt") |
| outputs = model.generate(**inputs, max_new_tokens=512) |
| analysis = tokenizer.decode(outputs[0]) |
| ``` |
|
|
| ## Example Output |
|
|
| ```json |
| { |
| "primary_issue": "Internet connection drops", |
| "secondary_issues": [ |
| "Signal interference", |
| "Router firmware outdated" |
| ], |
| "customer_sentiment": "negative", |
| "agent_performance": { |
| "rating": 4, |
| "justification": "Agent was helpful and provided clear instructions" |
| }, |
| "resolution_status": "resolved", |
| "follow_up_needed": false, |
| "key_points": [ |
| "Customer experienced internet drops", |
| "Agent guided through troubleshooting", |
| "Issue resolved with firmware update" |
| ], |
| "issues": [ |
| "Intermittent connection drops", |
| "WiFi interference", |
| "Outdated firmware" |
| ], |
| "actions": [ |
| "Diagnosed signal fluctuations", |
| "Updated router firmware", |
| "Provided monitoring instructions" |
| ], |
| "outcomes": [ |
| "Connection stability improved", |
| "Firmware updated successfully" |
| ], |
| "predicted_csat": 4 |
| } |
| ``` |
|
|
| ## Limitations |
|
|
| - Designed specifically for customer service transcripts |
| - Best performance with clear dialogue format |
| - May require adjustment for different transcript formats |
|
|
| ## Citation |
|
|
| If you use this model, please cite: |
|
|
| ```bibtex |
| @misc{phi2-multi-issue-analysis, |
| author = {args.username}, |
| title = {Phi-2 Multi-Issue Transcript Analysis Model}, |
| year = {2025}, |
| publisher = {Hugging Face}, |
| journal = {Hugging Face Model Hub}, |
| howpublished = {https://huggingface.co/chendren/phi2-multi-issue-analysis} |
| } |
| ``` |
|
|