liveBook · Manning

Context window

As explained in The Art of AI Product Development

The maximum amount of tokenized input and retained conversational or task information that a language model can process in one operation.

A context window sets the practical boundary for an agent’s working memory: it limits how much prompt information, interaction history, tool context, and task results a language model can use at once. Keeping more information in context can preserve continuity, but longer prompts increase token costs, latency, and potential inaccuracies. section 9.2.3 section 9.3.1

Manage the boundary by deciding what the agent should retain:

  • Store only information that helps the next step, balancing usefulness against context size. section 9.2.3
  • Use prompt context for current-session information such as activity traces, synthesized summaries, and relevant interactions. section 9.2.3
  • Move durable history, results, and interaction records to long-term memory, retrieving them when later tasks need them. section 9.2.3
  • Treat a longer window as an imperfect solution: it may support more in-context intelligence while making the system slower and less reliable. section 9.3.1

Roadmap-update agent

An agent researching trends for a product roadmap must carry useful results into its synthesis step. It can keep a compact summary in the current prompt and retrieve prior-quarter interactions from long-term memory, rather than placing the entire history in the context window. section 9.2.3

Figure 9.14 Agents need short-term memory for the current session and long-term memory for learning and improvement over time.
A diagram of a computer process

AI-generated content may be incorrect.

Compare short-term memory for the current session with long-term memory for retrieval, learning, and improvement over time. section 9.2.3

How The Art of AI Product Development covers it

How deep it goes
Explains prompt contents, memory choices, and operational trade-offs, but stops short of specifying a context-management algorithm.
Examples
Uses multistep trend research, roadmap synthesis, conversation history, tool contexts, and retrieved prior-quarter interactions.
What you can do after
Diagnose agent bottlenecks by separating useful current context from information better stored and retrieved externally.
How it connects
Connects short-term memory, long-term memory, retrieval-augmented generation, self-reflection, and agent systems.

Also explained in

Compare how 22 books explain context window →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of The Art of AI Product Development. The section links point to the parts of the book it draws on.