Measure Before You Train: Typed Decision Models vs. a Classical Baseline vs. a Generative LLM for Routing a Personal Multilingual Inbox
Organizations: Independent researcher, Trento, Italy
Abstract
Personal email agents decide, for every message, what it is, whether it is urgent, whether to draft a reply, create a task, or ignore it. Their error rate is rarely measured: the stored labels were written by the system itself. We present Foyer, a self-hosted personal inbox agent in daily use, and a measurement protocol (stratified sampling, frozen snapshots, thread-grouped splits, pre-registered hypotheses, human labels in the agent's review loop) that yields ground truth before any training. On 739 real Italian/English emails labelled by the owner (231 unbiased, 500 adversarially sampled), we compare nine systems under thread-grouped cross-validation: the production keyword rules, a TF-IDF + logistic-regression baseline, local typed decision models (Tev1, Nimble), a hosted decision model (Nimble v4-max), and hosted generative LLMs (Qwen2.5-7B, Gemma 4 26B/31B). Four results. The production rules score 28% on message type against a 58% majority class: the field shown most prominently carried no information. With ~200 labels, logistic regression has the highest accuracy on every field (type 0.79, urgency 0.74, needs-reply 0.83, is-noise 0.90), though it never predicts the two rarest classes and is statistically tied with Gemma 4 on type; few-shot prompting does not close the gap. The sender's relationship (client, supplier, service) is recovered from other emails of the same contact with 98.6% accuracy where the contact has been seen, and is not inferable from a single message by any model: it belongs in the contact graph, not the prompt. Finally, accuracy is not the product metric: composed into actions, the most accurate system most often ignores emails needing action (18% vs 4% for the best LLM); a cost-chosen threshold on its noise probability halves that rate and makes it the cheapest system.
Figures & tables
| Type | n | Relationship | n |
| aggiornamento | 132 | servizio | 115 |
| newsletter | 53 | cliente | 69 |
| richiesta | 20 | me | 18 |
| altro | 18 | monitoraggio | 14 |
| offerta | 5 | fornitore | 8 |
| spam | 3 | famiglia / socio / istituzione | 7 / 6 / 2 |
| Type | Urgency | ||||
| System | Acc. [95% CI] | M-F1 | Acc. [95% CI] | M-F1 | Latency |
| Majority class | 0.571 | 0.121 | 0.697 | 0.274 | – |
| Production rules (keyword) | 0.277 [.22–.34] | 0.205 | 0.684 [.62–.75] | 0.291 | 1 ms |
| B: TF-IDF + LogReg | 0.788 [.74–.84] | 0.474 | 0.736 [.68–.79] | 0.548 | 1 ms |
| Tev1 0.8B, local CPU | 0.623 [.56–.68] | 0.284 | 0.251 [.20–.31] | 0.235 | 3.8 s |
| Tev1 4B, local T4 | 0.688 | 0.386 | 0.450 | 0.379 | 0.35 s |
| System | needs-reply | action-48h | is-noise |
|---|---|---|---|
| (yes 60) | (yes 20) | (yes 119) | |
| Majority class | 0.740 / 0.425 | 0.913 / 0.477 | 0.515 / 0.340 |
| B: TF-IDF + LogReg | 0.831 / 0.742 | 0.931 / 0.731 | 0.900 / 0.899 |
| Tev1 0.8B, local | 0.706 / 0.465 | 0.840 / 0.578 | 0.628 / 0.626 |
| Nimble v4-max, hosted | 0.805 / 0.743 | 0.805 / 0.536 | 0.857 / 0.857 |
| Gemma 4 26B-A4B | 0.796 / 0.731 | 0.849 / 0.569 | 0.809 / 0.806 |
| Input / features | type | urgency | needs-reply | action-48h | is-noise |
|---|---|---|---|---|---|
| TF-IDF, with sender | 0.74 / 0.38 | 0.71 / 0.41 | 0.84 / 0.78 | 0.90 / 0.47 | 0.89 / 0.89 |
| TF-IDF, blind | 0.70 / 0.28 | 0.71 / 0.40 | 0.83 / 0.76 | 0.89 / 0.47 | 0.87 / 0.87 |
| MiniLM-L6 (en), with sender | 0.55 / 0.26 | 0.66 / 0.46 | 0.73 / 0.67 | 0.84 / 0.52 | 0.81 / 0.81 |
| MiniLM-L12 multilingual, with sender | 0.69 / 0.43 | 0.62 / 0.40 | 0.76 / 0.71 | 0.83 / 0.50 | 0.84 / 0.84 |
| Majority class | 0.57 | 0.70 | 0.74 | 0.91 | 0.52 |
| Key | Covered | Acc. (covered) | M-F1 (covered) | Acc. (all, fallback) |
|---|---|---|---|---|
| same address | 146/231 (63%) | 0.986 | 0.953 | 0.857 |
| same domain | 173/231 (75%) | 0.890 | 0.574 | 0.849 |
| majority ( servizio ) | – | – | – | 0.498 |
| System | Draft P / R | Task P / R | False noise | Useless tasks |
|---|---|---|---|---|
| B: TF-IDF + LogReg | 0.80 / 0.47 | 0.71 / 0.25 | 12/68 (18%) | 2/7 |
| Nimble v4-max | 0.65 / 0.61 | 0.15 / 0.25 | 8/68 (12%) | 28/33 |
| Gemma 4 26B-A4B | 0.62 / 0.59 | 0.21 / 0.25 | 3/68 (4%) | 19/24 |
| Gemma 4 31B | 0.63 / 0.64 | 0.19 / 0.25 | 5/68 (7%) | 21/26 |
| Tev1 0.8B | 0.31 / 0.07 | 0.35 / 0.30 | 25/68 (37%) | 11/17 |
| + relationship from contact and monitoring rule: task recall B 0.40, Nimble 0.50, Gemma 26B 0.65 | ||||
| System | Acc. (all) | Acc. (with project, n=205) | none P / R |
|---|---|---|---|
| Majority ( personale ) | 0.316 | – | – |
| B: TF-IDF + LogReg | 0.697 | 0.712 | 0.75 / 0.58 |
| Tev1 0.8B | 0.260 | 0.234 | 0.22 / 0.46 |
| Nimble v4-max | 0.303 | 0.259 | 0.13 / 0.65 |
| Gemma 4 26B-A4B | 0.329 | 0.278 | 0.13 / 0.73 |
| Gemma 4 31B | 0.468 | 0.468 | 0.21 / 0.46 |
Personal AI Agents
Personal AI agents use persistent user context and digital tools to carry out personalized, proactive tasks across apps, devices, and services.
See all 64 papers