AB
AiBoss
project

RAG-Anything - HKU Open Source Multimodal RAG System

RAG-Anything is an open-source, multimodal RAG system developed by the Data Intelligence Laboratory at the University of Hong Kong. The system supports processing complex documents containing text, images, tables, and formulas, providing an end-to-end solution from document ingestion to intelligent querying...

What is RAG-Anything?

RAG-Anything is an open-source, multimodal RAG system developed by the Data Intelligence Laboratory at the University of Hong Kong. The system supports processing complex documents containing text, images, tables, and formulas, providing an end-to-end solution from document ingestion to intelligent querying. Based on a multimodal knowledge graph, a flexible parsing architecture, and a hybrid retrieval mechanism, the system significantly improves its ability to process complex documents and supports various document formats, such as PDF, Office documents, images, and text files. RAG-Anything's core advantages include an end-to-end multimodal pipeline, multi-format document support, a multimodal content analysis engine, knowledge graph indexing, a flexible processing architecture, and a cross-modal retrieval mechanism.

RAG-Anything's main functions

  • End-to-end multimodal pipelineIt provides an integrated workflow, from document parsing to multimodal intelligent querying.
  • Multi-format document supportIt is compatible with PDF, Office documents (DOC/DOCX, PPT/PPTX, XLS/XLSX), images (JPG, PNG, etc.) and text files (TXT, MD).
  • Multimodal content analysis engineDedicated processors are deployed for images, tables, formulas, and general text content to ensure accurate parsing of all types of content.
  • Knowledge Graph IndexAutomatically extract entities and cross-modal relationships to build a semantic connectivity network.
  • Flexible processing architectureSupports MinerU intelligent parsing mode and direct multimodal content insertion mode, adapting to diverse scenarios.
  • Cross-modal retrieval mechanismIt enables intelligent retrieval of cross-text and multimodal content, providing accurate information location and matching capabilities.

RAG-Anything's technical principles

  • Graph-enhanced text indexingThis approach uses LLM (Learning Modeling) to extract entities (nodes) and their relationships (edges) from text, using this information to construct a knowledge graph. For each entity node and relationship edge, text key-value pairs are generated, where the key is a word or phrase for efficient retrieval, and the value is a text paragraph summarizing relevant external data fragments. It identifies and merges identical entities and relationships from different text fragments, reducing the overhead of graph operations and improving data processing efficiency.
  • Dual retrieval paradigm:
    • Low-level retrievalIt focuses on retrieving specific entities and their attributes or relationships, and is suitable for detailed queries that require precise information.
    • High-level searchIt deals with broader topics and themes, providing insights into advanced concepts and summaries based on information that aggregates multiple related entities and relationships.
    • Graph and vector integrationBy combining graph structures and vector representations, the retrieval algorithm uses local and global keywords to improve retrieval efficiency and result relevance.
  • Search-enhanced answer generationUsing the retrieved information, LLM generates answers based on the collected data, including entity and relationship names, descriptions, and raw text fragments. By unifying the query with multi-source text, LLM generates answers consistent with user needs, ensuring alignment with query intent.
  • Complexity AnalysisThe graph-based indexing stage uses LLM to extract entities and relations from each text block without additional overhead, efficiently managing new text updates. The graph-based retrieval stage uses LLM to generate relevant keywords and relies on vector search for retrieval, significantly reducing retrieval overhead.

RAG-Anything project address

  • GitHub repositoryhttps://github.com/HKUDS/RAG-Anything
  • arXiv technical paper: https://arxiv.org/pdf/2410.05779

Application scenarios of RAG-Anything

  • academic researchIt can quickly parse and understand large amounts of academic literature, extract key information and research results, support literature reviews and experimental data analysis, and facilitate interdisciplinary research.
  • Enterprise knowledge managementIt integrates internal enterprise documents, such as meeting minutes and project reports, providing intelligent query and knowledge sharing to improve the efficiency of internal information flow.
  • Financial AnalysisProcessing financial statements and market research reports, extracting key financial indicators and market trends to assist in risk assessment and investment decisions.
  • HealthcareIt parses text, images, and tables in medical records to support medical diagnosis and treatment planning, and processes medical research literature and experimental data.
  • Intelligent Customer ServiceQuickly answer customer questions, improve customer service efficiency, integrate the enterprise knowledge base, provide intelligent search and knowledge recommendation, and optimize customer experience.