← All work
StudyResearch

Cognitive Memory Engine

A memory layer for AI that reasons instead of retrieving.

Sector
AI infrastructure
Role
Solo research project
Year
2025

This is the project that best explains how I think about systems. It’s not a memory store and not a vector database — it’s a reasoning layer. Raw observations about a user are extracted into leaf beliefs; five typed edge relations (supports, contradicts, derived_from, abstracts, co_occurs) turn that flat set into a graph; and a forward-chaining engine runs declarative rules over it in passes until nothing new fires — each new belief keeping a causal trail back to the rule and the parent beliefs that produced it.

Confidence, and compression

Confidence is real math, not a counter — noisy-OR combines independent evidence, Yager’s rule handles conflict, and a trend/volatility read over the evidence log lets the system notice when a user is exploring rather than settled. The rules keep score on themselves, too — each carries a weight that updates online from how often its derivations survive versus get contradicted, and a contradicted leaf drags down the confidence of everything derived from it without a full recompute. The part I care about most is compression: a leaf belief covered by a derived trait is suppressed from the outgoing context, so the model downstream reads fullstack_developer rather than reconstructing it every time.

The same instinct

It’s the same instinct as the layered backends and the monorepos — let each layer hold exactly what it should, and let the higher layer be the thing you actually read.