返回资讯中心
外部精选
软件工程
#开发者实时流

I have a machine learning engineer in my pocket

Over four days, I built Keys, an iPhone keyboard trained on eight years of my own writing, without writing or reading a line of its code. Off-the-shelf coding agents (Claude Code and OpenAI's Codex) wrote the app and tr…

Hacker News 最新kaspern2026/11/23 · 今天27 分钟阅读

以下正文同步自 Hacker News 最新,版权归原站所有,已转换为易读排版。

Over four days, I built Keys, an iPhone keyboard trained on eight years of my own writing, without writing or reading a line of its code. Off-the-shelf coding agents (Claude Code and OpenAI's Codex) wrote the app and trained the models. My job was picking the metric, logging every tap, and designing a test bench they couldn't cheat. On newer messages it never trained on, Keys gets the word I meant 96% of the time, up from 92% on Apple's keyboard.

The agents still go over my typing regularly, and when a change passes the tests, one of them installs it on my phone with Apple's developer tools. Nobody would put a human engineer on one guy's slightly annoying typing. Agents are cheap enough that it doesn't matter. Four days of them came to about $50 of the $400 a month I already pay for Claude Max and Codex.

Typing on my phone was fine. Apple's keyboard is a very good general solution. But it doesn't really learn, so I'd see the same kinds of errors over and over. The worst was probably “fuckin” to “ducking”. I have never once in my life meant ducking.

None of it is a chatbot. Five small models run right on the phone, weighing where each tap landed against which words I usually write next.

Figure 1 · The same message on each keyboard

92% to 96% sounds small until you count mistakes. Across about 1,500 words from newer messages Keys never trained on, typed into both keyboards in Apple's simulator by the same simulated thumb, typos included, Apple's keyboard gets about 8 words in 100 wrong and Keys gets about 4.

A typical text of mine is six words. At those rates, I'd expect about 2 in 5 six-word texts to need fixing with Apple's keyboard, and 1 in 5 with Keys.1

Figure 2 · Estimated chance a message comes out with every word right

KeysApple From the per-word rates in Table 1 in the appendix, assuming each word's error is independent. On an earlier set of messages, this estimate landed within a point of the measured result.

Two caveats. Apple's keyboard ran fresh, without the words my own phone has learned over the years, so it might do a little better in real life. And on other people's typos from a public study, the two tie. So Keys wins on how I write, not on typos in general.

Keys also stopped fighting me. Of 40 words I spell my own way on purpose, Apple's keyboard changed 11 and Keys changed none. That's not just a fresh-install problem. Years in, my own phone was still turning fuckin into ducking.

At some point I forgot it wasn't Apple's keyboard.

The best call I made was giving the agents detailed logs of how I use my phone, down to where every tap landed. My everyday phone is a folding iPhone, and its outer screen is tiny. I mentioned that taps near the edges of the keyboard didn't seem to register. The logs showed that of 225 taps on the outer screen that day, not one had landed between keys. Nobody aims that well.

An agent redesign earlier that day had turned the gaps between keys completely transparent, and iOS silently drops any tap that lands on empty space. Painting the gaps 1% opaque gave iOS something to hit, and the fix was on my phone ten hours after I complained.

Figure 3 · Where my fingers landed on the outer screen

Late in the week an upgrade fixed more typos but split "soi", as in khao soi, into "so I". It went back.

A few hours of my attention in total, maybe less, and the $50. At API prices, the Claude part would have cost about $800, mostly from the lead agent rereading its own long notes.2 Then there's Apple's $99 developer account, which is Apple charging me for permission to stop using its keyboard.

Really long typos still trip it up. And on the old iPhone, with taps sloppier than mine, Keys gets about 7% of individual letters wrong to Apple's 4%. Every so often the old iPhone also wants its passcode before the agents can drive it, so I walk home and type it in. The superintelligence can rebuild my keyboard overnight and still needs me to type a passcode into a phone.

Pick something you fix by hand every week, like the categories your budgeting app keeps getting wrong, or the email you open and wish you hadn't. If it leaves a record you can export and runs on a system you can change, you can put a loop on it. For budgeting, a baseline takes an afternoon:

That count is the number to beat. Then let it try merchant rules your app can import, and keep a version only if that count drops with no mistakes on big charges. The appendix has a brief you can paste.

For anyone who wants to check the work, and for agents. Brackets are 95% confidence intervals.3

The first comparison asks whether each keyboard produced the word I meant, on messages never used for training or tuning. Keys is ahead on all four measures, and clearly ahead on three.

Table 1 · Identical taps on newer messages Keys never trained on, in Apple's simulator

The second asks whether each tap became the letter it was aimed at. The old iPhone replayed my real tapping, and sloppier versions of it, into both keyboards.

Table 2 · Wrong letters, identical taps on a real iPhone

On every tap, the five models answer one question: which word did I mean? A decoder weighs two things for each candidate word, how well my taps fit its letters and how likely the word is after what I've already typed. It searches a dictionary of about 120,000 English words plus my own vocabulary.

Keys checks for new writing every night, but it only rebuilds the models once I've written about 3,000 new words, roughly two weeks of my usual texting. Rebuilding daily made no measurable difference. Retraining follows the same rules every time. The word statistics are rebuilt from scratch. The personal model starts from the public SmolLM2 checkpoint each time, never from my last fine-tune. It keeps whichever checkpoint does best on messages it never trains on. The small predictor learns by copying the personal model's guesses, which is called distillation. That keeps about 60% of the big model's gain at a size a keyboard can afford. Within a rebuild, the neural models only retrain once I've written about 2% more words, or after a week.

Since then my Instagram DMs went in too, about 150,000 more words, with recent messages counting more. Next-word guesses got slightly better and autocorrect didn't change.

Metric. Two numbers should go up: how often the keyboard produces the word I meant, and how often it fixes a real typo. Two must never get worse: how often it changes one of my own words, and how often it changes a word I typed right.

Data. About 650,000 words of my iMessages since 2018. A model trained on the older nine-tenths had the right next word in its top three suggestions 27.5% of the time on my newest messages. A model trained on 76 million words of movie subtitles, 130 times more text, got 20.6%. Both are good to within about half a point. Every tap and correction I make now feeds the loop too, and it all stays on my own devices.

Test bench. The typing engine is a plain library. A harness types my old messages into it with a simulated thumb that makes realistic mistakes, and scores the result. My first bench used only my own messages and flattered the keyboard, so real typing from public studies now counts as much as mine. One agent leads and hands work out to the others. The others tune on older messages and never see the newest ones, and only the lead scores finished work on those.4 Apple's keyboard gets the same taps, in Apple's own simulator and on the old iPhone, which also taps the gaps and margins on every build.

Loop. The lead agent rejects any change that makes a guardrail worse, even by one word. The upgrade that split "soi" had changed three more of my own words. Its next version offered changes like that as suggestions instead, and only shipped when its guardrail numbers matched the old ones exactly.

I type

Phone records taps

Synced to my Mac

Agents propose fix

Test bench scores

passes:ships

fails: rejected

A typical turn takes hours. The language models also retrain about every two weeks on new text, and a new version only ships if it beats the old one.

D. What didn't work

A model 30 times bigger, trained on the same writing, got its first guess for my next word right 23.0% of the time, against 20.5% for the model on my phone.5 That's a lot of GPU for two and a half points. My left thumb lands a little left of where it aims, and correcting for that helped my taps but added one or two wrong corrections per thousand words. That breaks a guardrail, so for now it only logs what it would have done.

I run the agents side by side in T3 Code, an app for coding agents. On the busiest day about a dozen ran at once. The hardware was all stuff I already had, a Mac, the old iPhone for testing, and a gaming PC that trained the bigger model.

I had to step in a couple of times. I asked for a job that taps the old iPhone every few minutes so it never locks. One agent decided that wouldn't work, quietly built something else, and the phone locked mid-test. Now the agents flag a change of plan before acting, and nothing counts as fixed without proof on a real phone. Another time, a dictation test with a live microphone transcribed a real conversation in the room. Audio tests now use a recorded public-domain clip.

An annoyance qualifies if it happens at least weekly, leaves a record you can export, and runs on a system you're allowed to change.

Here's a starter brief for the first row. Export your transactions from your bank and from a budgeting app that keeps your corrections, put both files in a folder, paste this into Claude Code or Codex, and fill in the blanks:

Goal: predict the category I'd give each transaction, so I correct fewer of them.

Data: bank.csv is my bank's export, with the bank's categories. budget.csv is my budgeting app's export, with the categories I changed them to.

Test bench: first, set aside the newest month as a test set, and never train or tune on it. Write a script that scores any approach on it: the share of predicted categories that match mine.

Guardrails: zero wrong categories on charges over $____. No more than ____ wrong overall.

First step: match the two files transaction by transaction, and map the bank's category names onto mine. Report how often the bank's category already matches mine, then the three merchants I correct most. Don't change any file until I approve an approach.

Output: once an approach passes, turn it into something my budgeting app accepts each month: merchant rules I can add, or a pre-categorized CSV I can import.

Each month, import its categories and fix the few it gets wrong. Those fixes become next month's test set, and the agent only keeps a new approach if it beats the old one without breaking a guardrail.

The code is in a private repository, since my personal data runs through it.

正文由 探How 从来源站点 RSS 同步,内容未经改写;遇到排版缺失或需要图片、视频时请以原文为准。

打开原文
去社区讨论 →