AB
AiBoss
project

ComoRAG - A cognitive heuristic RAG framework jointly launched by South China University of Technology and WeChat.

ComoRAG is a cognitive heuristic retrieval augmented generation (RAG) framework jointly launched by the Institute of Future Technology at South China University of Technology, the WeChat AI team, and other institutions. It is specifically designed for understanding and reasoning about long narrative texts.

What is ComoRAG?

ComoRAG is a cognitive heuristic retrieval augmented generation (RAG) framework jointly developed by the Institute of Future Technology at South China University of Technology, the WeChat AI team, and other institutions. It is specifically designed for understanding and reasoning about long narrative texts. ComoRAG simulates the function of the human prefrontal cortex, integrating fragmented evidence into a coherent context based on a dynamic memory workspace and iterative reasoning loops, enabling stateful reasoning in long narratives. In multiple long-text narrative benchmark tests, ComoRAG significantly outperforms traditional RAG methods, demonstrating excellent performance on complex queries requiring global understanding.

ComoRAG's main functions

  • Understanding Long NarrativesIt can handle complex plots and character relationships, and solve complex problems that require a holistic understanding.
  • Dynamic memory and iterative reasoning: Gradually build and update the understanding of the narrative, and gradually form a coherent context.
  • Multi-level knowledge indexIt constructs a multi-layered knowledge index with factual, semantic, and plot layers, supporting multi-dimensional reasoning from details to abstractions.
  • Efficient retrieval and generationBased on retrieved relevant evidence to assist in generating answers, it significantly improves the efficiency and accuracy of processing long texts.

ComoRAG's technical principles

  • Dynamic memory workspaceAt the heart of ComoRAG is a dynamic memory workspace, used to store and update memory units during the reasoning process. Each memory unit contains an exploratory question, retrieved evidence, and clues as to how the evidence helps solve the original question.
  • Iterative inference loopWhen encountering a reasoning bottleneck, ComoRAG automatically initiates an iterative reasoning loop. In each loop, Self-Probe generates new probing questions to explore new information paths. Tri-Retrieve retrieves relevant evidence from a multi-level knowledge index. Mem-Encode encodes the retrieved evidence into new memory units. Mem-Fuse merges the new memory units with past memory units to generate more comprehensive clues. Try-Answer attempts to answer the original question with the new clues and evidence; if unsuccessful, it proceeds to the next loop.
  • Multi-level knowledge index:
    • Veridical LayerIt is built based on original text fragments to ensure that reasoning is based on factual evidence.
    • Semantic Layer: Capture the theme and conceptual structure of a text through semantic clustering and summarization.
    • Episodic LayerBy using a sliding window to summarize, the narrative flow and plot development can be reconstructed.
  • Cognitive regulation mechanismIt simulates the cognitive regulation mechanism of the human prefrontal cortex, and through dynamic memory and iterative reasoning, continuously evaluates and corrects the understanding of the narrative to achieve true stateful reasoning.

ComoRAG's project address

  • GitHub repositoryhttps://github.com/EternityJune25/ComoRAG
  • arXiv technical paper: https://arxiv.org/pdf/2508.10419

Application scenarios of ComoRAG

  • Analysis of literary worksIt helps researchers and students gain a deeper understanding of the complex plots and character relationships in literary works, and answer profound narrative questions, such as analyzing Snape's motivations in Harry Potter.
  • Film and television script optimization: Assist film and television production teams in refining the script plot, ensuring story coherence and logic, and optimizing script content.
  • Educational aidsIn the field of education, it enhances students' reading comprehension and critical thinking skills, helping users better analyze long reading materials.
  • Intelligent question answering system: Build an intelligent question-answering platform to handle complex narrative questions raised by users and provide accurate and coherent answers.
  • Content Creation AssistantIt provides novelists, screenwriters, and other creators with suggestions for plot organization and optimization, ensuring the coherence and appeal of the storyline.