Short-term memory is a cognitive function that allows an individual to temporarily hold a limited amount of information in an active state for only a brief period.
Individuals studying cognitive psychology or human memory systems would read this alongside material detailing the differences between short-term and long-term data storage.
External context
When discussing memory capacity, it is crucial to note that while older estimates suggested a capacity of seven items, current understanding suggests a smaller range of three to five items. This temporary holding ability lasts only seconds, which contrasts with long-term memory's capability for indefinite information retention.
Short-term memory Wikipedia contributors, “Short-term memory”, en.wikipedia.orgLicence01What it is and how it works
The mechanism works by extending the model's context window with a sliding buffer that keeps the newest tokens while dropping the oldest when the limit is reached. Attention layers scan this buffer to weigh each token's relevance, so the model can condition its next prediction on the recent exchange. For example, in a multi‑turn dialogue the model adds each new user message and its own reply to the buffer, then processes the combined sequence before generating the next reply.
It is the short‑term memory that stores the latest parts of a conversation so the model can refer to them.
02What to do about it
03How it is measured or noticed
You can notice short‑term memory limits when the model stops referencing earlier parts of a conversation, when it returns generic answers, or when the API returns a truncation warning. The easiest check is to count the number of tokens in the request plus the response; if it exceeds the advertised window (often 8 k or 32 k tokens) the system will cut off the oldest content.
How the record puts it
Short-term memory is the capacity for holding a small amount of information in an active, readily available state for a short interval.
04Common mistakes
- Assuming the model remembers everything from a long chat
- Placing unrelated context after the key question
- Relying on the model to keep state across separate API calls
- Over‑loading the prompt with filler text
05Limits
Short‑term memory does not apply when the task requires long‑term facts that exceed the window, such as recalling a document written weeks ago, or when the model is used in batch processing where each item is independent. It is often confused with “long‑term memory” features that some agents implement externally, but those are separate from the built‑in context buffer.
06Worked example
User: What is the capital of France?
Assistant: The capital of France is Paris.
User: What is the population?
Assistant: As of 2023, the population of Paris is about 2.1 million.
The entry above is written by GetLoopLoop. What follows is what independent catalogues hold about the same term — none of it is the source of this page.
- Also called
- GO:0007614, primary memory, active memory, Memory, Short-Term
- Kind of thing
- biological process, memory type
The same term on Wikipedia
Catalogued in 40 languagesFrequently asked questions
What limits the length of short‑term memory?
The model's context window size, typically defined in tokens, determines how many recent items can be retained.
Can I increase the context window?
Some platforms let you select a larger window, but it may increase cost and latency.
Does short‑term memory affect SEO?
It influences how search snippets are generated, but it does not change how pages are indexed.
Wikimedia Commons
Related visuals with source and licence credit


Asked out loud
spoken, not typedThe same term in the words somebody uses speaking to an assistant rather than typing into a box — written from the situation, which is why each one carries the situation it came from.
Usually, you need to repeat the most critical constraints or rules right before asking the final question. This ensures those vital details are still active in its immediate memory for accurate completion.
It depends on how recently the information was stated relative to your current query. If it was too far back, you may need to quickly pull up a summary slide or key bullet points to jog its memory.
No, you can’t rely on it remembering everything from hundreds of pages automatically. You must manually highlight or extract the core facts needed for comparison and feed them back into the prompt.