← Back to all projects

AI-Powered Email Recommender Tool

Shipped

August 10, 2026

A multi-agent RAG pipeline that drafts emails by retrieving and reasoning over SOPs and past correspondence.

Overview

SWEE is a multi-agent, LangGraph-based Retrieval-Augmented Generation (RAG) pipeline built to draft emails automatically. It combines hybrid retrieval over SOPs and prior correspondence with a six-stage agentic architecture to produce contextually grounded, ready-to-review drafts.

Architecture

  • Six-stage multi-agent pipeline — each stage handles a discrete part of the drafting process, from intent extraction through to final draft assembly.
  • Hybrid retrieval — a three-path retrieval strategy over LanceDB, combining multiple signals to surface the most relevant source material.
  • Dual-embedding ingestion schema — documents are indexed with separate intent_vec and answer_vec embeddings, allowing retrieval to match on either the intent behind a query or the content of a candidate answer.
  • Messaging — Azure Service Bus decouples pipeline stages for asynchronous processing.

Retrieval Design

Several retrieval strategies were evaluated during development, including HyDE (Hypothetical Document Embeddings). HyDE was ultimately dropped for this use case, as it didn't hold up well for email-to-email retrieval — the three-path hybrid approach on LanceDB proved more effective.

Security

Retrieved SOP chunks are treated as untrusted input. The pipeline includes mitigations for prompt injection risks that could otherwise arise from content pulled into the context window during retrieval.

Infrastructure & Deployment

  • CI/CD — Azure DevOps pipelines, restructured to use PR-based triggers with named environments and approval gates, tightening the path from code review to deployment.
  • Hosting — Azure App Service, fronted by Azure APIM.
  • Containerization — Docker.

Evolution

The application progressed through several iterations:

  • v1 — initial implementation.
  • v2 (Agentic AI implementation) — originally scoped as a greenfield multi-agent rebuild; ultimately a hybrid approach was recommended instead, extracting shared services from v1 rather than a full rewrite.
  • v3 — the current six-stage multi-agent architecture, with ongoing work on a two-round user-testing regression strategy to validate changes before rollout.

Status

Actively in development — current focus is validating the v3 architecture through structured user testing.