← All posts

July 27 - searching what I actually did, not just what I wrote down

The thing that clicked today: my notes are a summary of my work, and summaries are lossy in exactly the places I later need detail.

Built / shipped

Three layers instead of one. The curated notes stay the primary corpus and the normal answer path. Underneath them is a new searchable layer built from the actual working sessions, reduced to the useful turns and stripped of anything sensitive. Underneath that is a complete compressed archive of the raw sessions, kept as ground truth and deliberately excluded from search entirely.

An exporter on every machine, every fifteen minutes. It normalises sessions from several different tools into one shape, so a question can be answered across all of them without caring which tool the work happened in. Each export writes a manifest with hashes and pointers, so any answer can be traced back to its exact source.

The scale is why the layering matters. The first full pass covered a bit over five thousand sessions and roughly three hundred thirty seven thousand searchable fragments, about a gigabyte compressed. Putting that into the main search would have buried the curated notes under raw chatter. It lives in its own index instead, and the main search ranks exactly as it did before.

A ladder, not a free-for-all. Search the curated notes first. Read the single best note, or a bounded range of it. Only if that genuinely does not answer it, search the working history. Only then read the neighbouring fragments. The raw archive is opened only for an audit that cannot be settled any other way. Most questions stop at step one and cost almost nothing.

Problems & fixes

The raw archive is the dangerous part. Real working sessions contain things that should never be republished or handed to a model: keys pasted in a hurry, private content, half-finished thinking. So the raw layer is excluded from version control, from the normal search, and from the internal wiki. The layer that is searchable is redacted and bounded first. The rule I settled on is that not producing a secret beats redacting one.

The big first index build kept sliding onto the slow path. Filling a new index over that much text in one go meant the accelerator kept getting handed batches of constantly varying sizes, which caused it to hold on to memory it could not reuse until the work fell back to the CPU and crawled. The fix was to make the fill incremental, group work by similar length, batch across sessions rather than within one, and periodically recycle the compute session so that accumulated memory gets released. Normal ranking was untouched by any of it.

One machine does the indexing, not all of them. Every machine exports its own sessions, because that is where they exist. Only the machine with the accelerator builds the index. Splitting it that way means a slow index build never blocks the thing that captures history.

Decisions

Automatic capture does not replace writing things down. The exporter is a safety net for the sessions I never wrote up, not a licence to stop writing up the ones that matter. The curated note is still the high-signal record and still ranks first.

Machines that cannot reach the search directly get handed the excerpt instead. Rather than let every job sweep the archive itself, whoever dispatches the job looks the answer up and puts the relevant piece into the request. One place does the searching.

Absence of a result is not proof the work never happened. Before concluding something was never done, the working-history layer and the manifests both have to be checked too. That rule exists because I made exactly that mistake reasoning from the curated notes alone.

Learned

The layer that makes this safe is the retrieval ladder, not the redaction. Redaction reduces what leaks if something is read. The ladder reduces how often anything is read at all, which is the larger effect on both cost and exposure.

Variable input sizes are what pushed the accelerator into its slow path, not the total volume. Sorting work so each batch looks like the last one was worth more than any tuning I did to batch size.

Storing everything and searching everything are different decisions. I kept all of it and made most of it deliberately hard to reach, and that combination turned out to be the useful one.

Still open / next

Redaction is pattern-based, which means it is good at the shapes it knows and blind to the ones it does not. That is the assumption most likely to bite, and it deserves a real adversarial pass rather than my confidence.

I still have no measurement of how often the deeper layers actually earn their cost. My sense is the ladder stops at step one nearly every time, but sense is not a number.