Email Router.
Zero-shot email classification, taken from a script to a tracked, containerized service.
- Python
- FastAPI
- Docker
- MLflow
- LangGraph
- RAG
- Vector stores
The problem
Routing inbound email by category usually means either hand-written rules that rot, or a supervised model that needs a labelled dataset before it can classify anything at all. Zero-shot sidesteps the cold start — but a model in a notebook isn't a service, and without experiment tracking you can't tell whether the last change to the label set helped or hurt.
Approach
Used zero-shot classification so the router could categorize mail without first assembling a labelled training set for every category.
Moved the work from a standalone Python script into a containerized FastAPI service, giving it a real HTTP interface and a reproducible runtime.
Added MLflow experiment tracking so changes to prompts, labels and model choice could be compared against each other rather than assessed by eye.
Prototyped an agentic architecture alongside the classifier — retrieval-augmented generation over vector stores, with graph-based agent orchestration in LangGraph.
Outcome
- Classifies into new categories without a labelled dataset per category.
- Runs as a deployable containerized service rather than a script on someone's machine.
- Model and prompt changes are measured through tracked experiments, not guessed at.
In full
An email classification service built on zero-shot classification, taken from a Python script to a containerized FastAPI service with MLflow experiment tracking. An agentic architecture was prototyped alongside it, covering retrieval-augmented generation, vector stores, and graph-based agent orchestration.