
The Problem
Customer support inboxes get flooded with emails daily. Some need expert human attention, others are routine questions that keep coming up again and again.
- Process incoming customer emails automatically
- Determine the sentiment and urgency of each message
- Identify which ones need human expertise
- Automatically respond to straightforward inquiries
The Setup: Three Core Components
Our solution consists of three main parts:
- Data Source: A JSON file containing customer support messages
- AI Analysis Engine: Anthropic Claude 3.7 with Pydantic AI for structured output
- Datazone Pipeline: It’s the simplest part of the flow thanks to Datazone. 😎
The Data: Raw Customer Messages
Here’s what our sample data looks like:Datazone + Pydantic AI: Perfect Together
We created a Pydantic model to structure the AI’s analysis:The Instructions: Guiding the AI
We wrote a clear set of instructions for the AI in a markdown file:The Pipeline: Orchestrating the Workflow
Here’s the Datazone pipeline we built:The Decision Engine: Human or Machine?
The key part of the system is the logic that decides which emails need human attention:Final Data ✨
The Dashboard: Real-time Monitoring
We built a dashboard in Datazone to monitor the system:
- Total message volume
- Average urgency levels
- Messages requiring human intervention
- Sentiment distribution across all communications
Please don’t assume I moved the data to another platform or used a traditional BI tool to build this app! 😊 I’m still in Datazone and accomplished this with a simple command to Orion AI. For more details, check out the Intelligent App section.
The Results: Real Business Impact
After deploying the system:
- Approximately 60% of customer emails are now handled automatically
- Response time has decreased to under 1 hour
- Support team can focus on complex issues that truly need human expertise
- Customer satisfaction has improved due to faster response times
Next Steps for this Project
- Using tools for enhanced actions by LLM like accessing user detail, previous interactions, and context to improve response accuracy.
- Give more context about the business case to find better insights and responses.
- Use some prompt engineering methods like few-shot prompting to categorize and notice correct sentiment.
- Implement feedback loops to continuously improve the model’s performance based on real-world interactions.