AI Automation
Human in the Loop Automation
Task decomposition
- An inbox is polled for new unread email (checked every minute).
- The incoming email is used to build a reply-drafting prompt: reply naturally, keep it brief, ask to schedule a call for personal matters, and decline events/invitations/promotions politely.
- A draft reply is generated.
- The draft is sent to the user for approval, along with the original email it’s replying to, and the workflow pauses until a decision is made.
- If approved, the reply is sent immediately as a real reply to the original email thread.
- If rejected, the user is asked for free-text feedback on what to change, and the workflow pauses again until they respond.
- The feedback is folded into a new prompt, which explicitly shows the AI its previous failed attempt and the user’s specific complaint, and the reply is redrafted.
- The redrafted reply goes back through the same approval step, and the cycle repeats until approved.
Objective of the workflow
- This is the human-in-the-loop counterpart to the judge-threshold version, instead of an AI judge deciding when a reply is good enough, a human approves or rejects each draft directly, with rejection feedback fed straight back into the next attempt.
- It shows a different control pattern for the same underlying task: trading full autonomy for a review checkpoint on every outbound message. Built for CIS 515 (AI and Data Analytics Strategy).
Architecture
