Skip to content

Content-Based Smart E-Mail Dispatcher Using Large Language Models

๐Ÿ•’ Published (v1): 2026-06-25 04:34 UTC ยท Source: Arxiv ยท link

Ask a follow-up

Open an assistant pre-loaded with this paper's context.

๐Ÿ’ฌ Ask ChatGPTโœฆ Ask Claude

TL;DR

A LangChain-based agent system that reads institutional emails and automatically routes them to the correct student WhatsApp groups by querying an LLM for content-based classification. The system requires no labeled training data and achieves up to 93.5% routing accuracy. It targets a narrow but real operational bottleneck in university email management.

Problem

Staff at engineering colleges manually read departmental emails and forward them to semester-specific student WhatsApp groups โ€” a process that is error-prone, time-consuming, and causes cognitive overload. Existing automation tools (e.g., Zapier, Pabbly) forward emails without content analysis, making them unsuitable for routing to multiple audience-specific groups.

Method

A three-stage pipeline: (1) Data capture โ€” emails and attachments are read from the inbox; (2) Content analysis โ€” a LangChain agent submits email text to an LLM API with a structured prompt that includes institutional context (group names, batch years, faculty group) and instructions for multi-label target group selection; (3) Dispatching โ€” the agent uses a custom WhatsApp tool to post the email content/attachments to LLM-recommended groups. The prompt is hand-engineered using collected domain knowledge about email categories (circulars, announcements, valuation notices, etc.) derived from a corpus of 1,000+ institutional emails.

Key Contributions

  • Zero-shot/few-shot LLM-based multi-label routing that requires no labeled dataset or retraining when new student batches are added.
  • LangChain agent framework with custom WhatsApp dispatch tool, enabling end-to-end email-to-messaging automation.
  • Empirical comparison of four LLMs (Gemini, ChatGPT, DeepSeek, Perplexity) on a domain-specific routing task.
  • Ablation argument demonstrating why classical ML/DL approaches are structurally ill-suited for this dynamic multi-label routing problem.

Results

  • Accuracy is defined as perfect multi-label match (any extra or missing target group counts as misclassification).
Model Accuracy
Gemini 93.5%
ChatGPT 92.0%
Perplexity 82.5%
DeepSeek 80.0%
  • Primary error mode: valuation/revaluation circulars intended only for faculty are incorrectly recommended to student groups as well.
  • Circulars referencing batch series (without explicit year) are correctly resolved to target groups.

Limitations

  • Dataset of 1,000 emails is single-institution and not publicly released; generalizability is unverified.
  • Accuracy metric is strict exact-match on groups; partial correctness (e.g., routing to 3/4 correct groups) is not quantified.
  • Prompt engineering is manual and institution-specific; adapting to a new organization requires re-engineering the context.
  • No evaluation of latency, cost per dispatch, or failure modes under API downtime.
  • WhatsApp API integration details and rate limits are not discussed.
  • No human-baseline comparison to establish how well staff currently perform the manual task.

Relevance to Agentic AI / LLM Agents

This paper is a concrete small-scale deployment of the tool-using agent paradigm: a LangChain agent reasons over unstructured text and actuates a real external service (WhatsApp) via a custom tool, with no human in the loop. It demonstrates that LLM agents can replace brittle rule-based automation in real organizational workflows without labeled data. The multi-label routing task also illustrates a common agentic challenge โ€” selecting among dynamically changing action targets (new student batches each year) โ€” where the LLM's world-knowledge substitutes for a trained classifier. While the domain is narrow, the pattern (agent + prompt context + external tool dispatch) directly instantiates the zero-shot task decomposition approach studied in broader agentic AI literature.