The chatbot remembers—so why doesn’t the model?
Chatbots fluently reference details from earlier in your conversation, creating a compelling illusion of memory. Yet, the underlying large language model (LLM) itself possesses no persistent state; it operates as a stateless function. Every interaction is a fresh request, devoid of personal recall from prior exchanges.
An LLM’s core task involves predicting the next token based solely on its current input. Once it generates a response and the inference process concludes, the model does not retain that interaction as a personal recollection. Think of it like a calculator: it performs a computation and displays the result, but doesn't "remember" the previous sum when you input a new one.
The conversational continuity you experience stems from the surrounding application, not from a hidden internal memory within the LLM. Software wrappers, like those used by ChatGPT or Claude, achieve this by prepending the entire conversation history to each new prompt. This re-injection of past exchanges creates the sophisticated illusion that the model is remembering, when it's simply processing an ever-growing input.
The memory trick: replay the conversation
Chat applications achieve conversational continuity by resending the entire preceding dialogue history with each new user message. This technique, often called "context window stuffing," provides the LLM with all necessary information to generate a coherent response, creating the illusion of memory. The model processes this concatenated text as a single, extended prompt.
For persistent recall across sessions, an application can store key facts, user preferences, or past interactions in a database or file. When a user returns, the application retrieves these stored details and inserts them into the initial prompt, allowing the LLM to reference previous information. This is stored data, not an intrinsic memory of the model itself.
This memory trick comes with trade-offs. Repeatedly including long histories significantly increases the total number of tokens sent with each turn, escalating API costs. An LLM's context window also imposes a hard limit on input length, restricting the depth of simulated memory. While prompt caching can optimize repeated prefixes, it does not confer lasting memory to the underlying model.
Your words take a detour through tokens
While your chat application handles the conversation replay, the Large Language Model (LLM) itself doesn't directly process your words. Internally, LLMs operate on numerical representations called tokens. Before your text reaches the model, a tokenizer converts it into a sequence of these token IDs.
Tokens are not simply individual words or characters; they are chunks of text that the model's training data identified as statistically significant. A common word like “the” might become a single token, but a less frequent or complex word, such as “unbelievable,” could be split into multiple smaller fragments like “un,” “believe,” and “able.” This subword tokenization allows models to handle a vast vocabulary efficiently.
Understanding token counts is crucial because they directly impact context window limits and API costs. As a general rule of thumb, 1,000 tokens correspond to approximately 750 English words, but this can vary depending on the text. You can check the precise token count for any given text using tools like the OpenAI Tokenizer Tool. This conversion process, while invisible to the user, is fundamental to how LLMs interpret and generate human language.
Enjoying this? Get one like it in your inbox each morning.
one email a day · unsubscribe in two clicks · no third-party tracking
The real cost of pretending to remember
Pretending to remember carries real costs. Providers count both input and output tokens for pricing and rate limits; consequently, resending an entire, growing transcript with each turn makes long chats more expensive. A typical English token averages about three-quarters of a word, so a conversation spanning several pages can quickly accumulate thousands of tokens.
Adding more history doesn't guarantee better recall. Studies show that crucial details can become harder for the model to "see" when buried deep within a massive prompt, a phenomenon sometimes called context degradation. The model’s attention mechanism, which scales with token length, can struggle to effectively weigh all parts of an overly long input.
Treat saved chatbot memory as an application feature, distinct from the LLM’s core capabilities. Check what details a service stores and how it uses them to inform future interactions. Understanding this distinction is key to effectively using these powerful, yet stateless, systems.
For further reading, consult OpenAI’s memory help page and the foundational paper, "Attention Is All You Need."
Frequently Asked Questions
Do LLMs remember previous conversations?
A model does not retain a conversation after a request ends. An app can store chat history or user details and include relevant information in later prompts.
Why does a chatbot seem to remember me?
The chatbot application may resend earlier messages or retrieve saved details, making the conversation feel continuous even though the model itself has no persistent memory.
What are tokens in an LLM?
Tokens are numerical units representing text. They can be whole common words or fragments of less common words, and they affect model limits and API costs.
Does resending chat history make AI more expensive?
It can. When an app includes more prior messages with each request, input token use accumulates across turns, although caching may reduce the cost of repeated text.

