A summary instead of raw chunks
By Prof. Tom Yeh
Published: 2026-08-19
URL: https://www.byhand.ai/p/library-agents-context-compacting-the-retrieved-document
Library › Context Problems
-
-
-
-
-
-
-
-
-
-
-
-
-
Compacted Retrieval
-
-
-
-
-
-
-
A retrieved document arrives as raw chunks, and most of what they hold is not what the question needed. Compacting them before they enter the window means the agent reads a summary of the document instead of the document. Only the retrieval is compressed. The system prompt, the question, and the answer are what they were.
Paid members: the worksheet and its printable PDF are below ↓