Update app.py
Browse files
app.py
CHANGED
|
@@ -472,14 +472,17 @@ def perform_ticket_analysis(file, user_query, progress=gr.Progress()):
|
|
| 472 |
|
| 473 |
categorization_prompt = f"""
|
| 474 |
You are an expert customer support ticket analyst. Your task is to categorize ALL provided customer tickets in this batch.
|
| 475 |
-
For each ticket, identify a concise main category (e.g., 'Technical Issue', 'Billing Inquiry', 'Feature Request', 'Account Management', '
|
| 476 |
-
|
| 477 |
Your output MUST be a simple list, one ticket per line, in the format:
|
| 478 |
Ticket ID: [Original Ticket ID from metadata] - Category: [Determined Category] - Issue Summary: [Very brief 1-2 sentence summary of the core issue]
|
| 479 |
|
| 480 |
Example:
|
| 481 |
Ticket ID: TKT-001 - Category: Technical Issue - Issue Summary: User cannot log in due to password error.
|
| 482 |
Ticket ID: INV-567 - Category: Billing Inquiry - Issue Summary: Customer dispute charge for duplicate service.
|
|
|
|
|
|
|
|
|
|
| 483 |
|
| 484 |
Context (Customer Tickets - analyze ALL of these, total {len(chunk_documents)} tickets in this batch):
|
| 485 |
{categorization_context}
|
|
@@ -986,7 +989,7 @@ with gr.Blocks(theme=gr.themes.Soft(), css="""
|
|
| 986 |
gr.Markdown(
|
| 987 |
"""
|
| 988 |
### Welcome to the Advanced AI Customer Ticket Analyst! 👋
|
| 989 |
-
This powerful tool
|
| 990 |
Upload your Excel or CSV file and ask a specific question, or leave the query blank for a **comprehensive analysis** including categorization, root causes, predictions, and proactive measures.
|
| 991 |
|
| 992 |
---
|
|
|
|
| 472 |
|
| 473 |
categorization_prompt = f"""
|
| 474 |
You are an expert customer support ticket analyst. Your task is to categorize ALL provided customer tickets in this batch.
|
| 475 |
+
For each ticket, identify a concise main category (e.g., 'Technical Issue', 'Billing Inquiry', 'Feature Request', 'Account Management', 'Order Status', 'Delivery Issue', 'Product Defect', 'General Inquiry', 'Performance Problem', 'Data Access').
|
| 476 |
+
**You MUST aim for at least 5-6 distinct main categories, even if some categories only have a few tickets.** Do not merge categories unless absolutely necessary.
|
| 477 |
Your output MUST be a simple list, one ticket per line, in the format:
|
| 478 |
Ticket ID: [Original Ticket ID from metadata] - Category: [Determined Category] - Issue Summary: [Very brief 1-2 sentence summary of the core issue]
|
| 479 |
|
| 480 |
Example:
|
| 481 |
Ticket ID: TKT-001 - Category: Technical Issue - Issue Summary: User cannot log in due to password error.
|
| 482 |
Ticket ID: INV-567 - Category: Billing Inquiry - Issue Summary: Customer dispute charge for duplicate service.
|
| 483 |
+
Ticket ID: FEAT-123 - Category: Feature Request - Issue Summary: Customer wants dark mode for mobile app.
|
| 484 |
+
Ticket ID: ACC-987 - Category: Account Management - Issue Summary: User unable to update profile information.
|
| 485 |
+
Ticket ID: DEL-456 - Category: Delivery Issue - Issue Summary: Package delivery delayed, tracking not updated.
|
| 486 |
|
| 487 |
Context (Customer Tickets - analyze ALL of these, total {len(chunk_documents)} tickets in this batch):
|
| 488 |
{categorization_context}
|
|
|
|
| 989 |
gr.Markdown(
|
| 990 |
"""
|
| 991 |
### Welcome to the Advanced AI Customer Ticket Analyst! 👋
|
| 992 |
+
This powerful tool to provide detailed, structured insights from your customer support tickets.
|
| 993 |
Upload your Excel or CSV file and ask a specific question, or leave the query blank for a **comprehensive analysis** including categorization, root causes, predictions, and proactive measures.
|
| 994 |
|
| 995 |
---
|