Assignment: Smart Email Assistant using ML, GenAI, AWS & Agentic AI
Company: Newel Technologies Pvt. Ltd.
Location: On-site | Thane, Maharashtra
Role: AI Engineer (0–2 years experience)
Objective
Build a multi-agent system that automates handling of internal company emails by:
- Classifying emails into predefined categories using ML
- Generating appropriate replies using a Generative AI model
- Escalating unclear or low-confidence emails for manual review
The system should be implemented using an agentic framework (e.g., CrewAI,
AutoGen)
Email Categories
- HR
- IT
- Other
Agent Design & Requirements
1. Email Classification Agent (ML-Based)
- Train a supervised ML model to classify emails into the above categories.
- Acceptable models: Logistic Regression, Decision Tree,Random Forest,XgBoost
Format with Eg
- Input format:
```json
{
"email_text": "Hi, I forgot my laptop password. Please help."
}
```
- Output format:
```json
{
"email_text": "...",
"predicted_category": "IT",
"confidence": 0.89
}
```
- Report accuracy,confusion matrix and classification report
- Define and use a confidence threshold (suggested: 0.6).
2. Response Generator Agent (GenAI-Based)
- Generate context-aware email replies using an LLM (preferably OpenSource LLMs)
Format with eg
- Input format :
```json
{
"email_text": "...",
"predicted_category": "IT"
}
```
- Output format:
```json
{
"response": "...."
}
```
- Adapt prompts dynamically based on email category.
3. Escalation Agent
- Trigger when classification confidence < 0.6 and category is "Other".
- Log or flag such emails for manual review.
Format with eg
- Input format:
```json
{
"email_text": "...",
"predicted_category": "Other",
"confidence": 0.45
}
```
- Output format:
```json
{
"status": "escalated",
"reason": "Low confidence or unknown category",
"logged_to": "escalation_log.txt"
}
```
Dataset Size & Format
1. Size Recommendation:
● Minimum: 200–300 labeled emails(Categories should be balanced)
2. Label Format:
Each email should include:
● email_text: The content of the email
● category: One of ['HR', 'IT', 'Other']
Workflow Logic
1. Receive raw email → Email Classification Agent
2. If confidence ≥ 0.6 **and** category ≠ "Other" → Response Generator Agent
3. Else → Escalation Agent
4. Return generated response or escalation status
Deliverables
● Modular source code implementing each agent and orchestrator.
● Dataset (public or synthetically created) with labeled emails.
● README.md documenting:
- Project overview and architecture
- ML model details and evaluation metrics
- Prompt design and LLM integration
- Setup and execution instructions
● UI (eg: Streamlit) for testing emails
● Demo Video of Entire Project
Optional Bonus
- Entire Project Deployment on AWS (Lambda/EC2) and classification model,LLM Model
deployment on AWS sagemaker .
Submission
- Send your GitHub,websitepublicUrl,DemoVideo to: hr@neweltechnologies.com
- Use subject: **[Your Name] – Smart Email Assistant Submission**
Deadline:
-Submit under 48 hours strictly.
Sample Github Folder Structure for Submission
smart-email-assistant/
│
├── data/
│ └── emails.csv # Dataset (Synthetically created/Downloaded)
├── notebooks/
│ └── data_cleaning.ipynb #various ipynb notebooks for detailed cleaning,eda,etc.
├── agents/
│ ├── email_classifier.py # Email Classification Agent code
│ ├── response_generator.py # Response Generator Agent code
│ └── escalation_agent.py # Escalation Agent code
├── models/
│ └── model.pkl #model weight for inference
├── orchestrator.py # Code that manages agent interactions and workflow logic
│
├── requirements.txt # Python dependencies
│
├── README.md # Project overview and instructions
│
└── utils.py # Utility/helper functions (optional)