liveBook · Manning

Memory

As explained in Introduction to Generative AI, Second Edition

A memory system is a component that stores and retrieves information about users or prior interactions across conversations.

If an assistant helps plan your week, remembering your time zone can spare you from repeating it every Monday. Memory is the ability to retain useful information and bring it into later interactions or steps of a task. It can make assistance more consistent, but remembering something is not the same as recalling it reliably or using it appropriately. section 10.4

Memory serves two related purposes:

  • Within a task, an agent can keep intermediate results available while it searches, uses tools, and decides what to do next. It may retain a search’s final result rather than every document returned. section 8.12
  • Across interactions, an assistant can retain earlier discussions, project details, or user preferences. This persistent memory supports continuity without requiring the user to repeat everything. section 8.12 section 8.3

Keeping all available information is not necessarily useful. Long chains of tool calls produce more results than an agent may need, so developers must choose what to retain and what to discard. Personalized assistants can also draw on extended context, semantic memory, and retrieval systems to bring past information into a response. These are ways to support recall, not guarantees that the right detail will appear at the right time. section 8.12 section 10.4

A continuing planning task

An assistant that knows a user’s time zone and usual planning tools can help schedule another week without asking for those details again. In a longer task involving several searches, it could keep each search’s useful conclusion while dropping the full set of retrieved documents. section 10.4 section 8.12

Figure 10.1 Structured memory graph for personalized AI
A diagram of a user

AI-generated content may be incorrect.

A structured memory graph offers one way to picture a persistent user profile: attributes, preferences, and relationships linked to an identity. section 10.4

Persistence also raises questions of control. Recall can be inconsistent, and memory may be tied to one vendor or device. Users may want to inspect, edit, limit, transfer, reset, or delete what an assistant remembers. Remembered confessions or preferences can make a social chatbot feel unusually intimate, potentially intensifying dependency; a helpful sense of continuity should not be mistaken for a human relationship. section 10.4 section 10.24 section 10.13

For agents that act across multiple steps, corrupted memory can also lead behavior off track. Evaluating memory therefore means looking beyond a single answer: testing consistency across sessions, probing for corruption, and examining how retained information affects later actions. section 8.17 section 10.22

How Introduction to Generative AI, Second Edition covers it

How deep it goes
Distinguishes task-level from cross-interaction memory and explains selection and recall at a high level, without implementation steps.
Examples
Uses weekly planning, retained search results, persistent assistant preferences, and a structured user-profile graph.
What it assumes
Starts with familiar assistant tasks before introducing agent tool results and terms such as semantic memory.
What you can do after
Evaluate/understand it by weighing useful continuity against inconsistent recall, corrupted memory, and the need for user control.
How it connects
Links memory to AI agents, personalization, retrieval, red teaming, and social chatbot dependency.

Also explained in

Compare how 14 books explain memory →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Introduction to Generative AI, Second Edition. The section links point to the parts of the book it draws on.