Lecțiile acestui traseu sunt publicate deocamdată doar în engleză, așa că lecția de mai jos apare în engleză. Restul — module, quiz și materiale — funcționează la fel.
Memory — Short-Term Context & Long-Term State
Vei putea să:
You can distinguish between context-window memory, scratchpad memory, and retrieval-based long-term memory — and explain why simply 'putting everything in context' fails at scale.
An agent handling a long support conversation starts contradicting a decision it made twenty turns earlier. The conversation is still comfortably within the context limit, nothing was truncated, and no error appears anywhere. The information is present and the model is not using it. This is the moment teams discover that context capacity and effective memory are different things.
Three kinds of memory
Context-window memory is whatever is in the current request. It is immediate, exact, and re-sent on every single turn. Scratchpad memory is the agent's working notes within a task — intermediate results, a running plan, what has been tried. Long-term memory persists across tasks and sessions, and is retrieved rather than carried, typically by encoding text into embedding vectors and searching a vector database for the nearest matches, often combined with structured filters or keyword signals in a hybrid setup.
Why "just put everything in context" breaks
There are three distinct reasons, and they fail independently.
Cost. The full history is re-sent on every turn, so a long session pays for the same tokens repeatedly. Spend rises with conversation length even when nothing new is happening.
Attention degradation. Retrieval of a specific fact is measurably weaker when that fact sits in the middle of a long context than at either end. The information is present and under-weighted.
Distraction. This is the least intuitive and the most damaging: irrelevant context actively lowers accuracy. Adding a plausibly-related-but-wrong document does not leave performance unchanged — it degrades it. More context is not free even when it is affordable.
Larger context windows shift the economics of all three. They do not repeal any of them, which is why retrieval and compaction remain necessary at every window size.
The real design question is what to forget
Memory design is mostly discard policy: what gets summarised, what gets dropped, what earns a place in long-term storage, and what expires. An agent that writes everything to long-term memory has built a slower, more expensive way to be confused.
Failure modes
Lost in the middle — a critical fact is present but positioned centrally and effectively ignored. Signal: accuracy that depends on where a fact sits rather than whether it is included.
Cost creep — per-turn spend climbing steadily through a session with no change in task complexity. Signal: a cost curve that tracks turn count rather than difficulty.
Stale memory — retrieved long-term memory contradicts current reality, and the model trusts the memory. Signal: confident assertions of facts that were true last quarter.
Memory poisoning — an incorrect conclusion is written to long-term store and retrieved forever after, reinforcing itself. Signal: the same specific wrong fact recurring across otherwise unrelated sessions.
Explaining this to stakeholders
On the three tiers: the context window is your desk, the scratchpad is the notepad beside it, and long-term memory is the filing cabinet. Emptying the cabinet onto the desk does not help you work — it buries the document you needed.
On why bigger context windows did not solve this: a larger desk still gets cluttered. What matters is what you choose to put on it.
On memory that goes wrong: a system that remembers everything includes remembering its mistakes. Without a way to correct or expire what it stored, one bad conclusion becomes permanent and gets more confident each time it is retrieved.
Verifică-te
Misiunea modulului
20–30 minFor a customer-support agent handling a multi-day case, design a three-tier memory strategy: what stays in context, what goes to scratchpad, what goes to durable storage. Justify each boundary.
Se încarcă lucrarea ta…
Materiale selectate
1.2hMunca de profunzime se întâmplă aici — lecția este briefingul tău.
În direct pe aiqbench
Subiectul acestei lecții în restul site-ului, astăzi.
În știri, ultimele 30 de zile
- OpenAI AI Agents Bypass Security Restrictions and Access Government Systems Without PermissionCybersecurity News ·
- We let AI agents break the rules on Black Friday. One stole a TV and another called the policeFortune ·
- How workable is the “human-in-the-loop” concept in agentic AI?IDC ·
Mergi mai departe
- Fișele benchmarkurilorCe măsoară fiecare benchmark și unde nu ajunge.
- Întreabă AI despre această lecțieDeschide Întreabă AI cu o întrebare despre această lecție, cu răspuns din arhiva de știri, cu surse.
- Skill-uri de agent pentru această muncăSkill-uri gata făcute pentru agenți AI de programare, verificate și evaluate.