RAG-Anything Read Its OWN Paper… and the Results Are WILD

RAG-Anything is an advanced retrieval system that enhances information extraction from complex, multimodal documents by parsing PDFs into atomic units and constructing integrated knowledge graphs, enabling precise answers from tables, figures, and equations. Demonstrated to outperform existing models on benchmarks and even accurately answer questions about its own research paper, it offers significant accuracy improvements despite slower processing times and setup requirements.

The video explores RAG-Anything, a system developed by the Data Intelligence Lab at the University of Hong Kong, designed to improve information retrieval from complex documents like research papers and financial reports. Unlike traditional Retrieval-Augmented Generation (RAG) models that work primarily with text chunks, RAG-Anything parses PDFs into “atomic units” such as text, images, tables, and equations, preserving their context. It then constructs two knowledge graphs—one for non-text elements described by a vision-language model, and another for textual entities and relationships—merging them to enable more accurate and context-aware retrieval.

RAG-Anything’s approach addresses a key limitation of text-only pipelines, which often flatten tables and figures into plain text, losing critical structural information like row and column relationships. By maintaining these structures and linking related content, RAG-Anything can pinpoint precise answers within tables or equations. For example, when asked about Novo Nordisk’s wages and salaries in 2020, it correctly identified the exact figure from the appropriate table cell, outperforming other models that selected incorrect rows or columns.

Performance benchmarks on DocBench, a dataset of 229 long documents from various domains, show RAG-Anything leading with an overall accuracy of 63.4%, surpassing competitors like MM Graph Rag and Light Rag. Its advantage is especially pronounced on multimodal questions and lengthy documents over 100 pages, where graph-based retrieval excels at connecting dispersed information. Ablation studies confirm that the knowledge graphs are the primary factor driving performance gains, more so than the re-ranking component.

The video also demonstrates a hands-on test of RAG-Anything on its own research paper, verifying its ability to accurately answer questions about tables, figures, and equations. It successfully handled trick questions designed to confuse it, correctly identifying when information was absent or misattributed. However, it struggled with extracting fine details from charts, opting to admit insufficient information rather than guess. The indexing process was noted to be slow and somewhat costly, taking about 40 minutes and multiple model calls for an 18-page paper.

In conclusion, RAG-Anything is a powerful tool for querying documents where critical data resides in non-text formats, such as tables and equations. While it requires careful setup—like using a compatible version of its parsing tool MinerU—and patience due to its processing time, it offers significant accuracy improvements for complex, multimodal documents. The video encourages users to try it on their own PDFs and share any errors encountered, highlighting its potential and current limitations in real-world applications.

Useful Links