“Let me Take a Note of That” — How AI Remembers

Long Term Memory for AI is simply in the form of taking “notes” and recalling them using basic databases. Dive in and cut through the hype.

“Let me Take a Note of That” — How AI Remembers

Preferences! Every one of us has them! From the way we wish news to be delivered to us, the types of clothes that we ware, even the specific preparation of our morning cup of coffee. Scale that across one’s entire network of connections and remembering these individual preferences is a daunting task, and too often, we mix up preferences which causes dissatisfaction with the people we are interacting with! As a human, we will never change the way we are holistically, but might attune ourselves to specific contexts based on the people on our lives or the situations we are in to those specific preferences. Artificial Intelligence systems, particularly Large Language Model based, function the same way.

Large Language Models are trained on a vast amount of data to try and create a mental map of the “world.” In our layered approach, which my readers are all too familiar with, those models are fine tuned to focus on a particular industry or use case. For that model to then fit a particular solution that scales the entire user base, on a specific task, is tannable. But once particular preferences are introduced, creating a tenant specific model becomes untenable, costly, and cumbersome. Furthermore, you don’t want the feedback from one person effect the how the model interacts with someone else with different preferences. So, if we can not replicate models indefinitely with specificity, and we can not have one person’s feedback effect another, how do we create specific tailored outputs per person?

Most recently, people have become fascinated with the ability for models to “remember” and become more personalized. Again, our canonical example is ChatGPT. What most people do not fully grasp is that Large Language Models (LLMs) are stateless and shared, meaning they do not remember past interactions or inherently differentiate between people. Being stateless means that LLMs do not remember past interactions. This can be both a strength and a limitation. On one hand, it ensures that each interaction is fresh and unbiased by previous ones. On the other hand, it means that the model cannot build on past interactions to improve its responses over time. Without special measures, an AI model might treat every session independently as if to have short term memory loss. So the bigger question becomes, how do Large Language Models remember?

The latest research suggests that AI models, just like humans, should “take notes” and store them in a notebook. What do I mean? Take an example where a person provides feedback to an AI model, asking for any response to be in very simple terms. The AI model, again, that applies to everyone, can simply create a note in the “Person A” log that states that they want simplistic language whenever interacting with them. In the future, when Person A goes to interact with the LLM again, the LLM will then “check its notes” and “remember” that Person A wants simplistic language. This is done through loading the feedback (or subsets of the feedback) into the context window that then effects the overall model, similar to other prompting techniques. In effect, the AI is taking notes on any feedback and separating it by person. This can be generalized to every type of scenario, effectively performing individualized Reinforcement Learning through Human Feedback (RLHF) without effecting the global model.

I first came across this concept in Claude Plays Pokemon, but research from Redis, IBM, Microsoft, and others suggest that having a memory store with a read and write function is the best possible approach to both scale, adhere to Responsible AI standards, and data privacy regulations. This type of architecture further illustrates my point that AI agents are effectively a natural language processing version of Microservices.

So, while on the surface, gimmicks such as personalization and memory sound incredible to the every-day user, in reality, these systems are simply taking notes — sure, generating those notes based on the feedback — and then loading the notes back into memory every time it boots up. Don’t get me wrong, its still quite fascinating, but the fact of the matter is that LLMs have inherent limitations and sometimes engineers rely on more primitive forms of augmentation.

The idea of an Agent, its autonomous capabilities, and the level of “intelligence” these systems have are still hyped without complete understanding. I wrote at the time:

The concept of “Agents” can be blurred at times — Charles Lamana shares about agent capabilities in the form of trigger/action paradigms typically found in automation (reference to PowerAutomate) but focused on natural language instructions with deeper contextual processing and less about if this then that (IFTTT) model. Cobus and other practitioners using LangChain would reference agents in a manner of chaining multiple prompts together automatically based on contextual reasoning and “chain of thought (CoT)” reusable system prompts.

Not to discount AI on the immense impact the technology will have on the world, but I continue to strive to both simplify the complexities of AI and also unveil what AI is truly powerful for while cutting through the hype.

The trend continues to move forward towards Agentic AI / Autonomous Agents, that progress has been put into motion. As we interact and design these systems, keep investing in understanding how AI works to carve your own path in this rapidly evolving space!