MDocAgent: A Multi-Modal Multi-Agent Framework for Document Understanding

Siwei Han, Peng Xia, Ruiyi Zhang, Tong Sun, Yun Li, Hongtu Zhu, Huaxiu YaoarXiv 2025

Abstract

Document Question Answering (DocQA) is a very common task. Existing methods using Large Language Models (LLMs) or Large Vision Language Models (LVLMs) and Retrieval Augmented Generation (RAG) often prioritize information from a single modal, failing to effectively integrate textual and visual cues. These approaches struggle with complex multi-modal reasoning, limiting their performance on real-world documents. We present MDocAgent (A Multi-Modal Multi-Agent Framework for Document Understanding), a novel RAG and multi-agent framework that leverages both text and image. Our system employs five specialized agents: a general agent, a critical agent, a text agent, an image agent and a summarizing agent. These agents engage in multi-modal context retrieval, combining their individual insights to achieve a more comprehensive understanding of the document's content. This collaborative approach enables the system to synthesize information from both textual and visual components, leading to improved accuracy in question answering. Preliminary experiments on five benchmarks like MMLongBench, LongDocURL demonstrate the effectiveness of our MDocAgent, achieve an average improvement of 12.1% compared to current state-of-the-art method. This work contributes to the development of more robust and comprehensive DocQA systems capable of handling the complexities of real-world documents containing rich textual and visual information. Our data and code are available at https://github.com/aiming-lab/MDocAgent.

Introduction

Document Question Answering (DocQA) remains a significant challenge for artificial intelligence. Real-world documents are inherently multi-modal, containing a mix of text, tables, charts, and diagrams. Often, the information required to answer a query is distributed across these modalities—for example, a data point in a chart might only be explained in a distant paragraph.

Current solutions typically fall into two categories: Large Vision Language Models (LVLMs) and Retrieval-Augmented Generation (RAG) systems. LVLMs often struggle with long documents due to context window constraints and a lack of granular attention to small visual details. Conversely, standard RAG systems usually focus on a single modality, retrieving either text or images but rarely integrating both effectively. This "modality gap" prevents models from performing the complex cross-modal reasoning necessary for high-fidelity document understanding.

The MDocAgent Framework

To address these limitations, we propose MDocAgent, a multi-agent framework that treats document understanding as a collaborative process. The architecture is structured into five distinct stages, utilizing specialized agents to process textual and visual information in parallel.

The five-stage workflow of MDocAgent, illustrating the roles of the General, Critical, Text, Image, and Summarizing agents.

The workflow proceeds as follows:

  1. Pre-processing: Documents are parsed into text via OCR and high-resolution images to maintain layout integrity.
  2. Multi-modal Retrieval: Parallel pipelines use ColBERT for text retrieval and ColPali for vision-based page retrieval.
  3. Initial Analysis & Key Extraction: A General Agent provides an initial answer, which is then scrutinized by a Critical Agent. The Critical Agent identifies specific "critical clues" needed from both modalities to refine the response.
  4. Specialized Processing: A Text Agent and an Image Agent focus on their respective domains, guided by the Critical Agent's clues to filter out irrelevant noise.
  5. Answer Synthesis: A Summarizing Agent aggregates the outputs, resolves contradictions, and produces the final verified answer.

Experimental Results

MDocAgent was evaluated across five diverse benchmarks: MMLongBench, LongDocURL, PaperTab, PaperText, and FetaTab. These datasets test a range of skills from long-document reasoning to complex table comprehension.

The framework achieved a state-of-the-art average improvement of 12.1% over the previous leading method, M3DocRAG. Notably, on the PaperText dataset, MDocAgent outperformed the nearest competitor by 16.7%. Qualitative analysis demonstrates that MDocAgent's multi-agent collaboration allows it to succeed where single-modal or less structured RAG systems fail.

A case study comparing MDocAgent with other systems, showing its superior ability to correctly identify both specific details and the final conclusion.

As shown in the case study, MDocAgent correctly identifies the population of foreign-born Latinos versus those interviewed by cellphone by synthesizing specific counts from both text and visual sampling frames. Competing models often miss these granular details or fail to reach the correct logical conclusion.

Discussion and Conclusion

A key insight from our study is the importance of the Critical Agent. Ablation tests confirm that explicitly identifying necessary clues before specialized processing significantly reduces distraction from irrelevant document content. Furthermore, the framework benefits from modality synergy, allowing text-optimized models (like Llama-3.1) and vision-optimized models (like Qwen2-VL) to excel in their respective strengths.

While MDocAgent represents a significant step forward, future work will focus on enhancing inter-agent communication through iterative debate and integrating external knowledge bases to help handle queries beyond the scope of the provided document. Despite the increased computational overhead of a multi-agent system, the gains in accuracy and robustness make MDocAgent a powerful tool for complex document understanding.

Summary updated

BibTeX
@misc{han2025mdocagent,
  author = {Siwei Han and Peng Xia and Ruiyi Zhang and Tong Sun and Yun Li and Hongtu Zhu and Huaxiu Yao},
  title = {{MDocAgent: A Multi-Modal Multi-Agent Framework for Document Understanding}},
  year = {2025},
  eprint = {2503.13964},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2503.13964},
}
Figure