liveBook · Manning

Compression

As explained in AI Agents in Action, Second Edition

Compression is the reduction or summarization of stored information while preserving information needed for later retrieval or use.

Compression reduces or summarizes stored information while preserving details needed for later retrieval or use. Like human memory, it favors significant and frequently accessed information over redundancy. section 6.4.5

Compression extends semantic augmentation by adding a grouping layer: similar memories or knowledge items are collected, then summarized into one more succinct representation. section 6.4.5

A practical compression workflow is:

  • Cluster semantically similar memories or knowledge items, using an algorithm such as k-means. section 6.4.5
  • Pass each cluster to a compression function that summarizes its contents into a single memory. section 6.4.5

Inspect a store for repetitive or duplicate information, especially when clusters are large or unbalanced. Verbose sources usually gain more from compression than concise ones, although repetitive code can also benefit. section 6.4.5

Apply compression periodically to evolving memory, while knowledge stores often benefit mainly during their initial load. Pair compression with forgetting when stale items must also be pruned. section 6.6

How AI Agents in Action, Second Edition covers it

How deep it goes
Explains clustering, summarization, storage, triggers, and timing, but does not specify a compression-function implementation.
Examples
Uses clustered memories, verbose documents, repetitive code, and updated vector databases as concrete cases.
What you can do after
Apply it by clustering similar items, summarizing clusters, and scheduling compression according to store behavior.
How it connects
Links semantic augmentation, semantic memory, clustering, vector databases, knowledge retrieval, and forgetting.

Also explained in

Compare how 11 books explain compression →

Related concepts

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