模仿人类记忆机制,让大模型分步推理长篇故事。
ComoRAG: A Cognitive-Inspired Memory-Organized RAG for Stateful Long Narrative Reasoning

- 引入动态记忆空间,支持多轮迭代式推理。
- 在四个超长文本基准上提升最高达11%。
- 适合需要全局理解的复杂叙事问答任务。
长篇故事和小说的叙述理解因情节复杂、人物关系交织且动态变化而极具挑战性。尽管大语言模型在长上下文推理中表现下降且计算成本高,基于检索的方法仍是实际应用的关键。然而,传统RAG方法依赖无状态、单步检索,难以捕捉长距离上下文中的动态关联。本文提出ComoRAG,其核心理念是:叙述推理并非一次性过程,而是新证据获取与旧知识整合之间的动态演进,类似人脑的记忆驱动推理。当遇到推理瓶颈时,ComoRAG通过与动态记忆工作区交互,进行多轮推理循环:生成探查查询以开辟新路径,并将检索到的新信息整合至全局记忆池,从而构建连贯的上下文支持问题求解。在四个长上下文叙事基准(200K+ tokens)上,ComoRAG相较于最强基线,相对提升最高达11%。进一步分析表明,该方法在需要全局上下文理解的复杂查询中尤为突出,提供了一种具认知启发的、有原则的有状态检索推理范式。代码已公开于https://github.com/EternityJune25/ComoRAG。
原文摘要 · Abstract (English)
Narrative comprehension on long stories and novels has been a challenging domain attributed to their intricate plotlines and entangled, often evolving relations among characters and entities. Given the LLM's diminished reasoning over extended context and its high computational cost, retrieval-based approaches remain a pivotal role in practice. However, traditional RAG methods could fall short due to their stateless, single-step retrieval process, which often overlooks the dynamic nature of capturing interconnected relations within long-range context. In this work, we propose ComoRAG, holding the principle that narrative reasoning is not a one-shot process, but a dynamic, evolving interplay between new evidence acquisition and past knowledge consolidation, analogous to human cognition on reasoning with memory-related signals in the brain. Specifically, when encountering a reasoning impasse, ComoRAG undergoes iterative reasoning cycles while interacting with a dynamic memory workspace. In each cycle, it generates probing queries to devise new exploratory paths, then integrates the retrieved evidence of new aspects into a global memory pool, thereby supporting the emergence of a coherent context for the query resolution. Across four challenging long-context narrative benchmarks (200K+ tokens), ComoRAG outperforms strong RAG baselines with consistent relative gains up to 11% compared to the strongest baseline. Further analysis reveals that ComoRAG is particularly advantageous for complex queries requiring global context comprehension, offering a principled, cognitively motivated paradigm towards retrieval-based stateful reasoning. Our framework is made publicly available at https://github.com/EternityJune25/ComoRAG.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。