Skip to content
Notes on AIE020Act 2 — Behavior & Limits

Why Long Chats Get Confused

E020 · by — AI Strategist, Practitioner & Educator · Founder, AI Center of Excellence

Introduce RAG as a response to context and memory limits.

Full Explanation

The LLM inside a chatbot has no memory. Every response is generated fresh from the same frozen trained model -- it doesn't retain anything between responses and doesn't become smarter as you chat. What feels like memory is actually the surrounding system assembling a prompt that includes the conversation history and re-sending the whole thing to the model each time. The model re-reads; it doesn't remember.

This architecture has a practical constraint: the context window. The model can only see a limited amount of text at once. When conversations grow long, earlier content gets compressed or removed -- and once it leaves the context window, the model cannot access it. For large documents and knowledge bases too big to fit in the prompt, a different approach is used: retrieval augmented generation (RAG). A retrieval system searches for the relevant pieces and adds only those to the prompt at the moment they're needed. The model answers using that context, without retaining any of it.

Transcript

Read every word ↓

When you use a chatbot like ChatGPT, it feels like it remembers what you said earlier. You ask a question, you add more details, you correct something, and the conversation seems to continue naturally. But something important is happening behind the scenes. The chatbot you see on the screen is actually a larger system. Inside the system sits the LLM, the language model. The LLM itself does not remember anything at all. It's not becoming smarter or retrained itself each time you provide new information or details. Think of it as a brain, and that brain starts from a clean state every time it produces a response.

It doesn't keep memory from the previous answers. Each time you send a message, the system prepares a larger prompt and sends it to the model. That prompt can include things like the system instructions, the conversation history, sometimes the current date, tool results, internet search results, sometimes documents or retrieved knowledge. All of that information is placed together and given to the model again. Then the model generates the next response, but the model itself is not remembering. It is simply processing whatever text it receives at that moment.

You can think of it like speaking to someone who wakes up without memory of the previous conversation. Each time you ask something, you first need to explain the situation again. Only then can the person respond. This also explains why long chats sometimes behave strangely. Details from earlier messages disappear, the model misses something you mentioned before. That happens because the context window is limited. Only a certain amount of text can be visible to the model at once. If the conversation becomes too long, all the parts must be compressed, summarized or removed.

And once information disappears from the context window, the model cannot see it anymore. Now imagine you want AI to answer questions about a long report, company data, or an entire knowledge base. Those documents are far too large to be placed entirely inside the context window. So AI systems use another strategy. They search for the relevant pieces of information and place only those pieces into the prompt before the model answers. This pattern has a name, retrieval augmented generation, or simply RAG. Instead of the model remembering documents, the system retrieves the right information and adds it to the prompt at the moment when it's needed.

The model then generates the answer using that context. So the important thing is this. The chatbot may feel like it remembers, but the language model inside of it is not remembering. Every response starts from the same trained model. It is frozen in time at the moment it finished training in the lab of OpenAI, Google, or Anthropic. And everything the model knows about your conversation is simply placed back into the context again, again, and again. This was a note on AI. Thank you for watching, and I'll see you in the next one.

Bye.

Resources

No dedicated resources for this episode yet.

Browse the resource library →

More from Act 2 — Behavior & Limits

Newsletter

Found this useful?

Join the newsletter. You get one e-mail when something new and useful is out: a video, a guide, a tool. No spam, no schedule, and you can leave with one click.

Alexey Makarov

Alexey Makarov

AI Strategist, Practitioner & Educator. Founder & Global Lead of the AI Center of Excellence at SEFE. Creator of the Unreasonable AI YouTube channel. Based in Berlin.

About Alexey →