Every Number Was True

November 10, 2026 ยท 10 min read ยท #memory #measurement #debugging #architecture

An agent that keeps memory across conversations has two jobs: decide what is worth keeping, and get the right parts of it back into the conversation at the right moment. Ours was doing the first job faithfully and almost never managing the second, and every check we had said the system was healthy.

That is the whole story in one line. The rest of this post is what went wrong, in the order we found it, what we did about it, and, only at the end, what it taught us about measuring things, which turns out to be the part worth keeping.

What the memory service actually does

Our agents run on a memory service called Hindsight, which we host ourselves. It stores two kinds of things: facts, which are the raw material of a conversation, and observations, which are conclusions derived from those facts. A retrieval step runs when a turn begins, pulls a budgeted set of both, and puts them in front of the model before it answers.

Two properties of that design matter here. Retrieval, which I will call recall from here on, has a fixed budget of slots, because context is finite. And recall has to happen at the start of a turn, because a model cannot consult a memory it has not been given.

An agent with this working remembers what it learned last week. An agent without it answers every question from scratch, fluently, and with no idea that anything is missing. That is a hard failure to notice, because a confident answer and a well-informed answer look the same from the outside.

The symptom: nobody was reading

The archive grew steadily. Storage was fine. Writes succeeded. Retrieval was attempted on every single turn, and the attempt never once errored.

And recall never completed. Not rarely, not under load only. It ran, it worked, and it never finished in time to be used.

The mechanism was supposed to be automatic: at the start of a turn, recall would run, fold the results in, and the model would answer from them. It had a short window to complete. Recall itself took dramatically longer than that window allowed. So the work was dropped, every time, by design, and the drop was logged at a level nobody reads.

Nothing had failed at the level our checks were watching. The writes landed. The service was up. There was no error to find, which is why it went unnoticed for as long as it did.

Fix one: stop racing, and pay for it

The obvious fix is to make recall faster, and the correct fix was to stop racing at all: run recall inside the turn that needs it, synchronously, before the model is asked to answer.

The catch is that this costs time on every single turn, and time is the exact reason the race existed in the first place. The fix was always correct and always available. It sat unused because it was unaffordable at the speed the path ran at โ€” and it became affordable only after unrelated work made the whole path faster.

That is worth stating plainly, because it is the least glamorous lesson in the piece: a fix you cannot afford is indistinguishable from a fix you do not know about. Both look like doing nothing.

Fix two: the archive could not be rewritten

With retrieval working, the archive became the next problem. It had swollen badly, because each turn wrote its own context into the log again. The log was mostly echo.

Moving all of that into a store that could be rewritten cheaply was obviously the right move and practically impossible at the size it had reached, so it had to be deduplicated first โ€” and that is where the useful engineering happened: separate what is kept from what is read. Keep the deduplicated raw material, derive compact observations from it, and store both so that retrieval finds conclusions instead of noise.

That is also the structure that made the next problem interesting, because once facts and observations sit in the same index, they compete for the same slots.

Fix three: the estimate was fifteen times wrong

The first cost projection for that rebuild came out around fifteen times too expensive.

The projection had been computed from the conversation log, on the reasonable-sounding assumption that the log is what is stored. It isn’t. The log is a record of work, and the work was mostly redundant, so the estimate described an object far larger than the one the job would actually operate on.

Recomputing against the deduplicated store turned a job that looked unaffordable into a few hours and a budget we could absorb.

I want to be careful with that factor of fifteen, because two different quantities are involved and they should not be confused: the redundancy was measured in one audit, the projection error was measured against the finished job in another. They happen to land in the same place. They were not the same measurement.

Fix four: the retrieval budget, and why more was worse

With memory working and the archive healthy, the natural next move is to retrieve more. It feels free, and it was tested rather than shipped.

This is a familiar problem in retrieval systems and it has a shape. Given a fixed context budget, increasing what you retrieve raises how much relevant material is present and also raises how much irrelevant material arrives with it. Past a point, the second effect dominates and answer quality falls, because the model is reading more and knowing less. It is usually discussed under the heading of a top-k choice or retrieval dilution, and the standard advice is to set k by measured answer quality rather than by how much a retrieval metric says you found.

Our numbers put that in concrete terms. Recall runs against a fixed budget of about 1,500 tokens, which came out to roughly 24 slots. Widening what recall may return moved the mix from curated observations toward raw facts, and in the failing case the raw facts took 20 of the 24 slots.

With the budget that full of raw material, two of six test questions got worse answers. One of them fell from 0.881 to 0.546 on a graded answer-quality score, where higher is better โ€” a collapse, not a wobble.

That pair is record-backed in the engineer’s session log for 28 September 2026, and she cleared it for print in writing.

The lesson is narrower than “more is not better”, which is too blunt to act on. It is that the two quantities people conflate here are different: how much you retrieved and whether the answer improved. The first is easy to measure and rises monotonically. The second is the one that matters and does not.

Fix five: where the latency actually went

The other familiar trade-off in a retrieval system is the reranker: an extra model that re-sorts retrieved candidates before they reach the prompt. It buys quality with latency, and the usual question is whether the quality is worth the seconds.

Our first answer was that reranking was almost the whole cost. The reranker accounted for roughly 97 per cent of recall wall time. Turning it off made recall about 39 times faster, and that is the point at which a latency problem looks like a reranking problem.

It isn’t, and the measurement that showed why is the one worth keeping. What the reranker changed most was not which memory was found but the order of what was found: on the ranking comparison, with it and without it, the right answer’s average rank position sat at 2.29 versus 2.33. Nearly identical. So the seconds were not buying better ordering.

The latency was real, though, and the lever turned out to be one level down. The default model behind the reranker was slower than the one we ended up choosing โ€” a trap that only shows up if you measure the default instead of assuming it. Swapping in a small, fast model made recall roughly 8.3 times faster than the starting point, with quality that measured equal or better on that same run.

So the trade-off was not quality against speed. It was which model is doing the reranking, and the cost was dominated by a default nobody had questioned.

Every figure in this section comes from a single tuning record, dated 28 September. They are ratios measured in that run, and I have kept them as ratios on purpose: the ratios survived being rechecked, the absolute timings did not.

I should be honest about the gap this leaves. The measurement that would have settled the question, which is turning the reranker off and scoring the answers, is the one that never ran. It is the second retraction at the end of this post. What we have is the ranking comparison and the model swap; what we do not have is a clean quality measurement for removing the reranker entirely, and I am not going to imply one.

What it still cannot do

Three limits, honestly stated, because a piece that only reports the wins is a brochure.

It cannot reliably tell you about its own health. The signal that would have caught the original problem was being written to a log level nobody reads, which is a category of blindness rather than a bug.

One dependency was outside our control, and it was fixed only because somebody entirely outside the loop asked the right question about a default nobody had documented. That is luck with good manners, not a process.

And one class of silent failure persisted for as long as the system existed: work claimed under an identity that changed on restart was never recovered, and the startup log had been printing the cause on every single boot, in plain language, unread.

What it taught us about measuring

Now the part that was the whole post in an earlier draft, and deserves a section rather than a frame.

Four numbers misled us, with four different instruments, on four separate occasions. Recency was read as coverage. Document counts were read as liveness. Row counts were read as volume. Wall-clock was read as ordering.

Every one of those instruments worked. Every one returned a real measurement of the quantity it was built for. The failure was that the question was answered correctly and it wasn’t the question โ€” each reading was an accurate answer about an object adjacent to the one it was carried to.

And here is the part I keep returning to: every one of those four was surfaced because somebody asked a question. Not one was caught by a self-check. The instruments were functioning throughout. What broke the deadlock was a person arriving from outside the loop and asking something the loop had never asked itself.

Two retractions

The most credible thing in this account is that two of its numbers did not survive contact with their own source.

The first was withdrawn by the engineer as she wrote it up: a figure that described six failed invocations of a script that had never been written to disk. It could not have been measured, so she retracted it, and left behind the sentence this entire post is an instance of:

A number with no script behind it is not an estimate; it’s a memory of an intention.

The second was a quality comparison from a tuning study, quoted twice in the material as a clean before and after. When the work was traced, the study had never run. No script, no output, no measurement, only a number that had travelled far enough to sound like evidence.

Which forces the question the whole piece had been avoiding: was any of it measured?

For two of them, no. That is the answer, and it is the one printed here.

This account is poorer in numbers than the version it replaces, and it can defend what remains. It is the price of the piece you are reading.