Hugging Face Daily Papers · · 4 min read

PEEK: Context Map as an Orientation Cache for Long-Context LLM Agents

Mirrored from Hugging Face Daily Papers for archival readability. Support the source by reading on the original site.

\n<li><strong>Full Paper</strong> — <a href=\"https://arxiv.org/abs/2605.19932\" rel=\"nofollow\">arXiv:2605.19932</a></li>\n<li><strong>Blog Post</strong> — <a href=\"https://zhuohangu.github.io/blog-post-peek/\" rel=\"nofollow\">Give Your Agent an Orientation Cache</a></li>\n</ul>\n","updatedAt":"2026-05-20T04:39:33.900Z","author":{"_id":"6660b69dc8bbe034b47a96b6","avatarUrl":"/avatars/c21d2b8fb4a4ba8c7d60226bb8dc98e3.svg","fullname":"Joshua Gu","name":"joshuagu15","type":"user","isPro":false,"isHf":false,"isHfAdmin":false,"isMod":false,"isUserFollowing":false}},"numEdits":0,"identifiedLanguage":{"language":"en","probability":0.38173413276672363},"editors":["joshuagu15"],"editorAvatarUrls":["/avatars/c21d2b8fb4a4ba8c7d60226bb8dc98e3.svg"],"reactions":[],"isReport":false}}],"primaryEmailConfirmed":false,"paper":{"id":"2605.19932","authors":[{"_id":"6a0d2d6c65eb30f20d962cc1","name":"Zhuohan Gu","hidden":false},{"_id":"6a0d2d6c65eb30f20d962cc2","name":"Qizheng Zhang","hidden":false},{"_id":"6a0d2d6c65eb30f20d962cc3","name":"Omar Khattab","hidden":false},{"_id":"6a0d2d6c65eb30f20d962cc4","name":"Samuel Madden","hidden":false}],"mediaUrls":["https://cdn-uploads.huggingface.co/production/uploads/6660b69dc8bbe034b47a96b6/fajgc6j585FemCp2p57zI.png"],"publishedAt":"2026-05-19T00:00:00.000Z","submittedOnDailyAt":"2026-05-20T00:00:00.000Z","title":"PEEK: Context Map as an Orientation Cache for Long-Context LLM Agents","submittedOnDailyBy":{"_id":"6660b69dc8bbe034b47a96b6","avatarUrl":"/avatars/c21d2b8fb4a4ba8c7d60226bb8dc98e3.svg","isPro":false,"fullname":"Joshua Gu","user":"joshuagu15","type":"user","name":"joshuagu15"},"summary":"Large language model (LLM) agents increasingly operate over long and recurring external contexts, like document corpora and code repositories. Across invocations, existing approaches preserve either the agent's trajectory, passive access to raw material, or task-level strategies. None of them preserves what we argue is most needed for repeated same-context workloads: reusable orientation knowledge (e.g., what the context contains, how it is organized, and which entities, constants, and schemas have historically been useful) about the recurring context itself. We introduce PEEK, a system that caches and maintains this orientation knowledge as a context map: a small, constant-sized artifact in the agent's prompt that gives it a persistent peek into the external context. The map is maintained by a programmable cache policy with three modules: a Distiller that extracts transferable knowledge from inference-time signals, a Cartographer that translates it into structured edits, and a priority-based Evictor that enforces a fixed token budget. On long-context reasoning and information aggregation, PEEK improves over strong baselines by 6.3-34.0% while using 93-145 fewer iterations and incurring 1.7-5.8x lower cost than the state-of-the-art prompt-learning framework, ACE. On context learning, PEEK improves solving rate and rubric accuracy by 6.0-14.0% and 7.8-12.1%, respectively, at 1.4x lower cost than ACE. These gains generalize across LMs and agent architectures, including OpenAI Codex, a production-grade coding agent. Together, these results show that a context map helps long-context LLM agents interact with recurring external contexts more accurately and efficiently.","upvotes":1,"discussionId":"6a0d2d6c65eb30f20d962cc5","projectPage":"https://zhuohangu.github.io/blog-post-peek/","githubRepo":"https://github.com/zhuohangu/peek","githubRepoAddedBy":"user","ai_summary":"PEEK enables large language model agents to efficiently reuse orientation knowledge about recurring external contexts through a persistent context map that reduces computational costs and improves performance.","ai_keywords":["large language model agents","external contexts","reusable orientation knowledge","context map","programmable cache policy","Distiller","Cartographer","Evictor","long-context reasoning","information aggregation","context learning","prompt-learning framework","ACE","OpenAI Codex"],"githubStars":0,"organization":{"_id":"63728bde14d543d507ae970d","name":"MIT","fullname":"Massachusetts Institute of Technology","avatar":"https://cdn-avatars.huggingface.co/v1/production/uploads/noauth/S90qoeEJeEYaYf-c7Zs8g.png"}},"canReadDatabase":false,"canManagePapers":false,"canSubmit":false,"hasHfLevelAccess":false,"upvoted":false,"upvoters":[{"_id":"661ab1f1fa3b144a381fa454","avatarUrl":"https://cdn-avatars.huggingface.co/v1/production/uploads/661ab1f1fa3b144a381fa454/IlpZBb9NCjo7ntFwMIH53.png","isPro":true,"fullname":"Urro","user":"urroxyz","type":"user"}],"acceptLanguages":["en"],"dailyPaperRank":0,"organization":{"_id":"63728bde14d543d507ae970d","name":"MIT","fullname":"Massachusetts Institute of Technology","avatar":"https://cdn-avatars.huggingface.co/v1/production/uploads/noauth/S90qoeEJeEYaYf-c7Zs8g.png"}}">
Papers
arxiv:2605.19932

PEEK: Context Map as an Orientation Cache for Long-Context LLM Agents

Published on May 19
· Submitted by
Joshua Gu
on May 20
Authors:
,
,
,

Abstract

PEEK enables large language model agents to efficiently reuse orientation knowledge about recurring external contexts through a persistent context map that reduces computational costs and improves performance.

AI-generated summary

Large language model (LLM) agents increasingly operate over long and recurring external contexts, like document corpora and code repositories. Across invocations, existing approaches preserve either the agent's trajectory, passive access to raw material, or task-level strategies. None of them preserves what we argue is most needed for repeated same-context workloads: reusable orientation knowledge (e.g., what the context contains, how it is organized, and which entities, constants, and schemas have historically been useful) about the recurring context itself. We introduce PEEK, a system that caches and maintains this orientation knowledge as a context map: a small, constant-sized artifact in the agent's prompt that gives it a persistent peek into the external context. The map is maintained by a programmable cache policy with three modules: a Distiller that extracts transferable knowledge from inference-time signals, a Cartographer that translates it into structured edits, and a priority-based Evictor that enforces a fixed token budget. On long-context reasoning and information aggregation, PEEK improves over strong baselines by 6.3-34.0% while using 93-145 fewer iterations and incurring 1.7-5.8x lower cost than the state-of-the-art prompt-learning framework, ACE. On context learning, PEEK improves solving rate and rubric accuracy by 6.0-14.0% and 7.8-12.1%, respectively, at 1.4x lower cost than ACE. These gains generalize across LMs and agent architectures, including OpenAI Codex, a production-grade coding agent. Together, these results show that a context map helps long-context LLM agents interact with recurring external contexts more accurately and efficiently.

Community

Upload images, audio, and videos by dragging in the text input, pasting, or clicking here.
Tap or paste here to upload images

· Sign up or log in to comment

Models citing this paper 0

No model linking this paper

Cite arxiv.org/abs/2605.19932 in a model README.md to link it from this page.

Datasets citing this paper 0

No dataset linking this paper

Cite arxiv.org/abs/2605.19932 in a dataset README.md to link it from this page.

Spaces citing this paper 0

No Space linking this paper

Cite arxiv.org/abs/2605.19932 in a Space README.md to link it from this page.

Collections including this paper 0

No Collection including this paper

Add this paper to a collection to link it from this page.

Discussion (0)

Sign in to join the discussion. Free account, 30 seconds — email code or GitHub.

Sign in →

No comments yet. Sign in and be the first to say something.

More from Hugging Face Daily Papers