A Human-Inspired Reading Agent with Gist Memory of Very Long Contexts

Kuang-Huei Lee, Xinyun Chen, Hiroki Furuta, John F. Canny, Ian Fischer

arXiv:2402.09727 · 2026-07-27 공개 · arXiv · PDF

long-context llm-agent episodic-memory context-extension narrativeqa reading-comprehension gist-memory quality

Abstract

Current Large Language Models (LLMs) are not only limited to some maximum context length, but also are not able to robustly consume long inputs. To address these limitations, we propose ReadAgent, an LLM agent system that increases effective context length up to 20x in our experiments. Inspired by how humans interactively read long documents, we implement ReadAgent as a simple prompting system that uses the advanced language capabilities of LLMs to (1) decide what content to store together in a memory episode, (2) compress those memory episodes into short episodic memories called gist memories, and (3) take actions to look up passages in the original text if ReadAgent needs to remind itself of relevant details to complete a task. We evaluate ReadAgent against baselines using retrieval methods, using the original long contexts, and using the gist memories. These evaluations are performed on three long-document reading comprehension tasks: QuALITY, NarrativeQA, and QMSum. ReadAgent outperforms the baselines on all three tasks while extending the effective context window by 3.5-20x.

한국어 요약

한 줄 요약

ReadAgent는 인간의 독서 방식을 모방하여 20배 긴 컨텍스트를 처리하는 LLM 에이전트 시스템이다.

핵심 기여도

핵심 아이디어

ReadAgent는 인간이 긴 문서를 읽을 때 사용하는 **gist memory**와 **interactive look-up** 메커니즘을 모방한 LLM 에이전트 시스템이다. 인간은 정확한 단어보다는 전체적인 의미(gist)를 기억하며, 필요 시 원본 텍스트에서 세부 정보를 찾아보는 방식으로 긴 텍스트를 처리한다. ReadAgent는 LLM의 고급 언어 능력을 활용해 (1) **episode pagination**을 통해 텍스트를 페이지 단위로 나누고, (2) **memory gisting**을 통해 각 페이지를 요약한 **gist memory**를 생성하며, (3) **interactive look-up**을 통해 필요한 정보를 원본에서 다시 검색한다. 이는 LLM이 단일 컨텍스트 내에서 처리할 수 있는 정보량을 줄이면서도 전체적인 맥락을 유지할 수 있게 한다.

기술적 접근법

주요 결과

의의 및 한계

ReadAgent는 LLM의 컨텍스트 길이 한계를 극복하고, 인간과 유사한 방식으로 긴 텍스트를 처리할 수 있는 시스템을 제시한다. 특히, **zero-shot 기반**으로 훈련 없이도 뛰어난 성능을 보이는 점에서 실용적 가치가 크다. 또한, **gist memory**를 활용한 압축 방식은 LLM의 처리 효율성을 높이며, **대규모 문서 분석** 및 **웹 탐색** 등에 적용 가능하다. 그러나 **gist memory 자체가 매우 길어지면 성능 저하**가 발생하며, **무한한 컨텍스트 길이 확장은 불가능**하다는 한계가 존재한다.

실용적 활용

ReadAgent는 **법률 문서 분석**, **학술 논문 요약**, **웹 탐색**, **고객 지원 시스템** 등 긴 텍스트를 다루는 산업 및 연구 분야에 적용 가능하다. 특히, **LLM의 입력 길이 제한을 우회**하면서도 **정확도와 효율성을 유지**할 수 있어, 대규모 문서 처리 시스템 개발에 유용한 기반 기술이 될 수 있다.