PEEK: Context Map as an Orientation Cache for Long-Context LLM Agents
Zhuohan Gu, Qizheng Zhang, Omar Khattab, Samuel Madden
NeurIPS page · OpenReview · Open on the map
Category: LLM Reasoning, Memory & RAG › Test-Time Reasoning Efficiency · Type: system or tooling · Keywords: context caching, orientation knowledge, LLM agents, long-context reasoning, prompt engineering
Areas: LLM Reasoning › Agentic Reasoning › Efficient Agent Reasoning; Memory › Agent Memory Systems › Memory-Augmented Agents; Long Context › Long-context mechanisms › Long-context reasoning; AI Agents › Agentic Decision Making › Agentic Search
Summary
PEEK introduces a context map as an orientation cache that stores reusable knowledge about recurring external contexts, improving long-context LLM agents' accuracy and efficiency.
Explained to a 5-year-old
Imagine a robot that reads a big book many times. It forgets what the book is about each time, so it has to start over. This robot makes a tiny picture map that remembers the important parts of the book, like where the story happens and what characters are important. The robot updates this map a little each time it reads, keeping it small. Using this map, the robot can answer questions faster and with fewer mistakes.
Explained to a 5-year-old, longer
A robot helper reads long documents many times. Each time it starts fresh, forgetting what it already learned. This makes the robot work slowly and sometimes make mistakes. To fix this, the robot creates a small map that stores what the document contains. The map includes key topics, important names, and how the information is organized. The robot updates this map a little each time it reads, so it stays small. It uses three simple parts to keep the map useful: one part finds new facts, another draws the map, and a third decides what to forget when space runs out. By looking at the map instead of the whole document, the robot can answer questions faster. It also makes fewer mistakes because it remembers the important bits. The robot works well with many different types of documents, like code files and research papers. This helps people who need quick answers from large amounts of information. Overall, the map makes the robot smarter and more efficient when dealing with big books.
For a technical reader
PEEK stores reusable orientation knowledge about recurring external contexts in a compact context map that lives inside the agent's prompt. The map is continuously updated by three modules: a Distiller extracts useful facts from inference signals, a Cartographer formats them into structured edits, and an Evictor manages a fixed token budget. This caching strategy reduces iteration count and computational cost, delivering consistent performance gains across different language models and agent architectures.
Problem
LLM agents operating over long, recurring external contexts lack a way to retain reusable orientation knowledge about what the context contains, its organization, and useful entities, leading to repeated recomputation and inefficiency.
Method
The system caches orientation knowledge as a small, constant-size context map in the agent's prompt. It uses a programmable cache policy with three modules: a Distiller that extracts transferable knowledge from inference signals, a Cartographer that creates structured edits, and an Evictor that enforces a fixed token budget.
Results
The approach improves long-context reasoning and information aggregation by 6.3-34.0% while using 93-145 fewer iterations and 1.7-5.8× lower cost than ACE. It also raises solving rate by 6.0-14.0% and rubric accuracy by 7.8-12.1% at 1.4× lower cost.
Contributions
It introduces a context map as an orientation cache that captures reusable knowledge about recurring external contexts and a programmable cache policy with Distiller, Cartographer, and Evictor modules. The contributions demonstrate consistent gains across multiple LMs and agent architectures.
Practical relevance
It enables LLM agents to efficiently reuse orientation knowledge, reducing computation and cost when working with large document corpora or code repositories.
Research questions this paper is counted under
This page was written by language models from the title and abstract of each paper, and the answers were checked by two other models. It can be wrong: check the paper itself. Suggest a correction