A support inbox that answers from sources, and knows when not to
A Gmail agent that filters, classifies, retrieves from a curated knowledge base, drafts, gets judged, and only sends automatically what is safe.
The problem
Inbound email mixes prospects, clients, suppliers, bounces and spam. A fast wrong answer (a price that isn’t sold, a reply to a supplier’s invoice, a pitch to a paying client) costs more than a slow right one.
The system
- Polls the inbox every 15 minutes with a reconcile pass for missed messages, and filters system mail, suppliers and client-brief threads before any model runs.
- Classifies intent and context, then queries the knowledge base from several angles so one phrasing does not decide what is retrieved.
- Drafts a reply grounded in the retrieved passages and sends it to an LLM judge, which can return it for revision.
- Only clear, low-risk answers are sent automatically; anything with buying intent or doubt stays a draft for a human. A daily loop feeds corrections back into the knowledge base.
Key decisions
Prices come from the storefront’s own source of truth
WhyThe pricing section of the knowledge base is generated from the file the website uses, and a verifier fails when the two disagree.
Trade-offChanging a price means regenerating and re-ingesting, not editing a paragraph.
Re-ingest with a verified purge
WhyVector ids are positional, so a shorter rewrite leaves stale chunks that still get retrieved. Ingestion waits until the index is really empty and reads samples back afterwards.
Trade-offA short window with no knowledge base during each re-ingest.
Decide who not to answer before the model runs
WhySuppliers, and paying clients replying about their briefs, belong to a human.
Trade-offSome messages a model could have handled go to the founder instead.
Results
- 50+ node workflow with judge-gated auto-send
- Graded against a golden set of intent scenarios
- Knowledge base checked against live storefront prices
What I’d do next
Turn the judge rubric into a versioned evaluation suite that runs on every prompt change.