This is a submission for the Hacktoberfest Open-Source AI Challenge: Slow and Steady.
What I Built
If you've never written a Japanese business email, here's the deal: the actual message is often one line. "Tuesday 2pm works, I'll send the slides tomorrow." But you can't send that. It needs the greeting, the "thank you as always", the soft phrasing, the closing. Reading them is the same in reverse: five paragraphs of politeness, and somewhere in the middle, one request with a deadline.
So I built namake, named after ナマケモノ (namakemono), the Japanese word for sloth. It does both directions for me:
-
namake puff "火曜14時OK。資料は明日送る。" --to 佐藤様turns my lazy memo into a proper email. -
namake shrink mail.txtturns a long email into two lines: what they want, and what I have to do. -
namake digest inbox/does that for a whole folder overnight and gives me one short note in the morning, with the mails that need action on top.
It runs Gemma 3 1B locally through llama.cpp. No API key, no network.
Demo
No fancy video this time, just the terminal. Here's a real run, unedited (more in examples/). My memo was 木曜NG、来週の水曜なら午前中いける (roughly "Thursday's no good, Wednesday morning next week works"):
佐藤様
いつもお世話になっております。中崎です。
木曜ですが、都合がつかないため、来週の水曜の午前中であれば対応可能です。
ご検討のほど、よろしくお願いいたします。
中崎
That's sendable. Each draft took about 4 to 5 seconds on CPU, including loading the model.
And the morning digest for four sample mails:
# 朝のメールまとめ (4通、対応が要るのは2通)
## 01-seikyusho
用件: 10月28日までにPDFにてご送付いただけますようお願い
やること: (モデルは「なし」と言っていますが、期限つきの依頼に見えます。本文を確認)
## 03-mitsumori
用件: 修正版見積書のご送付を依頼する
やること: 修正版見積書を今週金曜日まで送付する
...
Code
yema7582-code/namake on GitHub
It's under 300 lines of Python plus tests. The tests use a fake model, so they run in a fraction of a second.
How I Built It
My first try was the obvious one: a long instruction prompt. The 1B model read 火曜14時OK ("Tuesday 2pm is OK") and wrote an email asking the other person to handle something by Tuesday 2pm. The meaning flipped.
What fixed it wasn't more instructions. It was two short examples. Once the prompt showed one memo with NG and one with "received, will reply next week", next to the emails I'd actually want, the model stopped flipping OK and NG in my test memos.
The bigger lesson was that a small model doesn't need to be trusted, it needs to be checked. So namake has a fact guard: every number and weekday in my memo has to show up in the email, and nothing new is allowed in. If the check fails, it simply asks again at a slightly higher temperature, up to three times, and keeps the draft with the fewest problems. The sloth doesn't mind waiting.
The digest got its own seatbelt. In one run the model read "please send the invoice as a PDF by the 28th" and decided there was nothing for me to do. Now, if a mail contains a request and a deadline and the model still says "nothing", the digest says so out loud and moves that mail up.
It's not perfect, and I'd rather show you than hide it. In one draft the model wrote 出産いたします ("I will give birth") where it meant 提出 ("submit"). The numbers were right, so the guard let it through. That's the honest limit of a 1B model and a regex: they catch the facts, not the vocabulary. I still read every email before sending it. I just don't write them anymore.
Day to day, the plan is simple: digest runs on a timer at night, and puff handles the quick "yes, that time works" replies I tend to put off because the polite wrapper feels like more work than the answer.
Why open matters here
- Work mail stays on my machine. Client names, quotes and invoices are exactly the kind of text I don't want to paste into someone else's server.
- It works offline. On a train, on a plane, with bad hotel Wi-Fi.
- It costs nothing to run. No per-token bill, so letting it retry three times is free. With a paid API I'd think twice about that.
-
I can swap the model.
NAMAKE_MODELpoints at any GGUF file. If a bigger Gemma fits on your laptop, use it, and the guard and tests stay the same.
A closed model would probably write nicer keigo out of the box. But for this job, "good enough, private, free, and checked" beats "great, but my clients' emails leave the building".
I built this with help from an AI coding assistant. The prompt experiments, the failures above and the sample outputs are real runs on a plain CPU machine.
Top comments (0)