$ eli5: how llm memory works YOU ask a question CONTEXT WINDOW Like an open notebook on the desk The LLM can ONLY see what is written here right now. Nothing else exists to it. LLM BRAIN Trained on lots of books. Knows language and facts. Reads the notebook, then answers. How does the LLM remember your chat? It writes it all in the notebook! Turn 1 You: "Hi, my name is Sam" AI: "Nice to meet you Sam!" -- written in notebook -- Turn 2 You: "What is 2+2?" AI: "It is 4!" -- appended to notebook -- Turn 3 You: "What is my name?" AI reads all pages... AI: "Your name is Sam!" But... Notebook has a limited size! Old pages drop. No Permanent Memory Start a new chat = blank notebook. It forgets EVERYTHING. Like waking up with no memories each day. Each session = fresh start Context Has a Limit The notebook has limited pages. Very long chats = old messages fall off the beginning. The AI may seem to "forget" early details. More pages = bigger context window Apps Can Add Memory Apps save summaries outside the notebook. Next chat, they paste a summary back in. The AI did not remember. It was just told again. eli5.cc

ELI5: how llm memory works

high confidence
June 17, 2026tech

// explanation

// eli5

What is LLM memory?

LLMs don't actually remember things like you do—they're like someone with amnesia who forgets everything after you stop talking [1]. To make them seem like they remember you, programmers add a "memory helper" that saves past conversations and shows them back to the AI, kind of like reading old texts before responding [1][2].

Why can't LLMs remember on their own?

LLMs are designed to only look at the words you give them right now—they have no brain storage like humans do [1]. Each time you chat, it's like meeting them for the first time unless someone writes down what you said and shows it to them again [1][3].

What types of memory can they use?

There are three kinds: facts they learned during training (like knowing the Earth is round), memories of your past conversations (like you telling them your name), and learned habits for doing tasks (like how to write an email) [2]. All three work together to make them seem smarter about you [2].

How do you give them memory?

You attach a database (like a notebook) that saves important things from your chats and shows them to the AI when needed [4][5]. You can also add fact databases like online encyclopedias so they know current information [4].

// sources

[1]How LLM Memory works : r/OpenAI - Reddit

Feb 14, 2024 ... To create the perception of a LLM being able to remember things about you, we combine a LLM with a memory abstraction layer.

[2]How Does LLM Memory Work? Building Context-Aware AI ...

Dec 16, 2025 ... LLMs use semantic memory (facts and knowledge stored externally), episodic memory (past conversation history), procedural memory (system ...

[3]How does an LLM retain conversation memory : r/ollama - Reddit

Jul 27, 2024 ... 18 votes, 49 comments. Hello everyone, I'm having a little trouble understanding how an LLM works locally. If I'm using Ollama and I'm ...

[4]How memory works in large language models | by Liam DeCoste

Jul 19, 2024 ... To increase its knowledge, we can add fact memory databases to the application. These databases function like encyclopedias to the models. For ...

[5]Long-term Memory in LLM Applications

Long-term memory allows agents to remember important information across conversations. LangMem provides ways to extract meaningful details from chats, store ...

[6]Memory for agents (conceptual video)video

Video by LangChain

Memory for agents (conceptual video)
[7]What is a Context Window? Unlocking LLM Secretsvideo

Video by IBM Technology

What is a Context Window? Unlocking LLM Secrets
[8]How to add memory to LLMs?video

Video by Traceloop

How to add memory to LLMs?

// related topics

quantum-computinghow wifi worksblockchaindata-scienceprompt-engineeringai-agents
industry partner slotavailable
reach people learning about how llm memory works
your brand appears here as the exclusive industry partner — seen by every reader actively studying this topic. one sponsor per page.
view all options →
explain something else →