June 04, 2026
Iterative retrieval-reasoning agents have recently shown promise for multimodal long-document question answering. However, most existing systems maintain a single growing context that mixes retrieval traces, observations, and intermediate reasoning. As interactions accumulate, key evidence becomes scattered and diluted, making multi-hop reasoning noisy. We propose MARDoc, a Memory-Aware Refinement Agent framework that decouples long-document QA into three specialized agents: an Explorer for multi-granularity multimodal retrieval, a Refiner for distilling interaction traces into structured evidence and reasoning memories, and a Reflector for checking evidence sufficiency and providing targeted feedback. Across iterations, the agents rely on a dynamically updated structured memory rather than a full accumulated interaction history. This design reduces context noise while preserving answer-critical facts and their logical dependencies. Experiments on MMLongBench-Doc and DocBench show that MARDoc achieves strong results, outperforming same-backbone baselines and demonstrating the effectiveness of structured memory for agentic document QA.
Question answering over multimodal long documents is critical for many real-world applications, such as financial report analysis, scientific literature understanding, and enterprise document search. However, this task remains challenging for two reasons. First, information in real documents is jointly expressed through text, layout, tables, figures, and other visual elements, requiring models to align and reason across modalities. Second, supporting evidence is often sparsely distributed across many pages, making it difficult to locate, associate, and synthesize evidence over long contexts.
Existing research has mainly progressed along three lines. Early OCR-based document understanding models encode textual, layout, and visual signals in an end-to-end manner [1]–[3]. However, these methods are difficult to scale to very long documents due to context and input-length constraints. Retrieval-augmented methods retrieve relevant pages or document chunks before feeding them into multimodal large language models (MLLMs) for answer generation [4], [5]. While retrieval reduces the input length, evidence scattered across pages and modalities remains hard to associate, limiting multi-hop reasoning. More recently, agentic methods have introduced planning, tool invocation, and iterative retrieval into document RAG [6]–[8]. These methods improve the flexibility of long-document exploration, but we argue that two important limitations remain.
First, existing methods follow a “monolithic context stream” paradigm [9], [10]: at each turn, the agent appends new retrieval results and intermediate reasoning to a single ever-growing context. As turns accumulate, irrelevant interaction history dilutes the context and compresses the model’s effective reasoning space, yet no mechanism exists to distill key evidence into a compact, reusable representation.
Second, existing agentic methods often lack memory-grounded quality control over the reasoning process [10], [11]. As a result, it remains difficult to identify whether an error comes from missing evidence, misinterpreted visual content, or flawed cross-page reasoning. Errors introduced in early turns may therefore persist across iterations and compound hallucinations in multi-hop reasoning chains.
To address both issues, we propose MARDoc (Memory-Aware Refinement Agent for Document QA), which replaces the monolithic context stream with an Explore–Refine–Reflect loop driven by a dynamically updated structured memory. In each iteration, the Explorer retrieves multi-granularity evidence from the document; the Refiner distills the interaction traces into a structured memory that retains answer-critical facts and their logical dependencies; and the Reflector examines this memory to determine whether the current evidence suffices and whether targeted feedback should guide the next round of exploration. Across iterations, MARDoc carries forward the structured memory as the persistent state, while raw exploration traces are used only as transient inputs for memory refinement. This memory-mediated interface prevents the full interaction history from being repeatedly propagated, keeping the reasoning state compact while preserving key evidence and reasoning dependencies.
To evaluate our approach, we conduct comprehensive experiments on two challenging long-context multimodal document benchmarks: MMLongBench-Doc and DocBench, comparing against a wide range of baselines. Experimental results show that, even without task-specific training, our method achieves performance comparable to state-of-the-art models. Our main contributions are summarized as follows:
We propose MARDoc, which replaces the monolithic context stream with a dynamically updated structured memory. By decoupling information retrieval from evidence digestion, MARDoc keeps the reasoning context compact across iterations, fundamentally alleviating the context dilution problem in existing iterative retrieval-reasoning methods.
We introduce two complementary mechanisms: a distillation process that compacts interaction traces into structured evidence and reasoning memories, and an iterative reflective assessment that verifies evidence sufficiency and generates targeted feedback for subsequent exploration.
We conduct experiments on two challenging multimodal long-document benchmarks. Under the same backbone, MARDoc consistently outperforms existing baselines and achieves performance competitive with methods employing closed-source models, validating the effectiveness of structured memory for agentic document QA.
Multimodal Document QA. Document QA has evolved from single-modal short-text tasks to complex long-document reasoning [12], [13], where evidence is often scattered across pages and modalities. Early methods relied on OCR pipelines to fuse text and visual features for MLLMs [14]. As MLLMs improved, some works bypassed the OCR stage and processed document images directly [15]–[17]. However, these end-to-end approaches were strictly limited by context window sizes. To overcome this constraint, RAG-based methods retrieve only relevant multimodal chunks [5], [18], but they often ignored document structure and struggled with multi-step reasoning. More recently, a line of works has integrated agent technology into the RAG system [7], [19]. These works utilize the knowledge integration and tool invocation capabilities of agents to enhance the accuracy of the model’s responses [6], [11]. DocAgent [9] constructs the documents into a structured document tree and equips the agent with various tools to achieve efficient retrieval of relevant evidence. DocDancer [20] further uses synthetic data to improve the agent’s tool-use proficiency. However, due to the accumulation paradigm of the context, most methods are unable to effectively stimulate the multi-hop reasoning ability of the model in the long multimodal DocQA task.
Agent Memory. Memory mechanisms have become essential for enabling LLM-based agents to perform efficient long-range reasoning. Recent studies show that structured memory improves both reasoning performance and stability over extended interactions by mitigating information loss [21], [22]. For example, Agentic Reasoning [23] and A-Mem [24] model tool-calling trajectories as structured reasoning memory, while ReasoningBank [25] extracts transferable tool-usage patterns from historical calls to improve tool-use accuracy and efficiency. These methods are designed for general-purpose agents and focus on compressing generic interaction history or accumulating cross-task experience. Inspired by these works, we introduce a structured memory tailored for document QA that iteratively distills answer-critical facts and their reasoning chains from interaction traces, directly addressing information fragmentation, weak logical connections, and context explosion in iterative document reasoning.
Given a user query \(Q\) and a document \(D=\{p_{1},p_{2},...,p_{n}\}\), where each \(p_{i}\) denotes an individual page represented as an RGB image, the goal of document QA is to generate an accurate answer \(A\) based on the evidence in the document \(D\). As shown in Figure 1, the overall reasoning process of MARDoc follows an “Explore-Refine-Reflect” workflow. The three agents interact iteratively to progressively gather and refine the relevant evidence for the question. MARDoc consists of four key components: (1) the outline construction module: generating a structured representation of the multimodal long document, providing the agent with rough information about the document; (2) the Explorer agent: using the outline and tools to retrieve multi-granularity relevant information and generate preliminary answers; (3) the Refiner agent: distilling structured evidence and reasoning memories from the interaction traces of the Explorer; (4) the Reflector agent: iteratively judging whether the current reasoning memories is correct and providing heuristic information to facilitate the Explorer to retrieve information better. In the following sections, we will discuss each component in detail.
Prior XML-based document representations [9] organize parsed elements into hierarchical trees but may lose fine-grained layout and visual information. To ensure comprehensive coverage, we employ MinerU2.5 [26] for precise document parsing, which produces fine-grained semantic nodes preserving layout structure. We further utilize Qwen3-VL-235B-A22B-Instruct [27] to generate concise descriptions for visual elements, enriching the outline with retrievable visual content information. The outline serves as the unified index for all downstream retrieval tools.
The Explorer iteratively retrieves evidence relevant to the user query from a structured document outline using customized tools. We adopt ReAct [28] as the agent framework. At each step, the agent generates a reasoning thought \(\tau\) and an action \(a\), forming a reasoning chain \(\mathcal{T}\): \[\mathcal{T}=(\tau_0,a_0,\varepsilon_0,\dots,\tau_i,a_i,\varepsilon_i,\dots,\tau_n,a_n),\] where \(a_{n}\) denotes the terminal action in which the Explorer determines that sufficient information has been gathered and produces a candidate answer, \(\varepsilon_i\) denotes the tool response at step \(i\). At iteration \(t\), the Explorer receives the query \(Q\), the structured outline \(\mathcal{O}\), the current memory \(M_{t-1}\) from the Refiner, and the reflective instruction \(R_{t-1}\) from the Reflector. The Explorer then integrates this information to conduct further retrieval, formulated as: \[\mathcal{T}_t=\mathcal{M}_{Exp}(Q,\mathcal{O},M_{t-1},R_{t-1})\] Here, \(\mathcal{M}(\cdot)\) denotes the response generated by the large language model given a prompt. \(\mathcal{T}_t\) represents the reasoning chain produced by the Explorer after the \(t\)-th iteration.
To equip the Explorer with precise retrieval capabilities, we design a multi-granularity toolset that encompasses both textual and visual modalities. Detailed descriptions of the tools are provided in Appendix 6.
The Refiner is designed to simulate the reasoning mechanism of human experts when tackling complex problems. When solving multi‑step reasoning tasks, humans do not memorize every detail of a document; instead, they form a clear mental thread that records key information, core evidence, and the logical relationships among them. The Refiner explicitly models this cognitive process and distills context through explicit compacting, thereby replacing the traditional paradigm of monolithic context. At the end of each exploring iteration, the Refiner compacts the historical interaction traces and performs reasoning. In this process, the Refiner does not retain all interaction details; rather, it generates two structured memory components from the historical information. At iteration \(t\), the Refiner takes three inputs: (1) the user query \(Q\), (2) the previous memory \(M_{t-1}\), and (3) the current reasoning chain \(\mathcal{T}_{t}\) from the Explorer. By iteratively updating the memory, the Refiner efficiently integrates fragmented information, thereby enhancing the model’s reasoning capability: \[M_{E},M_{R} =\mathcal{M}_{Ref}(Q,\mathcal{T}_{t}, M_{t-1})\] The structured memory \(M_{t}\) output by the Refiner consists of two distinct components: \(M_{t}=(M_{E},M_{R})\). Here, \(M_{E}\) denotes the Evidence Memory, and \(M_{R}\) denotes the Reasoning Memory. These compacted Evidence Memory and Reasoning Memory replace the original monolithic context, enabling subsequent agents to review historical information in a compact manner while avoiding getting stuck in incorrect exploration paths.
Evidence Memory. This component serves as a high‑level log of the task, recording the most central and query‑relevant factual information distilled from the Explorer’s interaction traces. Each entry captures a key statement relevant to the question, accompanied by its source, while redundant information is removed. Multimodal information such as images and tables is uniformly condensed into simple evidence nodes, preventing the Reflector from being distracted by noise present in the raw context.
Reasoning Memory. This component extracts a clear reasoning path from the raw context and integrates it with the evidence nodes to form an evidence chain. Each node in the evidence chain is annotated with the evidence nodes on which it depends. This design decouples evidence from reasoning, allowing the Reflector to effectively trace whether an error originates from incorrect evidence nodes or flawed reasoning logic.
Once the current iteration is completed, the updated memory overwrites the old one; through this mechanism, the agent avoids continuous context accumulation and effectively filters out query‑irrelevant noise, so that the new context contains only the key information relevant to \(Q\).
The Reflector examines the compacted structure memory after each iteration and provides feedback to guide subsequent exploration. It is deployed immediately after the Refiner filters out irrelevant information, enabling timely identification of omissions or errors in the collected evidence. Given the current query \(Q\) and the compacted memory \(M_t\), the Reflector evaluates whether the gathered evidence is sufficient to produce a correct answer. If so, it outputs the final answer \(A\): \[A=\mathcal{M}_{Ref}(M_{t},Q)\] Otherwise, if more information is needed or the current memory \(M_t\) contains errors, it generates specific feedback to guide the Explorer toward more effective retrieval and prevent it from repeating past mistakes: \[R_t=\mathcal{M}_{Ref}(M_{t},Q)\] The instruction set \(R_t\) summarizes key reasoning cues,such as “the total number of something is missing”, “the user is asking about chatgpt4o not bert”. These instructions can providing heuristic information to facilitate the Explorer to retrieve information better.
| Method | Model | MMLongBench-Doc | DocBench | |
| ACC | F1 | LasJ | ||
| DocSeeker [16] | Qwen-2.5-VL-7B-Instruct | 40.1 | 38.4 | – |
| Docopilot [17] | InternVL2-8B | 28.8 | 23.0 | – |
| GPT-4o | 42.8 | 44.9 | 63.1 | |
| Qwen3-VL-30B-A3B-Instruct | 45.9 | 45.6 | 63.2 | |
| Qwen3-VL-8B-Instruct | 41.9 | 42.2 | 64.6 | |
| SV-RAG [29] | GPT-4o | 23.0 | 24.2 | – |
| VisRAG [5] | GPT-4o | 29.0 | 27.8 | – |
| BOOKRAG [30] | Qwen2.5-VL-30B | 43.8 | 44.9 | – |
| MoLoRAG [31] | Qwen2.5-VL-7B | 41.0 | – | – |
| M3DocRAG [18] | Qwen2-VL-7B | 31.4 | 36.5 | – |
| RAGAnything [4] | GPT-4o-mini | 42.8 | – | 63.4 |
| Doc-React [20] | GPT-4o | 38.1 | 38.3 | – |
| MDocAgent [6] | GPT-4o | 42.0 | – | – |
| COA [32] | Gemini 2.0 Flash | 37.2 | 31.9 | – |
| SLEUTH [33] | Qwen3-VL-8B-Instruct | 52.8 | – | – |
| MiMo-VL-7B | 47.4 | – | – | |
| Qwen2.5-VL-7B | 43.7 | – | – | |
| GPT-4o | 51.8 | 49.1 | 79.9 | |
| Claude 3.5 Sonnet | 57.3 | 54.1 | – | |
| Qwen3-VL-30B-A3B-Instruct | 48.3 | 45.8 | 73.2 | |
| Qwen3-VL-8B-Instruct | 46.6 | 42.6 | 67.1 | |
| GPT-4o | 52.3 | 50.8 | 73.5 | |
| Qwen3-VL-30B-A3B-Thinking(ft) | 54.4 | 53.9 | 81.2 | |
| Qwen3-VL-30B-A3B-Thinking | 39.2 | 36.4 | 74.1 | |
| Qwen3-VL-30B-A3B-Instruct | 57.1 | 54.6 | 82.1 | |
| Qwen3-VL-8B-Instruct | 52.7 | 50.3 | 72.3 | |
| Human Baseline | – | 65.8 | 66.0 | 81.2 |
We evaluate our framework with two backbone models: Qwen3-VL-30B-A3B-Instruct2 [27] and Qwen3-VL-8B-Instruct3 [27]. The initial Refiner memory \(M_{0}\) and the initial Reflector instruction \(R_{0}\) are empty string. Detailed implementation settings are provided in Appendix 6.
Benchmarks and Metrics. We conduct experiments on two multimodal long-document QA benchmarks: MMLongBench-Doc [34] and DocBench [35]. MMLongBench-Doc consists of 135 documents with an average length of 47.5 pages, covering seven domains with diverse layouts and multimodal content. It includes 1,082 questions derived from different sources and various locations, of which 34% require cross-page reasoning. DocBench includes 229 real documents and 1,102 questions, spanning across five different domains and four major types of questions.
For both benchmarks, we adopt their official evaluation protocols. For MMLongBench-Doc, we use GPT-4o to extract final answers and employ a rule-based method to compute Accuracy and F1 scores [34]. For DocBench, we use the officially provided prompts to guide GPT-4o as the evaluator [35].
Baselines. We compare our method against three categories of baselines:
(1) MLLM-based Methods: These approaches feed all document pages images into MLLM and predict an answer directly, including Vanilla VLM based method, DocSeeker [16] and Docopilot [17].
(2) RAG-based Methods: We compare against existing RAG frameworks for document QA, including SV-RAG [29], VisRAG [5], BOOKRAG [30], MoLORAG [31], M3DocRAG [18], and RAGAnything [4].
(3) Agent-based Methods: We compare with existing agent frameworks for document QA, including Doc-React [20], MDocAgent [6], MACT [36], Chain-of-Agent [32], SLEUTH [33], DocAgent [9], and DocDancer [10].
Detailed descriptions of all baselines are provided in Appendix 7.
Table 1 reports the results on two multimodal long-document QA benchmarks. Based on the results, we make several important observations.
Agent-based methods consistently outperform both the MLLM-based baselines and the RAG-based baselines. MLLM-based methods answer long documents directly, while RAG-based methods incorporate retrieval modules. Both are unreliable in determining whether a question is answerable and struggle to integrate cross-page information logically. In contrast, agent-based methods overcome these shortcomings through multi-step planning, tool use, and explicit reasoning paths, leading to higher multi-hop accuracy.
However although existing agent-based methods have iterative advantage, most methods still suffer from the monolithic context paradigm. As interaction traces grow longer, key evidence becomes diluted by irrelevant observations. MARDoc breaks the monolithic context paradigm through an iterative “Explore-Refine-Reflect” cycle. It achieves an overall accuracy of 57.1% with Qwen3-30B, matching DocAgent with Claude 3.5 Sonnet while using a much smaller backbone model. These findings indicate that MARDoc successfully eliminates both misleading noise caused by extended historical contexts, suggesting that the proposed approach based on compacted structured evidence and reasoning memories enhances performance for DocQA.
We study the performance of models categorized by the number of pages that contain evidence which can be used to answer the question. The results are presented in Figure 2. As the number of evidence pages grows, both MARDoc and DocAgent suffer from performance degradation. However, MARDoc exhibits a notably smaller decline, suggesting that our structured memory enables the model to more accurately integrate information from diverse sources and maintain stronger multi-hop reasoning capability as evidence becomes scattered.
To evaluate the contribution of each component, we conduct ablation studies by progressively removing the Refiner and the Reflector. For a fair comparison, when both components are removed, we adopt a majority voting strategy that selects the most frequent answer across three inference runs as the final result. Table 2 shows the performance comparison across different document types.
The full MARDoc achieves a substantial lead across all document domains, validating the effectiveness of the joint design of the Refiner and Reflector. Notably, retaining only the Reflector without the Refiner leads to drastic performance degradation, even falling below the variant where both components are removed. This suggests that without the structured memory compacted by the Refiner, the Reflector cannot effectively identify errors within the noisy, linearly accumulated context. In this case, excessive noise disrupts the reflection process itself, severely impairing overall performance.
| Method | Document Domain | ACC | F1 | ||||||
| Aca. | Bro. | Fin. | Gui. | Ind. | Rep. | Tut. | |||
| MARDoc | 54.9 | 49.3 | 68.8 | 52.2 | 66.1 | 57.4 | 55.5 | 57.1 | 54.6 |
| Refiner | 42.3 | 44.2 | 40.0 | 45.2 | 58.0 | 46.6 | 49.5 | 45.9 | 42.9 |
| Refiner & Reflector | 46.7 | 46.3 | 57.5 | 51.6 | 54.3 | 50.5 | 47.2 | 50.2 | 47.7 |
We conducted three ablation experiments to isolate the contribution of each memory component. In ablation (1), the Refiner outputs only the Evidence Memory \(M_{E}\); in (2), only the Reasoning Memory \(M_{R}\); and in (3), it outputs a plain-text compressed summary of the interaction history, which serves as a baseline for unstructured memory. The results are reported in Table 3.
The findings reveal complementary roles of the two memory components. Removing \(M_{R}\) primarily degrades performance on multi-hop questions, indicating that \(M_{R}\) maintains reasoning coherence when evidence must be synthesized across multiple pages. Removing \(M_{E}\) substantially harms unanswerable question performance, suggesting that \(M_{E}\) serves as a factual grounding mechanism that helps the Reflector distinguish insufficient evidence from contradictory premises, thereby reducing hallucinations. The plain-text compression baseline performs worst across all metrics, confirming that unstructured summarization retains noise and obscures logical structure. Together, \(M_{E}\) ensures factual fidelity via verifiable source evidence, while \(M_{R}\) ensures logical coherence by encoding reasoning dependencies; their combination mitigates hallucination and enables multi-hop reasoning.
| Method | Evidence Page | ACC | F1 | ||
| SIN | MUL | UNA | |||
| MARDoc | 61.6 | 43.8 | 69.1 | 57.1 | 54.6 |
| \(M_{R}\) | 59.1 | 40.6 | 69.3 | 55.0 | 52.0 |
| \(M_{E}\) | 59.4 | 42.2 | 64.7 | 54.9 | 52.3 |
| \(M_{E}\) & \(M_{R}\) | 57.9 | 39.4 | 66.4 | 53.7 | 51.8 |
To understand the effectiveness of the Reflector, we examine model performance under different maximum iteration counts \(K\), as shown in Figure 3. We report results on three question types: single-hop, multi-hop, and unanswerable. From \(K=1\) to \(K=3\), the model achieves consistent improvements on both single-hop and multi-hop questions. However, when \(K\) increases to 4, performance slightly declines. We attribute this to that further exploration rounds introduce redundant information that dilutes the previously structured memory, slightly degrading reasoning precision. Additionally, the F1 score gradually rises with more iterations, indicating that the Reflector partially mitigates hallucination issues.
We further analyze the impact of the instruction \(R_{t}\) on performance. Table 4 presents accuracy categorized by the number of evidence pages. In the ablation setting, the Reflector only evaluates the correctness of the reasoning memories without providing corrective instruction to the Explorer. Without the instruction, performance declines on both single-hop and multi-hop questions, while improving on the unanswerable type. We attribute this to the model’s increased tendency to predict questions as unanswerable when explicit guidance is absent.
| Method | Evidence Page | ACC | F1 | ||
| SIN | MUL | UNA | |||
| MARDoc | 61.6 | 43.8 | 69.1 | 57.1 | 54.6 |
| instruct | 56.7 | 40.8 | 69.5 | 53.9 | 50.8 |
| \(\downarrow\)4.9 | \(\downarrow\)3.0 | \(\uparrow\)0.4 | \(\downarrow\)3.2 | \(\downarrow\)3.8 | |
To validate the effectiveness of our outline construction and tool design, we conduct an ablation study comparing the document processing pipelines and toolsets of MARDoc and DocAgent. For document parsing, DocAgent extracts PDF content using DocXChain [37] and PyMuPDF, while MARDoc employs MinerU2.5 [26] to construct outlines with finer-grained semantic nodes. For tool design, DocAgent provides five tools. We first adapted these tools to our new outline structure and then added two tools: get_paragraph and search_meta, to support multi-granularity retrieval.
As shown in Figure 4, we evaluate performance by evidence source. Replacing DocAgent’s outline with our outline and tools improves its performance across most evidence sources, with gains of 2.3% for Pure Text, 1.6% for Layout, and 1.6% for Table. Although Chart and Figure performance decreases slightly by 1.4%, overall accuracy improves by 2.0%. Conversely, when MARDoc uses DocAgent’s outline, performance drops substantially, particularly in Layout and Figure. We attribute this to DocAgent’s coarser document representation, which cannot effectively capture fine-grained layout and visual information. These results demonstrate that finer-grained document representations are essential for effective retrieval in agent-based document QA.
To evaluate practical efficiency and resource overhead, we conduct a cost analysis on 200 randomly sampled instances from MMLongBench-Doc using Qwen3-30B as the backbone model. Results are presented in Table 5. Compared to DocAgent, MARDoc requires an additional 22.5k tokens and 15.9 seconds of latency per sample on average, while raising accuracy from 47.1% to 54.9%, a gain of 7.8% points. This represents a favorable trade-off: the modest extra computation yields a substantial leap in accuracy on complex multi-page document understanding, consistent with the recent paradigm of test-time scaling and long chain-of-thought reasoning, where controlled additional investment in inference is rewarded with notably more reliable answers.
| Method | Avg.token(k) | Avg.times(s) | ACC |
|---|---|---|---|
| DocAgent | 100.3 | 49.4 | 47.1 |
| MARDoc | 122.8 | 65.3 | 55.9 |
We propose MARDoc, a multi-agent framework for multimodal long-document question answering. MARDoc decouples retrieval, evidence curation, and reflection into three specialized agents that communicate through a dynamically updated structured memory. The Refiner distills salient information from long interaction traces into an organized evidence structure, while the Reflector provides immediate instruction to mitigate noise accumulation during iterative retrieval. Experiments on MMLongBench-Doc and DocBench demonstrate that MARDoc achieves strong and competitive performance, validating the effectiveness of memory-aware multi-agent collaboration for multimodal long-document QA.
Although MARDoc demonstrates promising results on multimodal long-document QA, several limitations warrant discussion. First, our agents are constructed entirely through prompt engineering without task-specific fine-tuning. Incorporating training-based optimization may further improve performance. Second, our evaluation is limited to the Qwen3-VL model family. Validating the generalizability of our framework across diverse model architectures remains an open direction. Third, the iterative Explore-Refine-Reflect loop involves multiple rounds of tool invocation and LLM inference, which increases system latency compared to single-pass methods. Exploring strategies such as early stopping could help mitigate this overhead.
This section provides a detailed introduction to the tools offered to Explorer. We designe tools with different granularities and modalities to assist Explorer in effectively conducting document searches. The descriptions of these tools are shown in Table 6.
| Tool name | Parameter | Description |
|---|---|---|
| search | keyword | Find and extract all paragraphs and sections where the exact keyword appears |
| get_section | section_id | Get the full text content of a section in XML format |
| get_paragraph | paragraph_id | get the content of a specific paragraph by its ID |
| get_page_images | start_page_idx, end_page_idx | Extract full-page images from a specified range of PDF pages |
| get_image | image_id | Get the visual content of an image |
| get_table_image | table_id | Get the screenshot of a table |
| search_metadata | element_types, keyword | Search for elements (text, titles, captions, images, tables) by keyword across all pages using PDF element metadata |
The prompts utilized for our three agent are presented in Figure 5, Figure 6 and Figure 7.
We deploy all backbone models using the vLLM inference framework to enable efficient large-scale multi-turn agent reasoning. We employ a temperature of 0.7, a top\(_{p}\) value of 0.8. All experiments are conducted on four NVIDIA A800 GPUs (80GB). We set the maximum context length to 128K tokens for all methods unless otherwise specified.
For the MARDoc framework, the maximum number of reflection iterations is set to \(K=3\), and the maximum number of tool calls within each exploration stage is limited to 10 to prevent excessively long reasoning trajectories. All experiments are conducted in a training-free setting without any task-specific fine-tuning.
We compare our method against a comprehensive set of baselines categorized into three groups:
MLLM-based Baselines: We compare MARDoc against two types of MLLM baselines for long-context document VQA.
Vanilla VLM. This approach evaluates the vanilla long-context understanding capabilities of VLMs. We convert PDF pages into images at 144 DPI and directly feed them into the models without relying on external OCR parsing or retrieval modules. Following the setup of MMLongBench-Doc, we report the performance of GPT-4o [38], Qwen3-VL-30B-A3B and Qwen3-VL-8B [27].
Processed VLM. This approach also feeds all document pages as images, but applies additional processing on the VLM side. DocSeeker [16] mitigates multi-page document VQA performance degradation from low SNR and sparse supervision using an ALR reasoning paradigm, two-stage training, and evidence-guided resolution allocation. Docopilot [17] builds Doc750K, a multi-page dataset featuring cross-page dependencies and structured proxy tasks, and employs SFT to natively equip MLLMs for long-context document processing.
RAG-based Baselines. We compare MARDoc against diverse DocQA frameworks that employ various retrieval strategies, which can be broadly categorized into two paradigms:
Visual Retrieval. SV-RAG [29] utilizes the hidden embeddings of LLMs for question-based retrieval, enhanced by LoRA adapters. VisRAG [5] leverages visual embeddings of document images to retrieve relevant pages, maximizing the retention and utilization of raw visual information. M3DocRAG [18] employs ColPali for vision-based page retrieval and utilizes Qwen2-VL to conduct question answering.
Structure aware Retrieval. MoLoRAG [31] constructs a page relation graph to perform VLM-driven image retrieval based on both semantic and logical relevance. RAGAnything [4] constructs a cross-modal knowledge graph with non-textual units as nodes and a textual knowledge graph via entity and relation extraction, integrating graph structures with vector semantic matching for hybrid retrieval. BOOKRAG [30] extracts a hierarchical tree from documents to serve as a table of contents, and builds a knowledge graph to capture complex inter-entity relations. By mapping entities to tree nodes, it designs an intelligent agent to execute customized textual retrieval processes.
Agent-based Baselines. We compare MARDoc against agent frameworks specifically designed for DocQA, which can be categorized into multi-agent collaboration and iterative retrieval paradigms.
Multi-Agent Collaboration. MDocAgent [6] employs a multi-agent architecture that separately processes different modalities to answer queries and integrates the results into a final answer. MACT [36] decomposes the task into four specialized agents, incorporating a hybrid reward mechanism and a two-stage training strategy. Chain-of-Agent [32]is an agent-based framework in which multiple worker agents handle text segments one after another, and a manager agent then combines their outputs to produce the final response.SLEUTH [33] retrieves top‑K pages, extracts clues, filters irrelevant pages, and adaptively reasons over a distilled multimodal context to answer long‑document questions.
Iterative Retrieval. Doc-React [20] utilizes an agent with iterative retrieval decisions to balance information gain and uncertainty reduction. DocAgent [9] leverages a structured document tree outline and builds interactive multimodal retrieval tools, introducing a reviewer agent for cross-checking answers and maintaining a task-agnostic memory bank. DocDancer [10] designs lightweight dual tools based on the ReAct framework and utilizes a data synthesis pipeline to generate high-quality training data, resulting in an end-to-end trained open-source document agent.
3.5pt
| Model | MMLongBench-Doc | DocBench | |
| ACC | F1 | LasJ | |
| Qwen3-VL-30B-A3B | 57.1 | 54.6 | 82.1 |
| Qwen3-VL-32B | 59.9 | 57.5 | 83.2 |
To investigate the scalability of MARDoc with more capable backbone models, we additionally evaluate our framework using Qwen3-VL-32B-Instruct as backbone. As shown in Table 7, MARDoc achieves an accuracy of 59.9% on MMLongBench-Doc, further improving over the Qwen3-VL-30B-A3B-Instruct result reported in the main experiments. These results surpasses DocAgent with Claude 3.5 Sonnet, demonstrating that our structured memory mechanism can effectively leverage the enhanced reasoning capabilities of stronger models.
This section illustrates the collaborative problem-solving process of the three agents of MARDoc through a concrete example. In the first iteration, misled by noise, the Explorer yields an incorrect answer due to insufficient information retrieval. Subsequently, the Refiner extracts highly relevant evidence from the linearly stacked context to construct an evidence-grounded reasoning chain. Based on this, the Reflector analyzes the current state to identify the missing information required to answer the question. In the second iteration, leveraging the feedback from both the Refiner and Reflector, the Explorer successfully retrieves the missing information and derives the correct answer. Finally, the Refiner and Reflector jointly verify the correctness of this answer before outputting the final result.
Question
Among all valid respondents, how many rep/lean rep independents (the exact number, not the ratio) favor building a strong relationship with China on trade? Please give your answer to the nearest hundred, such as 100, 200 or 300.…
Answer
300
Navigator
step 1
<analysis>
The user is asking for ... To solve this, I need to:
1. Identify the section that discusses trade relationships with China, specifically focusing on Rep/Lean Rep independents.
2. Find the relevant data, which is likely in a table or chart showing opinions on trade with China.
...
</analysis>
<tool_call>
{"name":"search",arguments": "{"keyword": "trade"}"}
</tool_call>
<tool_response>
We found 13 results that contain the keyword trade, listed below:
<Item type="Paragraph" section_id="12" page_idx="9">
... including the loss of U.S. jobs to China (by 24 percentage points) and the U.S. trade deficit with China (19 points) ...
</Item>
...
<Section section_id="47" page_idx="27">
...
<Image image_id="25" page_idx="27" page_nums="26" description="presents survey findings on whether the U.S. public prefers to "get tougher" or "build a strong relationship" with China on economic and trade issues"/>
<Paragraph page_idx="28" paragraph_id="210">... more say they were ultimately bad for the U.S. (44% ) than good (30% ) ...</Paragraph>
</Section>
</Item>
</tool_response>
step 2
<analysis>
The search results indicate that the relevant information about Rep/Lean Rep independents favoring building a strong relationship with China on trade is likely in Section 47. ... The chart in Image 25 on page 27 is likely to contain the detailed data
needed to answer the question ...
</analysis>
<tool_call>
{"name":"get_section",arguments": "{"section_id": "47"}"}
</tool_call>
<tool_response>
Here is the full text content of Section 47:
<Section section_id="47" start_page_idx="27" end_page_idx="28">
...
<Paragraph page_idx="28" paragraph_id="210">...When asked about the effects of increased tariffs on goods from foreign countries, including from China, more say they were ultimately bad for the U.S. (44% ) than good (30% ) , while about a quarter of
Americans think the tariff’s had no discernable effect on the U.S. ...</Paragraph>
</Section>
</tool_response>
step 3
<analysis>
The full content of Section 47 confirms that the relevant data is in the chart (Image 25) on page 27. ...
</analysis>
<tool_call>
{"name":"get_page_images",arguments": "{"start_page_idx": "47","end_page_idx": "47"}"}
</tool_call>
<tool_response>
Here are the page images for page 27 to page 27:
</tool_response>
step 4
<analysis>
The image of page 27 contains the chart and the relevant data. ... For Rep/Lean Rep, the percentage who favor building a strong relationship with China on trade is 26%. To find the exact number of Rep/Lean Rep
independents who favor building a strong relationship with China on trade, I need to know the total number of valid respondents. The document states that the survey included 2,596 U.S. adults. Now, I will calculate the
number of Rep/Lean Rep independents who favor building a strong relationship with China on trade by multiplying the total number of respondents by the percentage (26%).Number of Rep/Lean Rep independents = 2,596 * 0.26 = 674.96.Rounding to the nearest
hundred, the number is 700. I will now provide the final answer.
<final_result>700</final_result>
</analysis>
Refiner
Compact Evidence:
- The chart on page 27 shows the percentage of different political groups who believe it is more important to get tougher with China on economic issues versus building a strong relationship. (Source: Image on page 27)
- For Rep/Lean Rep, the percentage who favor building a strong relationship with China on trade is 26%. (Source: Image on page 27)
- The survey included 2,596 U.S. adults. (Source: Text on page 9)
...
Logical Reasoning steps:
Step 1: Based on the chart on page 27, the percentage of Rep/Lean Rep independents who favor building a strong relationship with China on trade is 26%.
Step 2: Based on the text on page 9, the total number of valid respondents in the survey is 2,596.
Step 3: To find the exact number of Rep/Lean Rep independents who favor building a strong relationship with China on trade, multiply the total number of respondents by the percentage (26%).
Step 4: Calculate 2,596 * 0.26 = 674.96.
Step 5: Round 674.96 to the nearest hundred, which is 700.
Reflector
We already knows that for Rep/Lean Rep, the percentage who favor building a strong relationship with China on trade is 26%. However,2,596 is the total number of valid respondents. The total number of Rep/Lean Rep individuals surveyed is missing.
Navigator
step 1
<analysis>
The question asks for... The key information provided indicates that:
. The survey included 2,596 U.S. adults.
. Image_id=25 shows that 26% of Rep/Lean Rep individuals favor building a strong relationship with China on trade.
. The total percentage for Rep/Lean Rep individuals in the chart is 98% (72% + 26%), suggesting the percentages are based on the total number of Rep/Lean Rep individuals.
. The information does not provide the total number of Rep/Lean Rep individuals surveyed.
To answer the question, I need to find the total number of Rep/Lean Rep individuals surveyed. This information is likely in the section discussing the survey methodology or the breakdown of respondents by political affiliation. I will start by searching
for relevant keywords to locate this information.
</analysis>
<tool_call>
{"name":"search",arguments": "{"keyword": "Rep/Lean Rep"}"}
</tool_call>
<tool_response>
We found 4 results that contain the keyword Rep/Lean Rep, listed below:
<Search_Result>
...
<Item type="Table" section_id="66" page_idx="39" table_id="5">
Group Unweighted sample size Weighted % Plus or minus ...
</Item>
</Search_Result>
</tool_response>
step 2
<analysis>
The search results show that the total number of Rep/Lean Rep individuals surveyed is 1,106. This information is found in the table in section_id="66" on page 39. ...
</analysis>
<tool_call>
{"name":"get_table_image",arguments": "{"table_id": "5"}"}
</tool_call>
<tool_response>
Here is the image content for table_id 5:
</tool_response>
step 3
<analysis>
The chart in image_id="25" shows that 26% of Rep/Lean Rep individuals favor building a strong relationship with China on trade. The table in section_id="66" confirms that the total number of Rep/Lean Rep individuals surveyed is 1,106. Now I can calculate
26% of 1,106 to find the exact number of individuals who favor building a strong relationship with China on trade. 26% of 1,106 is 287.56, which rounds to 300 when rounded to the nearest hundred.
<final_result>
300
</final_result>
</analysis>
Refiner
Compact Evidence:
- The chart in image_id="25" shows that 26% of Rep/Lean Rep individuals favor building a strong relationship with China on trade. (Source: Image 25)
- The table in section_id="66" shows that the unweighted sample size for Rep/Lean Rep individuals is 1,106. (Section 66)
...
Logical Reasoning steps:
Step 1: The chart in image_id="25" shows that 26% of Rep/Lean Rep individuals favor building a strong relationship with China on trade
Step 2: The table in section_id="66" shows that the unweighted sample size for Rep/Lean Rep individuals is 1,106
Step 3: The percentages in the chart are based on the total number of Rep/Lean Rep individuals, so the 26% figure applies to the 1,106 individuals
Step 4: To find the exact number, calculate 26% of 1,106, which equals 287.56
Step 5: Rounding 287.56 to the nearest hundred gives 300
Reflector
Based on the information in the memory, I will directly arrive at the final answer to the question.
<final_result>
300
</final_result>
None
Figure 5: Prompt for Explorer..
None
Figure 6: Prompt for Refiner..
None
Figure 7: Prompt for Reflector..