Dev shares how weighted regex email classifier misrouted refund requests as receipts
kumard3 · reddit · 2026-11-28
A developer building an email API for agents shares a real misclassification: his weighted-regex inbound classifier (no model calls) tagged "my order hasn't arrived, can you check / refund?" emails as transactional in June, since refund and tracking are also receipt words.
Fix: a support rule keyed on request-style phrasing ("can you", "has not arrived", "problem with"), weighted 8 per match vs transactional's 7, so one match each lets support win. Tests cover the reverse direction — shipping receipts and refund-processed notices still come out transactional.
The tag matters downstream: routing rules dispatch threads by category, and the OTP endpoint only reads verification-tagged mail. He asks whether others tag inbound mail before agents see it.
More from coding & agent
- ASC CLI change log: users invite now requires --confirm or silently exits — rudrank · 2026-11-28
- App Store Connect CLI 7.7.0 adds JSON errors, command discovery, and reviewed catalog plans for agents — rudrank · 2026-11-28
- App Store Connect CLI 7.7.0 ships JSON errors and command discovery for agents — rudrank · 2026-11-28
- Google open-sources Gemini demolab: a 16-line skill turns coding agents into researchers — Saboo_Shubham_ · 2026-11-28
- Google Antigravity update cuts unnecessary approvals 15%, adds native GitHub integration — rseroter · 2026-11-28
- Open-source Docker guide tailored for AI model development and deployment — adnan_hashmi · 2026-11-28