About this talk
This talk covers the concept of memory in AI assistants, focusing on how current large language models (LLMs) function within a finite context window, failing to retain information and relationships over time. The speaker illustrates this through the story of Johnson, a support specialist who finds his AI assistant unable to recall past interactions once the context window closes. He discusses the limitations of traditional memory systems and presents Neo4j as a solution, advocating for knowledge graphs that better capture the connections and relationships between information. By using a graph database, AI agents can maintain continuity, reflect on past interactions, and improve reliability, ultimately providing a more effective and human-like assistance experience. The session calls for a shift towards using structured memory systems to enhance AI capabilities.
Full transcript
[music] >> Hello. Hello everyone. Uh thanks for that. Uh welcome once again to notes. I hope you all are having fantastic time on the sessions. Um so uh let me go ahead and quickly give a quick intro about me. Uh I'm Fazil. Uh I'm an AI engineer working at Unisys. Uh I'm a person who learn and uh grew with the tech uh communities. Uh I always like
to come back and continuously contribute uh especially in the AI space in one or the other ways. Uh I also love taking part in hackathons and I have participated and won in some of the national and international hackathons. Uh I'm also B Vishnu fellow. I had completed the fellowship. So all right. Uh before we start with today's session on the memory, uh let me start with uh
narrating a short story about uh Johnson. So uh you can just see in the pic. It's like a comic fashion. So he's part of the support team. Uh he uses agent to basically um help him with the task. Uh let's say like it's just week one and uh he feeds the LLM with the task, goals, and road map and the AI models basically start understanding the task.
It provides the adaptive responses to his task. And as weeks pass by, Johnson is uh really happy using the model. Uh it becomes his uh super intern. And uh slowly slowly the context window starts uh overflowing. And one fine day when Johnson asks uh the model about his product and his road map, it starts uh telling like, "Hey, I'm your new uh assistant and how can I
uh help you? So, you can see that it could not able to recall the conversations after a long time it had with Johnson. So, like Johnson is puzzled and he thought it could learn and remember everything about his work but it actually didn't. And that brings us to the concept of memory in the assistance. So, we'll discuss on Neo4j as a graph and a narrative memory layer.
So, our agents don't just answer questions but actually remember your context as it evolves. Moving forward, so this will be our agenda for today. Uh we'll just see what actually the AI remembers and what we expect it to remember and the difference between what and how a human brain stores these conversations and how AI memory stores Um the AI memory at the context window and what memory
really means for these agents. Uh how the traditional memory systems fail and why we we need a graph kind of a knowledge graph for storing these memories and some of the failure stories as well as the benefits of persistent evolving and reliable systems. And we'll have the closing thoughts. the first thing what's their actual expectations from the user and what real and what's happening in reality. Um
so, we as a humans we always have this expectations that agents are smarter and it knows some of our information like our name or history and our promises. It knows our preferences but in reality most of the LLMs uh often ask these uh repetitive questions for the 10th or the 100th time. And And I'm sure most of you will agree for this annoying questions as well. Uh
so, most of the agents that we see today are actually uh stateless. So, they live inside a context window and it dies when the context window closes. So, it keeps your context only till the session and uh only till the session last and and it starts from scratch from zero when the new sessions begins. So, that's the actual reality in in the case of today's uh agents
and assistants. the memory actually ends at the context uh if you inspect lot of uh the production grade agents and uh memory uh uh today, so everything inside the last uh end token, uh maybe there is a rolling buffer, maybe a chat history that gets summarized. But, when the buffer rolls over, your preferences uh actually uh and your past issues and the agent's own decision actually starts
vanishing. So, that is great for latency and but it's terrible for relationships. And we have the uh the final result or the outcome as like a no persistent memory uh at the end. and and and that's when uh we actually uh started thinking about how our human brain um uh actually stores these kind of um uh information as memory and how we can try to inspire uh
that um way of storing um information from our brain and create uh a system or a knowledge graph out of that. So, we uh humans uh don't store like a a large uh data chunks or transcript. We remember uh information and connections between the information like who did what and like how it was done and and how it uh is uh going on and where uh it
is being done. So, we remember patterns like this. So, let's say like every time this happens, this is the outcome. So, every time I buy a chocolate to my brother and he gets happy. So, that's the kind of the relations that our brain actually tries to store. And and and that's is actually a graph-shaped way of storing information. So, that's the natural way our brain stores. And
many agents and and in contrast, they just have a linear text logs and large text information without actual meaning and relations on between the context of the information. So, Neo4j's view is simple. If your memory is about connections, your memory store should be a graph. So, that's the mantra that Neo4j actually tells us. So, what memory really means for these agents? So, we can see there are
five different factors here. Let's see the recall capacity of the agent. So, it basically starts to retrieve relevant past information and it will try to recall the actual things that was logged or it dealt before. And continuity. So, instead of just like having or asking the same question or asking new questions or starting from scratch, it it will try to sort of maintain that continuity over the
sessions and over the days and over the timeline. the reflections. So, it basically tries to learn from the outcomes like sort of kind of an experience like how we humans get experience from our day-to-day activities and and and scenarios. In a similar fashion, it tries to reflect and learn from its outcomes. So, this uh and then finally we have the commitments and identity. So, it tries to
track what are all the goals and what are all the promises and and the task that the user had instructed it to do and what is the identity that basically wants it to do. then we can So, now we are moving on to the traditional memory patterns and we whenever basically we have this um data stored in the form of a vectors, but it actually doesn't capture
who promised what or what is the actual relationship and meaning in that vector database and how it is actually connected and and that's when we we we think about a graph database like a knowledge-based graph database like Neo4j and then we have this Neo4j agent memory and memory provides projects built on top of idea that we don't just want more text. We want a structured evolving memory
graph. where the concept of relationship between the entities also come in place which are actually really essential in in terms of knowledge graphs. So, these are some of the limitations that we had discussed for the traditional memory and moving forward we'll see why do we actually need a knowledge graph and and and how it actually changes the game. So, we can see that a graph native basically
there are three things in that. So, first is we store the entities and relationships. Um then uh second, we have the model time. Uh this um So, basically, this happened in session one. Then, we followed up then the sentiment changed. So, that's how it is. And and and third, we do have multi-hop recalls. So, uh let's say, "Show me the customers whose renewals are nearby, uh who's
had escalations, uh positive and negative sentiments last month." So, such kind of uh questions and scenarios we can able to uh uh do with the help of this uh multi-hop recall. And that's uh exactly what uh Neo4j agent library uh actually does. And um as I already mentioned, the relationships uh are essential in this, and it becomes the first and foremost priority uh when we uh uh
discuss about the knowledge graph and create one. So, uh if the memory [snorts] is about connections, then then the graph is not an add-on, it's a native shape. Uh so, as I already mentioned that we inspire the graph kind of structure from uh the human brain, uh how we store and process this information. So, that's the basic thing. So, if your memory is about connections, then you
can just close your eyes and go ahead and uh go for the graph uh database. Um so, considering our example that we had for Johnson, who was actually a a support specialist, and he he wants to solve uh the tickets. So, uh in in that context, uh we can try to think about nodes like uh the user, uh the conversation, the messages, the preferences, and uh what
are the goals and tickets uh data, what are the events data, and the decisions, and and and the tool calls that are involved uh in the nodes. And for So, once we have the notes created in our And then for these notes, we can create the relationships like the has preference or the mentioned and or the raised ticket and who resolved it, what is the promise and
led to. So, when we have this kind of notes and relationship kind of and entities and relationship kind of graph database, it becomes easier for the agent to understand the context. So, the agent not only just try to bluff the text or just try to rewrite or summarize the text, it just understands the actual context, understands the meanings and the relationship between these notes. And then it
will try to analyze and then provide the response out of that. So, that will make the real difference as compared to the traditional systems than the graph systems. And how the agents actually basically think. So, let me just give a complete picture of how what exactly happens in the back end in the Neo4j back end. So, the user basically sends a message and the Neo4j memory the
client actually fetches the relevant short-term messages, the long-term entities and the reasoning traces. That [snorts] context graph is turned into a prompt for LLM as I mentioned before. So, then the agent will try to query and get the response from the LLM and then it will reply the user for whatever question he has asked. So, then crucially the memory if if it is required, then we can
actually write the back write the new entries or the updated preferences and new decisions back into the knowledge graph. uh in a nutshell, this is what happens when we try to sort of create the knowledge graph and query the knowledge graph and and finally have that information or the new entry stored back in the knowledge graph uh whenever we try to create such systems. And these are
some of the failure stories that I was mentioning and while in the agenda. So, there are some stories that I remember like the Groundhog Day onboarding flow where an assistant asks the same question every Monday and and the end users get annoyed with this kind of thing and and it leads to loss of the clients and customers. So, and and and then again we have the lost
escalation a problem where yesterday's critical incident never shows up in today's conversation and that will lead to discontinuity we would the person who actually tries to solve that the tickets or the problem will try to miss that point in today's conversation whenever he's having it with the end user. And then we have the stale assumption so where the agent still optimizes for old long goals after the
customer changed the direction. So, like none of these are actually failures when we are the actual failures but it's just that these are like having a poor memory kind of thing. So, the models have a good IQ, they're good at rewriting, they're good at summarizing, everything is super and top-notch but it's the problem about the memory architecture and and that's exactly what the Neo4j's AI in production
examples and the agent memory tools are actually tracking us. And one of the other recent use case I was trying to work upon is on the financial data set the different transaction that we do on a monthly basis. So each time we always have this question that where this money go and and how do I track it and is my new strategy that I can follow to
basically save up some money or see where did the actual spend that I did on. So in that kind of scenarios also graph can play a a vital role. It can be a best use case to try on if we can try to use the graph database to solve these kind of financial analysis problems as well. Um so in today's current scenario so this this is what
the the enterprise AI teams are basically trying to focus on. So they try [snorts] to see we have seen a lot of news and updates that is coming on about agents, about the systems, the workflows, the AI automations, etc. And now the teams the enterprises have also started looking about the context graphs, the knowledge graphs. So they're trying to see and adopt these graphs into their workflows
especially when a complex and deep understanding is required in the use case, right? So the enterprises have started shifting towards the shifting their lens towards these context graphs and started actually focusing more towards that and implementing that in their uh, use cases. So, I think, most about what we have discussed on, the knowledge graphs, and we can also see, the different benefits of actually or creating this
persistent, evolving, and reliable systems. So, there basically a lot of benefits we have discussed upon, but these are some of the important factors and benefits out there. So, we can always try to or we can also say this is kind of best practice or a handbook kind of a thing when we whenever we are trying to create the knowledge graph. So, whenever we are trying to create
a knowledge graph, we we always want to have a separate logs from the curated memory graph, and then we also want to track the time, the source, and the confidence of the entities and responses. And we can store the facts, preferences, and events. Basically, whenever we are trying to set up these notes and relationships. And then we also let the agent reflect and update the beliefs on
it. Let the agent continuously learn from whatever it has produced, and try to come up with a better and most relevant and meaningful responses whenever the user queries on this kind And then we finally have a the design for collecting and forgetting. Instead of your agent being amnesic, you can try to implement these kind of knowledge graphs to be more reliable and persistent system, and so that
it doesn't actually starts forgetting things, but it actually learns and understands your use case better, your tasks and works better, and then uh support and provide you uh the best uh outcome and results uh going forward. So, we almost reached uh to the end of uh our slide. Uh I'll leave you with uh this uh questions and these thoughts to ponder upon. So, if uh AI can't
remember the relationships, can it really be your assistant? Can it really be your super intern that we call and uh we have spent years pushing for uh big context windows and uh bigger models, and we still are trying to thrive upon uh creating uh more robust and bigger models, but uh what uh builds trust? Right? And uh would you trust an AI assistant that actually forgets uh
things and and and should memory be the uh new frontier um in in in the coming uh future? So, that's uh what I would like to uh leave upon uh for you guys. yeah. So, that's uh it from my side. Uh thanks for attending. We can stay in the LinkedIn. Yeah. >> [music]
More from this event
See all 37 talks →
NODES AI 2026 - Agentic GraphRAG: Autonomous Knowledge Graph Construction and Adaptive Retrieval
11:51
NODES AI 2026 - Semiont: A Graph Based, AI Native Wiki and Annotator
29:48
NODES AI 2026 - MemMachine: Agents That Learn, Memory That Lasts
30:03
NODES AI 2026 - Ghost-busting with Neo4j Graph Analytics in Snowflake
28:47