This project analyzes a sender's email writing style and generates consistent, context-aware replies using GPT and the Enron Email Dataset. It integrates with Semantic Kernel to orchestrate prompt flows and agent coordination.
flowchart LR
A[Input Past Emails] --> B[Style Extractor]
B --> C[Style Summary (JSON)]
- Parses historical emails from the sender.
- Outputs a JSON capturing writing traits such as:
- Tone
- Structure
- Greeting and sign-off patterns
- Language preferences
flowchart LR
A[User Input + Incoming Email + Style Info] --> B[Reply Agent]
B --> C[Generated Reply]
- Inputs:
- Incoming email
- Up to 5 recent email threads
- Style summary (from Style Agent)
- User instructions or intent
- Output: A reply email consistent with the sender’s writing style and context
- Purpose: Improve accuracy of style analysis by understanding deeper user context
- Approach: Let GPT scan the user’s email history to build a richer, implicit tone model
- Use Case: Enhances style consistency even for ambiguous or short prompts
flowchart LR
A[Input Emails] --> B[Project Info Extractor]
B --> C[Project Summary (JSON)]
- Extracts project-related details (temporarily deprioritized):
- Project names, statuses, and timelines
- Milestones
- Involved members
- Relevant keywords
-
Email Style Profiling
Identify and summarize tone, formatting, and stylistic traits. -
Context-Aware Reply Generation
Use email history and user input to create smart, style-aligned replies. -
Agent-Based Design
Built to work with tools like Semantic Kernel for modular, scalable orchestration.
We use the Enron Email Dataset, which contains real-world emails exchanged among Enron employees.
- Language Model: OpenAI GPT
- Agent Orchestration: Semantic Kernel
- Backend: Python
- Data Format: JSON (for style and prompt summaries)
- Dataset: Enron Email Dataset (Kaggle)
start : uvicorn app:app --reload