跳到正文
arXiv cs.AI· Xinyuan Song, Bowen Zhu, Hasibul Haque, Liang Zhao·· 2 天前AI 评分39

MegaMem:面向超长上下文窗口的检索方案

MegaMem: A Retrieval Solution for Ultra-Large Context Windows

AI 导读

MegaMem 是一个源解析双视图检索系统,将语义访问与生成证据分离,在 EnterpriseRAG-Bench(超 50 万份企业文档、约 6.5 亿 token)上将 Overall 从 68.22 提升至 82.26,Correctness 达 86.50。

正文 · 原文

View PDF HTML (experimental)

Abstract:Modern language models and agents increasingly require persistent memory for complete codebases, long interaction histories, and heterogeneous enterprise records. The key challenge is to keep hundreds of millions of tokens searchable while passing only bounded source evidence to the answer model. We introduce MegaMem, a source-resolved dual-view retrieval system that separates semantic access from generation evidence. Distilled records and detailed evidence are searched with original and transformed queries; every distilled hit resolves to an immutable source ID before reciprocal-rank fusion, deduplication, and cross-encoder reranking; and only the highest-ranked detailed evidence within a fixed budget supports generation. Post-answer attribution then identifies which loaded sources support the fixed answer. We evaluate MegaMem on EnterpriseRAG-Bench, which contains more than 500,000 heterogeneous enterprise documents and approximately 650M tokens. MegaMem improves Overall from 68.22 to 82.26 and reaches 86.50 Correctness. These results show that MegaMem supports ultra-large persistent memory while preserving strong answer accuracy under a bounded generation context. By separating searchable memory scale from answer-context size, MegaMem provides a practical path toward accurate retrieval over memories ranging from hundreds of millions to one billion tokens. Our code is available at this https URL xfab-xinyuansong/MegaMem.git.
Subjects: Artificial Intelligence (cs.AI)
Cite as: arXiv:2608.22137 [cs.AI]
  (or arXiv:2608.22137v2 [cs.AI] for this version)
  https://doi.org/10.48550/arXiv.2608.22137

arXiv-issued DOI via DataCite

Submission history

From: Bowen Zhu [view email]
[v1] Sat, 22 Aug 2026 23:37:52 UTC (2,545 KB)
[v2] Thu, 15 Oct 2026 05:11:57 UTC (1,670 KB)

来源:arXiv cs.AI · arxiv.org