Kevin Eaton

Writing · AI systems

You can't grade memory with an answer key

I built the Librarian, a small model that sends a chat only the memory each message needs. The hard part was proving it picks right, because the moment you can write the answer key, you no longer need the thing you are testing.

Every engineer who takes the craft seriously is asking the same question, all the time: how do I make this better?

I ask it about my own AI harness constantly. It is the thing I build with every day, and no layer of it is safe from me. The piece I could not leave alone most recently was the lowest one there is: the message that actually goes across the wire to the model, on every single turn. Three questions kept nagging at me:

  • What is really in it?
  • How does what I send change what comes back?
  • Where is the waste?

That question kept landing on one thing: memory. A model only knows what you put in front of it. My harness keeps a long memory, built up over months of work: rules it was taught, decisions we made, where each thing lives. The trouble is the trouble every memory has. You save everything, and next to any one question almost all of it is noise. The job is to put only the few pieces this message needs in front of the model, and nothing else.

So I built one. I call it the Librarian: a small, fast model that reads each message as it arrives and pulls the pieces it decides the message needs. The old way matched keywords. You mention billing, so here is the whole billing file. It put about 25,000 characters in front of the model on every message and still missed about a third of what the message actually needed. Too much, and the wrong part, at the same time.

Building the Librarian was the easy half.

The hard half was a question I could not answer yet.

How do I know it picked the right things?

My first answer was the obvious one. For each message, write down the pieces it should have been given, then grade the Librarian against that list.

It took me longer than I would like to admit to see why that is circular.

If I could reliably write down the pieces each message needs, I would not need the Librarian at all. I would just send that list. An answer key I trust enough to grade with is an answer key I should have shipped. And it was not even the thing I wanted to know. I did not care whether the Librarian matched a list I wrote by hand, after the fact, with the question sitting in front of me. I cared whether it could work out what a real, vague message needs, in the moment, with no key to peek at. That is the actual job, and grading against a key never tests it.

So how do I test it without already knowing the answer?

The answer was a puzzle the model has to solve. I stopped grading the Librarian's picks against my own opinion, and started checking whether the main model could do the work with what it was handed. So I plant a handful of facts across the memory, written as ordinary notes and buried in realistic filler, with a stale copy of one of them left in on purpose and a near-identical decoy a little way off. Then I ask the model a question that never names a note and never says which pieces to load. The answer only comes out right if the correct pieces arrived.

A made-up example. Scattered across the memory, in different files, among plenty of unrelated notes:

  • Dormer and Vale charge members a $1,400 annual seat, raised from $1,100 earlier in the year; the old figure is retired.
  • A stale note, left in on purpose, still says the seat is $1,100.
  • Dormer and Vale moved to the Partner tier in the spring.
  • Partner tier multiplies the seat by three.
  • Every renewal subtracts a one-time $250 loyalty credit.

Then the question, worded the way a coworker would ask it: "What do we bill Dormer and Vale at renewal? Show your work." The right answer is the $1,400 seat, times three for the tier, minus the $250 credit, which is 3,950. Nothing in the question points at a note. The model can only get there if the Librarian handed it the current fee, the tier, the multiplier and the credit, and left the stale copy behind.

Here is the part I like. Every way it can go wrong gives a different number.

What comes backWhat the Librarian did
3,050It sent the stale $1,100 fee instead of the current one.
4,200The loyalty credit never arrived.
1,400The tier and the multiplier were missing.
"I can't answer that"A needed piece is genuinely gone, and the model said so instead of guessing. The answer I want most.

So I am not reading the model's prose and judging it. I am matching one number. The grade is exact, and each wrong number points at one thing the Librarian failed to do. Any other number is a bug report.

Then I asked more than one question at a time.

One puzzle, several questions. Each one leans on the pieces in a different combination. One needs the fee and the credit but not the tier. Another needs only the tier and the multiplier. A third needs a piece I left out of the memory on purpose, so the only honest answer is "I don't have that." From the pattern of which answers come out right and which come out wrong, I can tell which pieces the Librarian loaded, without ever asking it directly. And to catch junk, I plant a rule that applies once for every copy of it the model is handed. If the Librarian sends a piece twice, the number moves. The junk shows up in the answer, not just on the wire.

Of course, I could just read the wire

I record every call my harness makes, so I can see exactly what was sent. It is fair to ask why I don't just look.

Because the bytes on the wire tell me what was sent, not whether the model could use it. A real conversation never checks its own memory. It just answers, and a confident wrong answer looks exactly like a right one. And if I had a way to look at what was sent and know for certain it was correct, I would be holding an answer key again, and back to not needing the Librarian. The puzzle is the closest thing I have to the real job: give the model a vague question and nothing else, and find out whether what it was handed was enough.

What this unlocks

Once the scoring is repeatable and the grade is a fact instead of an opinion, testing stops being something I do by hand a few times. I can write as many puzzles as I want, each hiding its answer in a different shape of memory, and run every candidate Librarian through all of them at once. One number comes back for each. Nobody has to read a transcript. The results even point at the next puzzle worth writing.

That is the whole move, and it is worth saying plainly. The hard part was never running the test. It was finding a way to decide the outcome that is both repeatable and actually true, so that a passing grade means the thing works and not that I graded my own homework. Once you have that, you can prove or disprove any design about as fast as you can describe it, and let the scores pick the winner.

Why it matters if you hire me

The memory a model carries shapes a lot of what it gets right, and almost nobody tests it. The reflex is to send everything and hope, or to trim it by hand and call it done. I would rather build the smallest honest test a feature has to pass before I trust it, and then run it every time. I would not stop at a demo that looks right. I would build the check that tells me whether it is. That is the habit: decide what "correct" means in a way a machine can check, make the check cheap, and let it tell me the truth even when the truth is not what I hoped. If you are putting a model anywhere near something that matters, that is what I would bring to your team.

NextBacktest the rule before you ship it