Paper 1 of 5
Measure Before You Train: Typed Decision Models vs. a Classical Baseline vs. a Generative LLM for Routing a Personal Multilingual Inbox
Problem
Existing personal email agents rely on ad‑hoc keyword rules or generative LLMs, but their error rate is never measured and the production rules achieve only 28% accuracy, far below the 58% majority baseline, so simply adding more rules or using LLMs does not fix the underlying misclassification problem.
Approach
The paper introduces a measurement protocol that creates ground‑truth labels before any model training by using stratified sampling, frozen snapshots, thread‑grouped cross‑validation and human review within the agent. Nine systems are then evaluated on the same labeled set: production keyword rules, a TF‑IDF + logistic‑regression baseline, local typed decision models (Tev1 0.8B and 4B, Nimble 9B), a hosted typed decision model (Nimble v4‑max) and hosted generative LLMs (Qwen2.5‑7B, Gemma 4 26B‑A4B, Gemma 4 31B). All models are run zero‑shot except the baseline which is trained on ~200 labels, allowing a direct comparison of classical versus decision‑model versus generative approaches.
Result
Logistic regression achieves the highest accuracy on every field (type 0.79, urgency 0.74, needs‑reply 0.83, is‑noise 0.90) while never predicting the two rarest classes. Production keyword rules score only 0.28 on type against a 0.57 majority baseline. The best generative model (Gemma 4 26B) reaches 0.74 type accuracy but still lags the baseline, and it produces far fewer false‑noise actions (4% vs 18% for the baseline).
Why it matters
Researchers and practitioners building personal email automation should consider a small, well‑measured classical baseline before deploying costly generative models, as it can deliver higher field accuracy and lower latency.
Method details
- TF‑IDF + Logistic‑Regression baseline trained on ~200 labeled emails, latency 1 ms, type accuracy 0.788, urgency 0.736, needs‑reply 0.831, is‑noise 0.900
- Local Tev1 0.8B model on CPU, latency 3.8 s, type accuracy 0.623, urgency 0.251
- Local Tev1 4B model on T4 GPU, latency 0.35 s, type accuracy 0.688
- Hosted Nimble v4‑max (9B) model, latency 0.50 s, type accuracy 0.701
- Hosted generative Gemma 4 26B‑A4B, latency 0.76 s, type accuracy 0.740
- Dataset: 231 real Italian/English emails (unbiased v2) plus 500 adversarially sampled emails (v3) with human labels collected in the agent’s review loop
Numbers
- type accuracy logistic regression 0.788 [0.74 to 0.84] vs majority 0.571
- urgency accuracy logistic regression 0.736 [0.68 to 0.79] vs majority 0.697
- needs‑reply accuracy logistic regression 0.831 vs majority 0.740
- is‑noise accuracy logistic regression 0.900 vs majority 0.515
- production rules type accuracy 0.277 [0.22 to 0.34] vs majority 0.571
- Gemma 4 26B type accuracy 0.740 [0.68 to 0.80]
Limitations
The evaluation is limited to a single personal inbox with 231 unbiased emails and a specific multilingual (Italian/English) setting, so broader generalisation to other users, languages or larger volumes is not demonstrated.
with about two hundred labels, a logistic regression has the highest accuracy of any system on every fieldFound in the source text, word for word.
Picked because: Presents Foyer, a self‑hosted personal inbox LLM agent with a concrete measurement protocol and released code, directly useful for building and evaluating production LLM‑driven automation.