Kalen PattersonAI systems engineer

Case study - No. 02

Living State Machine

Public - PreprintPython - FastAPI - Ollama - LanceDB

A local-first LLM memory system that asks whether a small set of biological memory dynamics can make long-horizon preference recall measurably better than naive retrieval.

The problem

Most "memory" in local assistants is prompt stuffing or naive RAG. They do not habituate repeated low-value input, associate co-occurring facts, gate what gets written, or treat memory as something with trust and decay. LSM makes those mechanisms explicit and ablatable.

Constraints

Evidence

On matched-budget recall_pref_v1 across 3 seeds, LSM scored 1.000 vs 0.100 for naive RAG. The gated writer reached F1 0.98 on the rules path and proved critical under decoy load. The suite grew to 240+ tests, with pyright/ruff/pre-commit as gates.

What I own

Architecture, pipeline, benchmarks, training runs, verifier, and paper trail. The project is solo-built and deliberately documents what did not work: the Stentor-vs-minimal negative, the matched-budget v2 stress gap, and the encoder verifier collapse.

Limits

The headline recall result is a matched-budget benchmark, not a production memory guarantee. The research track is closed; the paper is in preprint. The v2 stress bench is a stress test, not the headline metric. The encryption-at-rest path exists but is not security-audited.