Categorize Feedback
Purpose
Process a client feedback message by classifying it into a structured category with sentiment and urgency scoring, then persisting the result.
Instructions
- Extract key phrases from the subject and any available metadata (do NOT use or store the email body — metadata only)
- Call
categorize_feedbackwith the message ID, subject, sender, and extracted key phrases - Inspect the returned
FeedbackCategory:- Record the category (BugReport / FeatureRequest / Praise / Complaint / Question / Other)
- Record sentiment score (-1 to +1)
- Record urgency level (Low / Medium / High / Critical)
- If
IsHighPriorityis true (urgency = High or Critical):- The tool will automatically flag the item for human review via AlertService
- Log the escalation with reason
- Add the message ID to the processed-message log with disposition "Categorized"
Category Definitions
- BugReport: Client reports a defect or malfunction
- FeatureRequest: Client requests new functionality
- Praise: Positive feedback with no action required
- Complaint: Negative feedback about service, quality, or experience
- Question: Request for information or clarification
- Other: Does not fit other categories
Expected Output
The structured FeedbackCategory: category, sentiment, urgency, and whether it was escalated.
