Those of you who have been following me for a while, know that I have been experimenting with optimizing how AI using its “memory” for quite some time now. After spending my weekend curating logfiles and injecting logics, I am one step closer to what I believe is the optimal form of memory for Agentic AI.
Intersection of Forensic Psychology and Machine Learning
Few people know that I have a degree in forensic psychology, and even fewer might have asked exactly what a forensic psychologist have in common with machine learning?
On the surface, not much. But when you strip away the clinical terminology and the code, both disciplines are fundamentally obsessed with the same thing: understanding the “how” and the “why” behind behavior. In forensic psychology, you aren’t just looking at the final outcome of an event; you are reverse-engineering a human being’s cognitive trace. You look for the underlying logic, the environmental triggers, and the procedural steps that led to a specific action. Today, as we try to build truly autonomous AI agents, machine learning is hitting a wall precisely because it has forgotten to ask those same psychological questions. We are teaching AI to memorize outcomes, but we aren’t teaching it how to replicate the human cognitive process.
The Problem with Current RAG (Retrieval-Augmented Generation)
Right now, the industry standard for AI memory is built almost entirely on semantics for matching the meaning of words. Standard RAG pipelines are essentially glorified, static filing cabinets.
They ingest documents, chop them up, and retrieve chunks based on lexical or semantic similarity. If an AI encounters a novel error in a Python script, standard RAG will query its database and retrieve historical logs that contain the words “Python” and “error.” It fundamentally misunderstands the assignment. Semantic similarity does not equate to logical causality. Current AI memory is stateless; it gives you a textbook definition when what you actually need is a debugging methodology.
Independent research like this is self-funded. If this guide saved you hours of troubleshooting, consider fueling the lab. You can now make completely secure one-time or monthly contributions through Google.
The Missing Link: Procedural Memory
When a human faces a complex, novel challenge, we don’t just recall factual conclusions. We utilize procedural memory, our subconscious ability to automate complex, pattern-driven sequences.
It is the “how-to” of problem-solving. It’s retrieving the sequence of logical operations, the debugging strategies, and the methodologies synthesized from past experiences. For an AI to be truly agentic, its memory architecture must be capable of storing and retrieving not just what the solution was, but the discrete, logical steps taken to arrive at it.
The Power of Associative Memory
Human cognition also relies heavily on associative memory, where recalling one concept spontaneously triggers related concepts across entirely different domains. It’s the ability to perform multi-hop reasoning, connecting a structural programming error to a previously discussed philosophical construct to generate a highly unconventional, creative solution. It requires a structural awareness of relationships that dense vector embeddings natively lack.
The Potential for Everyday Life and Business
Imagine the implications of an AI equipped with artificial procedural and associative memory.
In a business context, an AI wouldn’t just search your company’s wiki for an IT manual. It would recall the exact cognitive trace and iterative logic your senior engineer used to solve a bespoke infrastructure bottleneck last year, and autonomously apply that exact methodology to a new integration issue today. In everyday life, your personal AI would iteratively build upon its foundational knowledge of you, fostering a compounding “snowball effect”. In doing so, It transforms the AI from a passive information archive into an active, dynamic cognitive engine that evolves with every interaction.
The Prototype: We Are Almost There
I am currently incredibly close to a fully working prototype of this exact cognitive architecture.
Over the past year, I have curated a massive dataset of organic log files, transcripts of real problem solving sessions, coding environments, and deep philosophical discussions. I manually curated the dataset by stripping out the conversational white noise, and what’s left is a highly dense, 7-million token dataset, built on organic conversations, real problems and solutions.
Finally I injected explicit intentions and context into every interaction, conversation and debugging session, transforming this raw history into a highly structured training foundation.
Using this proprietary data structure, I have successfully trained and initialized a custom local architecture that rewires the underlying embedding space. Instead of matching words, the system is now forced to prioritize logical causality and procedural relevance.
The engine is built. The procedural memory is actively firing. The very last piece of the puzzle is integrating the final database layer to map the knowledge graph and fully unleash the associative multi-hop reasoning.
We are on the verge of moving AI memory out of the filing cabinet, and into the realm of true cognitive persistence. Sign up on my newsletter, so you don’t miss out on the next step.
All the AI related work I do, I do on my spare time, and I share it with the world completely free of charge. It does take up a lot of my time, as well as the cost for running this website. I’m grateful for every bit of support I can get from users like you.
