The year/Independent research

Paper 2508.10419

ComoRAG: A Cognitive-Inspired Memory-Organized RAG for Stateful Long Narrative Reasoning

Published
Aug 2025
Research lab
Independent
Citations
13
GitHub
343 stars

01 In brief

Summary

ComoRAG is a cognitive-inspired, memory-organized RAG framework for stateful long narrative reasoning.

It addresses the limitations of traditional RAG methods, which are stateless and single-step, by mimicking the human Prefrontal Cortex's Metacognitive Regulation.

The framework uses a dynamic memory workspace and an iterative cognitive loop with five operations: Self-Probe, Tri-Retrieve, Mem-Encode, Mem-Fuse, and Try-Answer.

It builds a hierarchical knowledge source with three layers: Veridical (factual evidence), Semantic (thematic summaries), and Episodic (narrative flow).

Across four long-context narrative benchmarks (NarrativeQA, EN.QA, EN.MC, DetectiveQA), ComoRAG consistently outperforms strong baselines, achieving up to 11% relative gains.

Ablation studies confirm the importance of all components, with the Veridical layer and metacognitive loop being critical.

The framework excels on complex narrative and inferential queries, shows model-agnostic generalization (e.g., with GPT-4.1), and is plug-and-play, improving existing RAG methods like RAPTOR and HippoRAGv2.

The code is publicly available.

02 From the paper

Abstract

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.