                                                MLDocRAG: Multimodal Long-Context Document Retrieval
                                                               Augmented Generation
                                                                            Yongyue Zhang                                                                         Yaxiong Wu
                                                                       Independent Researcher                                                               Independent Researcher
                                                                             Singapore                                                                            Singapore
                                                                       yongyue002@gmail.com                                                                  wuyashon@gmail.com

                                         Abstract                                                                                        information across heterogeneous modalities; and (2) cross-page
                                         Understanding multimodal long-context documents that comprise                                   reasoning, which demands integrating evidence scattered across
                                         multimodal chunks such as paragraphs, figures, and tables is chal-                              multiple pages to support coherent inference. Addressing these
                                         lenging due to (1) cross-modal heterogeneity to localize relevant                               challenges necessitates the ability of multimodal long-context asso-
arXiv:2602.10271v3 [cs.IR] 13 Feb 2026




                                         information across modalities, (2) cross-page reasoning to aggre-                               ciation—accurately identifying, connecting, and integrating seman-
                                         gate dispersed evidence across pages. To address these challenges,                              tically relevant information across modalities and segments.
                                         we are motivated to adopt a query-centric formulation that projects                                Large Vision-Language Models (LVLMs) have shown strong
                                         cross-modal and cross-page information into a unified query repre-                              cross-modal understanding capabilities of effectively aligning and
                                         sentation space, with queries acting as abstract semantic surrogates                            interpreting multimodal information within localized short con-
                                         for heterogeneous multimodal content. In this paper, we propose a                               texts [9, 19, 46]. Representative examples include GPT-4o [20], Gem-
                                         Multimodal Long-Context Document Retrieval Augmented Gener-                                     ini [35], Qwen2.5-VL [3], and InternVL [6], which demonstrate im-
                                         ation (MLDocRAG) framework that leverages a Multimodal Chunk-                                   pressive performance on short-range multimodal reasoning bench-
                                         Query Graph (MCQG) to organize multimodal document content                                      marks [23, 43]. However, they often struggle to maintain consistent
                                         around semantically rich, answerable queries. MCQG is constructed                               semantic modeling within limited context windows when applied
                                         via a multimodal document expansion process that generates fine-                                to long-document scenarios [24]. In particular, their performance
                                         grained queries from heterogeneous document chunks and links                                    deteriorates when evidence is sparsely distributed across pages and
                                         them to their corresponding content across modalities and pages.                                modalities by overlooking the relevant information, leading to the
                                         This graph-based structure enables selective, query-centric retrieval                           so-called “needle in a haystack” problem [41, 42].
                                         and structured evidence aggregation, thereby enhancing ground-                                     Retrieval-Augmented Generation (RAG) has emerged as a promis-
                                         ing and coherence in multimodal long-context question answering.                                ing paradigm for overcoming the limited context windows of large
                                         Experiments on datasets MMLongBench-Doc and LongDocURL                                          models, such as Large Language Models (LLMs) and Large Vision-
                                         demonstrate that MLDocRAG consistently improves retrieval qual-                                 Language Models (LVLMs), by incorporating external retrieval [1,
                                         ity and answer accuracy, demonstrating its effectiveness for multi-                             26, 50]. In multimodal document scenarios, existing RAG approaches
                                         modal long-context understanding.                                                               typically follow five strategies (as shown in Figure 1): (a) 𝑅𝐴𝐺 𝐷𝑒𝑛𝑠𝑒
                                                                                                                                                                                                             𝑡𝑥𝑡 :

                                                                                                                                         converting multimodal content into plain text via Optical Char-
                                         ACM Reference Format:                                                                           acter Recognition (OCR) [32] and applying textual chunk-based
                                         Yongyue Zhang and Yaxiong Wu. 2018. MLDocRAG: Multimodal Long-
                                                                                                                                         RAG with LLMs [48] and dense retrievers (e.g., BGE-m3 [5]); (b)
                                         Context Document Retrieval Augmented Generation. In Proceedings of Make                               𝑡𝑥𝑡 +𝑖2𝑡 : generating image descriptions (e.g., Image2Text (i2t) [18])
                                         sure to enter the correct conference title from your rights confirmation email
                                                                                                                                         𝑅𝐴𝐺 𝐷𝑒𝑛𝑠𝑒
                                         (Conference acronym ’XX). ACM, New York, NY, USA, 15 pages. https://doi.                        and fusing them with OCR text using document content extrac-
                                         org/XXXXXXX.XXXXXXX                                                                             tion toolkits (e.g., MinerU [40]) for textual chunk-based RAG; (c)
                                                                                                                                                  𝑡𝑥𝑡 +𝑖𝑚𝑔
                                                                                                                                         𝑀𝑅𝐴𝐺𝐶𝐿𝐼 𝑃 : encoding text and images into a shared embedding
                                         1     Introduction                                                                              space via multimodal encoders (e.g., CLIP [29], SigLIP [37, 47])
                                                                                                                                                                                                            𝑝𝑎𝑔𝑒
                                                                                                                                         for retrieval followed by LVLM-based generation; (d) 𝑉 𝑅𝐴𝐺𝐶𝑜𝑙𝑃𝑎𝑙𝑖 :
                                            Multimodal long-context documents, such as research papers, re-                              rendering document pages as images and retrieving relevant page-
                                         ports, and books, often span tens to hundreds of pages and contain                              level content using vision-based methods (e.g., ColPali [14]) prior to
                                                                                                                                         LVLM decoding; and (e) 𝐺𝑟𝑎𝑝ℎ𝑅𝐴𝐺 𝐷𝑒𝑛𝑠𝑒   𝑡𝑥𝑡 +𝑖2𝑡 : constructing knowledge
                                         diverse multimodal components/chunks including text, images, and
                                         tables [7, 21, 28, 33, 38]. Understanding such lengthy multimodal                               graphs (KGs) from document content and applying Graph-based
                                         documents presents two central challenges [7]: (1) cross-modal                                  RAG [11, 13]. However, these approaches often struggle to capture
                                         heterogeneity, which requires identifying and localizing relevant                               fine-grained cross-modal and cross-page associations, leading to
                                                                                                                                         incomplete grounding and suboptimal retrieval.
                                         Permission to make digital or hard copies of all or part of this work for personal or              Document expansion methods such as Doc2Query [27] provide
                                         classroom use is granted without fee provided that copies are not made or distributed           a principled way to map document content into a unified query
                                         for profit or commercial advantage and that copies bear this notice and the full citation       representation space, enhancing retrieval by generating synthetic
                                         on the first page. Copyrights for components of this work owned by others than the
                                         author(s) must be honored. Abstracting with credit is permitted. To copy otherwise, or          queries that capture a document’s latent information needs. Build-
                                         republish, to post on servers or to redistribute to lists, requires prior specific permission   ing upon this idea, QCG-RAG [44] constructs a query-centric graph
                                         and/or a fee. Request permissions from permissions@acm.org.
                                         Conference acronym ’XX, Woodstock, NY
                                                                                                                                         that explicitly links generated queries to their corresponding textual
                                         © 2018 Copyright held by the owner/author(s). Publication rights licensed to ACM.               document chunks, enabling query-aware indexing and multi-hop
                                         ACM ISBN 978-1-4503-XXXX-X/2018/06                                                              retrieval over long textual contexts, thereby improving evidence
                                         https://doi.org/XXXXXXX.XXXXXXX
Conference acronym ’XX, June 03–05, 2018, Woodstock, NY                                                         Yongyue Zhang and Yaxiong Wu




 Figure 1: Illustration of RAG for multimodal long-context documents, comparing (a)–(e) baselines with (f) our MLDocRAG.
aggregation and grounding in long-document question answering.         Large Vision-Language Models (LVLMs) like GPT-4o [20], Qwen2.5-
However, these approaches remain largely unexplored in the set-        VL [3], and Gemini [35], their fixed context windows limit their ef-
ting of multimodal long-context documents, where information is        fectiveness in capturing globally relevant evidence dispersed across
distributed across heterogeneous modalities and pages.                 pages and modalities. This limitation leads to degraded performance
    Building on this idea, we extend query-centric formulation to      in complex reasoning tasks, where key information is sparsely
the multimodal setting and propose MLDocRAG (Multimodal Long-          located, as highlighted in benchmarks such as MMLongBench-
Context Document Retrieval-Augmented Generation), a framework          Doc [25] and LongDocURL [8]. Retrieval-Augmented Generation
for multimodal long-context document understanding. MLDocRAG           (RAG) offers partial relief by introducing external memory, yet
leverages a unified retrieval structure—the Multimodal Chunk-          struggles with retrieving semantically aligned multimodal content
Query Graph (MCQG)—constructed via MDoc2Query, which ex-               at scale. Retrieval-Augmented Generation (RAG) partly mitigates
tends Doc2Query [27] to multimodal scenarios and generates se-         this by introducing external memory, but struggles to retrieve and
mantically rich, answerable queries from heterogeneous chunks          integrate semantically aligned multimodal information at scale.
spanning text, images, and tables. The resulting MCQG links each       These challenges call for new retrieval and representation strate-
query to its corresponding multimodal content, enabling selective      gies tailored to multimodal long-document understanding.
retrieval and structured evidence aggregation across modalities           Multimodal RAG. Recent efforts in multimodal Retrieval Aug-
and pages. This design effectively addresses cross-modal and cross-    mented Generation (RAG) have explored various strategies to adapt
page associations, improving retrieval accuracy and grounding in       long-document understanding to the multimodal setting. Common
multimodal long-document question answering (QA). Figure 1(f)          approaches include OCR-based text extraction, image captioning
illustrates the overall pipeline of our proposed MLDocRAG frame-       fused with text chunks, shared embedding retrieval via multimodal
work. Our main contributions are as follows:                           encoders (e.g., CLIP [29], SigLIP [37, 47]), and vision-based page
• We propose MLDocRAG (Multimodal Long- Context Docu-                  retrieval using rendered document images (e.g., ColPali [14]). Some
ment Retrieval-Augmented Generation), a unified framework              integrate structured knowledge via document-derived graphs to
for multimodal long-document QA that integrates multimodal doc-        enhance reasoning [1, 26, 49, 50]. However, existing pipelines oper-
ument expansion with query-centric, graph-based retrieval for fine-    ate at coarse granularity, overlooking fine-grained cross-modal and
grained and interpretable evidence selection.                          cross-page associations, leading to incomplete grounding and re-
• We introduce the MCQG (Multimodal Chunk-Query Graph),                trieval mismatches. This motivates developing semantically aligned
which links generated queries to corresponding multimodal chunks       and structurally informed retrieval for multimodal contexts.
and connects semantically related information across pages.               Document Expansion. Document expansion has been widely
• To construct MCQG, we leverage MDoc2Query, a multimodal              adopted in RAG settings to improve retrieval coverage by gen-
document expansion process that generates answerable queries           erating synthetic contents that anticipate potential information
from multimodal chunks.                                                needs [12, 31, 34, 39]. Methods such as Doc2Query [27] and its
• Extensive experiments on MMLongBench-Doc [25] and Long-              enhanced variant Doc2Query-- [15] generate diverse, semantically
DocURL [8] show that MLDocRAG consistently improves QA accu-           meaningful queries from document content, effectively enriching
racy, advancing multimodal long-context document understanding.        the retrieval index. Building on this idea, QCG-RAG [44] intro-
                                                                       duces a query-centric graph structure that connects queries to their
2    Related Work                                                      source textual chunks, enabling multi-hop retrieval and structured
   Long-Context Document Understanding. Understanding multi-           evidence aggregation in long-document scenarios. Yet, these meth-
modal long-context documents, such as research papers or techni-       ods remain unimodal, lacking explicit modeling of cross-modal
cal reports, requires resolving both cross-modal heterogeneity and     relationships. Extending query-centric expansion to multimodal
long-range cross-page reasoning—capabilities still limited in cur-     documents remains an open problem for capturing fine-grained,
rent models [8, 25]. Despite the strong local alignment abilities of   heterogeneous associations.
MLDocRAG: Multimodal Long-Context Document Retrieval Augmented Generation                              Conference acronym ’XX, June 03–05, 2018, Woodstock, NY


3     Methodology                                                               linked to their source chunks and further connected to semanti-
                                                                                cally similar queries across the document, forming the Multimodal
3.1     Preliminaries                                                           Chunk-Query Graph (MCQG). This graph captures both intra-modal
                                                                                and inter-modal associations, and provides a structured retrieval
We consider the task of multimodal long-context document question
                                                                                index that aligns semantically meaningful questions with relevant
answering, where the goal is to answer a user natural language
                                                                                multimodal evidence.
question 𝑞𝑢 based on a multimodal long-context document 𝐷 that
spans multiple pages and contains heterogeneous content. Each                      MCQG Usage. At inference time, a user query is embedded and
document 𝐷 originates from a PDF file and is processed into a                   matched against nodes in the MCQG using KNN-based retrieval
sequence of pages 𝐷 = {𝑃 1, 𝑃2, . . . , 𝑃𝑋 } via OCR. Each page 𝑃𝑥              in the query embedding space. By retrieving semantically similar
consists of a set of modality-specific chunks 𝐶𝑖 = {𝑐 1, 𝑐 2, . . . , 𝑐 𝑁 },    generated queries and aggregating their linked source chunks, the
where each chunk 𝑐 is associated with a modality (text (𝑡𝑥𝑡) or                 system collects a compact yet relevant set of multimodal content.
image (𝑖𝑚𝑔)) and a content type (e.g., paragraph, figure, table, or             The retrieved chunks are further ranked based on their semantic
equation).                                                                      similarity to the user query and provided as context to a Large Lan-
     Text chunks are contiguous paragraphs or extracted titles; image           guage or Vision-Language Model (LLM/LVLM) for final answer gen-
chunks consist of a visual region paired with an associated caption;            eration. This query-centric retrieval strategy enables interpretable,
table chunks include a caption, a rendered table image, and an OCR-             structured evidence aggregation over multimodal long contexts.
converted Markdown-style textual representation [40]. The QA task
follows a retrieval-augmented generation (RAG) paradigm: given a                3.3    MCQG Construction
query 𝑞, a retriever selects the top-𝐾 relevant multimodal chunks               The MCQG Construction stage aims to transform a multimodal
{𝑐 1′ , . . . , 𝑐 𝐾′ } from 𝐷, and a LVLM conditions on these chunks to         long-context document into a query-centric retrieval structure that
generate the final answer 𝑎.       ˆ The primary challenge lies in retrieving   supports fine-grained, semantically aligned, and cross-modal ev-
semantically aligned and cross-modally grounded chunks from the                 idence retrieval. Specifically, we convert the long document into
long, heterogeneous document to support accurate and coherent                   a collection of multimodal chunks, generate answerable queries
generation.                                                                     from each chunk, and construct a graph that encodes chunk-query
                                                                                and inter-query associations. This process comprises four steps: (1)
3.2     Framework Overview                                                      Document Parsing, (2) MDoc2Query, (3) Graph Assembly, and (4)
To tackle the challenges of cross-modal heterogeneity and long-                 Vector & Graph Storage.
range reasoning in multimodal long-document QA, we propose a                       (1) Document Parsing. We adopt an existing multimodal PDF
Multimodal Long-Context Document Retrieval Augmented Genera-                    parsing tool, such as MinerU [40], to extract structured information
tion (MLDocRAG) framework based on the construction and usage                   from the document. Given a PDF document 𝐷 = {𝑃 1, 𝑃2, . . . , 𝑃𝑋 } of
of a Multimodal Chunk-Query Graph (MCQG) that organizes mul-                    𝑋 pages, we extract a layout-preserving sequence of heterogeneous
timodal document content around semantically rich, answerable                   document components, including: (i) paragraphs (text only); (ii) fig-
queries. To construct MCQG, we move beyond conventional chunk-                  ures (images with captions); (iii) tables (table images accompanied
based retrieval paradigms that treat multimodal content as flat and             by textual captions and OCR-converted Markdown text); and (iv)
independent units, and instead hypothesize that organizing mul-                 equations (parsed into Markdown text). The extracted content is
timodal long-context document understanding around generated,                   stored in a JSON format ordered by visual layout position. Based on
answerable queries enables more fine-grained, semantically aligned,             this structured output, we define a set of modality-specific chunks:
and interpretable retrieval. Inspired by prior work on document
expansion via query generation (e.g., Doc2Query [27]), we extend                             C = {𝑐 1, 𝑐 2, . . . , 𝑐 𝑁 },   𝑐𝑖 ∈ {text, image}.           (1)
this idea to the multimodal setting by proposing MDoc2Query—a                   Paragraph text is segmented into overlapping spans using a sliding
multimodal document expansion framework that generates seman-                   window with a maximum token length and a fixed stride. Equa-
tically rich queries from heterogeneous document chunks. These                  tions are treated as part of the regular text content. In contrast,
generated queries act as retrieval anchors that bridge the gap be-              each figure or table is treated as an image-modality chunk, while
tween user information needs and multimodal document content.                   preserving its associated caption and any structured OCR-derived
Figure 2 illustrates the overall architecture of our proposed ML-               textual content. Visual noise filtering can be further applied to
DocRAG framework which consists of two main stages: MCQG                        remove uninformative images (e.g., blank pages, string-only im-
Construction and MCQG Usage.                                                    ages, or logos; see Appendix B) via visual chunk classification using
                                                                                zero-shot CLIP inference.
   MCQG Construction. In this stage, a multimodal long document
parsed from a PDF is decomposed into modality-specific chunks,                     (2) MDoc2Query. To bridge document content with potential
where text-modality chunks correspond to paragraph text (includ-                information needs, we extend the Doc2Query paradigm to mul-
ing equations), and image-modality chunks correspond to figures                 timodal settings. For each chunk 𝑐𝑖 ∈ C, we employ a Large
or tables, each associated with its caption and any OCR-derived                 Vision-Language Model (LVLM) to generate a set of answerable
structured textual content. We then apply the MDoc2Query pro-                   query–answer pairs:
cess to generate a set of answerable queries for each chunk using a                         n                                             o
Large Vision-Language Model (LVLM). These queries are explicitly                       Q𝑖 = (𝑞𝑖(1) , 𝑎𝑖(1) ), . . . , (𝑞𝑖(𝑀𝑖 ) , 𝑎𝑖(𝑀𝑖 ) ) , 𝑀𝑖 ≤ 𝑀max . (2)
Conference acronym ’XX, June 03–05, 2018, Woodstock, NY                                                                Yongyue Zhang and Yaxiong Wu




Figure 2: Overview of our proposed MLDocRAG framework, consisting of (a) MCQG Construction for building a multimodal
chuck-query graph and (b) MCQG Usage for retrieving relevant multimodal chunks in long-document QA.
Here, 𝑞𝑖( 𝑗 ) denotes a generated query and 𝑎𝑖( 𝑗 ) its corresponding          (4) Storage. To support scalable and efficient retrieval, we decou-
answer, both grounded in chunk 𝑐𝑖 . The number of pairs per chunk           ple vector retrieval from graph traversal by storing: (1) Query–Answer
is adaptively determined by the richness of its content, up to a            vectors {v𝑖( 𝑗 ) } in a dense vector database (e.g., FAISS [10], Elastic-
global cap 𝑀max per chunk. Each query–answer pair (𝑞𝑖( 𝑗 ) , 𝑎𝑖( 𝑗 ) ) is   Search [22]), supporting fast approximate nearest neighbor (ANN)
embedded into a dense vector representation using a pretrained              search [2]. (2) The full MCQG graph structure in a graph data-
text encoder 𝜙 (·) (e.g., BGE-m3 [5]):                                      base (e.g., Neo4j [17]), preserving chunk–query and query–query
                                                                          relationships.
                      v𝑖( 𝑗 ) = 𝜙 [𝑞𝑖( 𝑗 ) ; 𝑎𝑖( 𝑗 ) ] ∈ R𝑑 ,         (3)      Importantly, we do not perform vectorization of multimodal
where [𝑞; 𝑎] denotes concatenation of the query and answer as the           chunks (e.g., figure or table content) directly. Instead, all retrieval
retrieval unit. We simplify notation in the remainder of the paper          operates in the query–answer space, thereby avoiding the need for
by referring to 𝑞𝑖( 𝑗 ) as a shorthand for the full query–answer pair.      complex multimodal embedding alignment and reducing storage
                                                                            and computation overhead. The generated queries serve as inter-
  (3) Graph Assembly. We build the Multimodal Chunk-Query                   pretable, semantically rich anchors that effectively summarize and
Graph (MCQG) as a heterogeneous graph G = (V, E) with nodes:                index the multimodal document content.
                                                    𝑁
                                                    Ø
                   V = C ∪ Q,        where Q =             Q𝑖 .       (4)
                                                     𝑖=1
                                                                            3.4    MCQG Usage
Nodes in V include Chunk Nodes C and Query Nodes Q. Edges                   The MCQG Usage stage aims to retrieve semantically relevant mul-
                                                                            timodal content in response to a user query by leveraging the struc-
in E include: (1) Chunk–Query (C-Q) Edges: Each query 𝑞𝑖( 𝑗 ) is
                                                                            ture of the Multimodal Chunk-Query Graph (MCQG). Rather than
connected to its originating chunk 𝑐𝑖 via a directed anchor edge.
                                                                            retrieving from raw document chunks, our MLDocRAG approach
(2) Query–Query (Q-Q) Edges: We compute semantic similarity
                                                                            retrieves and aggregates content via generated queries that serve as
between queries using inner product of embeddings and connect
                                                                            semantically aligned retrieval anchors. This process involves four
each query to its top-𝑘 nearest neighbors (KNN):
                                                                            main steps: (1) Query Node Retrieval, (2) Chunk Node Ranking, (3)
               sim(𝑞, 𝑞 ′ ) = ⟨𝜙 ([𝑞; 𝑎]), 𝜙 ([𝑞 ′ ; 𝑎 ′ ])⟩ + 𝜖.     (5)   Context Collection, and (4) Answer Generation.
Here, 𝑞 and 𝑞 ′ denote two generated queries. ⟨·, ·⟩ denotes the inner
product. All query embeddings are ℓ2 -normalized prior to similarity            (1) Query Node Retrieval. Given a user query 𝑞𝑢 , we first compute
computation. The constant offset 𝜖 (e.g., 𝜖 = 1.0) is added to ensure       its vector embedding 𝜙 (𝑞𝑢 ) using the same query encoder used dur-
non-negative similarity scores for stable KNN construction. This            ing MCQG construction. We perform approximate nearest neighbor
dual-edge structure allows the graph to capture both local chunk            (ANN) search over the query–answer vectors in the vector database
associations and global semantic neighborhoods across queries,              to retrieve the top-𝑛 semantically similar generated queries:
enabling multi-hop traversal and cross-modal reasoning during
retrieval.                                                                                 Qret = Top𝑛 {𝑞 ∈ Q | sim(𝑞𝑢 , 𝑞) ≥ 𝛼 } .             (6)
MLDocRAG: Multimodal Long-Context Document Retrieval Augmented Generation                       Conference acronym ’XX, June 03–05, 2018, Woodstock, NY


In practice, the number of retrieved queries is jointly constrained by         Non-Parametric Optimization. By default, MDoc2Query in ML-
the maximum node budget 𝑛 and a similarity threshold 𝛼 ∈ [0, 2]             DocRAG employs a LVLM to generate a set of answerable queries
(e.g., 𝛼 = 1.0), such that only queries with sim(𝑞𝑢 , 𝑞) ≥ 𝛼 are            from parsed document chunks, such as cropped images or parsed ta-
retained. To capture broader contextual evidence, we expand each            ble segments. However, document parsing tools (e.g., MinerU [40])
retrieved query node 𝑞 ∈ Qret in the MCQG via multi-hop neighbor            often strip away essential contextual information—including figure
expansion. For each query 𝑞 ∈ Qret , we traverse ℎ hops in the graph        captions, table headers, and hierarchical section titles—resulting
(through Query–Query Edges) and collect its neighboring queries:            in isolated chunks that can be semantically ambiguous and con-
                                    Ø                                       sequently degrade the quality of the generated queries. To miti-
                    Qexp = Qret ∪       Nbrℎ (𝑞),                   (7)
                                                                            gate this issue, we adopt a Page-Context-Aware Generation strategy.
                                    𝑞 ∈ Qret
                                                                            Specifically, for a given chunk 𝑐𝑖 located on page 𝑥 with the cor-
                                                                                                                  page
where Nbrℎ (𝑞) denotes the set of ℎ-hop neighbors of 𝑞 in the MCQG,         responding page rendering image 𝑃𝑥 , we construct the LVLM
                                                                                                    page
and Qexp represents the expanded query set that augments the ini-           input as a tuple (𝑐𝑖 , 𝑃𝑥 ). Incorporating page-level visual context
tially retrieved queries with semantically related queries discovered       enables the model to resolve ambiguities arising from incomplete
through multi-hop graph traversal.                                          local information, such as coreference resolution (e.g., linking a
                                                                            chunk labeled “Table 3” to its corresponding description on the
  (2) Chunk Node Ranking. Each query 𝑞 ∈ Qexp is linked to a
                                                                            same page).
source multimodal chunk 𝑐 ∈ C. We collect all chunks associated
with the expanded query set:                                                   Parametric Optimization. In addition to non-parametric strate-
                                                                            gies, we further explore parametric optimization by fine-tuning a
                   
            Ccand = 𝑐𝑖 | ∃ 𝑞 ∈ Qexp s.t. (𝑞, 𝑐𝑖 ) ∈ E .      (8)
                                                                            pretrained Large Vision–Language Model (LVLM) on a curated set
To prioritize the most relevant evidence, we assign a relevance             of high-quality multimodal chunk-to-query exemplars. Each train-
score to each candidate chunk 𝑐𝑖 ∈ Ccand based on the maximum               ing instance consists of a multimodal chunk 𝑐 (including text, an
semantic similarity between the user query 𝑞𝑢 and any query linked          image with its caption, or a table with structured content) paired
to 𝑐𝑖 :                                                                     with a set of human-curated or automatically synthesized answer-
                                               
                  score(𝑐𝑖 ) = max sim 𝑞𝑢 , 𝑞 .                 (9)         able query–answer (𝑞, 𝑎) pairs. The LVLM is trained using stan-
                                 𝑞 ∈ Qexp
                                (𝑞,𝑐𝑖 ) ∈ E                                 dard teacher forcing, where the model conditions on the input
Here, {𝑞 | (𝑞, 𝑐𝑖 ) ∈ E} denotes the subset of expanded queries in          chunk to generate the corresponding answer and subsequently au-
Qexp that are connected to chunk 𝑐𝑖 in the MCQG.                            toregressively decodes the associated queries. Through parametric
                                                                            adaptation, the model learns to produce more semantically pre-
   (3) Context Collection. Based on the relevance scores, we select         cise, context-aware, and structurally grounded queries, thereby
the top-𝐾 (e.g., 𝐾 = 5) ranked multimodal chunks:                           improving the expressiveness and reliability of MDoc2Query for
                      Crel = Top𝐾 {𝑐𝑖 ∈ Ccand } ,                   (10)    downstream MCQG construction.

where the ranking is determined by score(𝑐𝑖 ). The selected chunks          4     Experimental Setup
are concatenated to form the multimodal retrieval context for the            In this section, we evaluate the effectiveness of the proposed ML-
LVLM. These chunks may include text blocks, image regions with              DocRAG framework for multimodal long-context document ques-
captions, and tables augmented with structured and OCR-derived              tion answering (QA), and compare it with existing approaches (as
textual content.                                                            illustrated in Figure 1). Specifically, our experimental study is de-
   (4) Answer Generation. Finally, the selected multimodal context          signed to address the following research questions:
Crel is provided to a Large Vision–Language Model (LVLM), to-               • RQ1: How does MLDocRAG perform on multimodal long-context
gether with the original user query 𝑞𝑢 , to generate the final answer:      document QA compared with baseline methods?
                                                                            • RQ2: What are the effects on MLDocRAG of different MCQG
                         𝑎ˆ = LVLM(𝑞𝑢 , Crel ) .                    (11)    node variants, including query node choices (query vs. answer),
This generation step benefits from the query-centric retrieval strat-       chunk ranking strategies (max vs. mean), and visual noise filtering?
egy and graph-based evidence aggregation, which together improve            • RQ3: How do key hyperparameters of MCQG usage affect the per-
grounding, coverage, and factual consistency when answering com-            formance of MLDocRAG, such as expansion hops ℎ, KNN neighbors
plex questions over multimodal long-context documents.                      𝑘, and max nodes 𝑛?
                                                                            • RQ4: What is the impact of MDoc2Query optimization from both
3.5    MDoc2Query Optimization                                              non-parametric and parametric perspectives?
The effectiveness of MLDocRAG largely depends on the quality
of the Multimodal Chunk–Query Graph (MCQG), which is con-                   4.1    Datasets & Metrics
structed via MDoc2Query. In particular, the quality and granularity            Datasets. We evaluate our MLDocRAG on two multimodal long-
of the generated answerable queries produced by MDoc2Query are              context document QA benchmarks: (1) MMLongBench-Doc [25]:
critical, as they directly determine the semantic coverage, retriev-        A curated benchmark for multimodal long-document understand-
ability, and grounding fidelity of the overall pipeline. To this end,       ing, consisting of documents in PDF format with diverse content
we explore optimization strategies for MDoc2Query from both                 including text, images, tables, and charts. Questions are paired
non-parametric and parametric perspectives.                                 with answerable evidence spread across pages and modalities. (2)
Conference acronym ’XX, June 03–05, 2018, Woodstock, NY                                                                         Yongyue Zhang and Yaxiong Wu


LongDocURL [8]: A newly collected dataset containing web-based               as follows: (1) Text: Paragraphs are segmented using a maximum
scientific and technical documents. Each instance includes a docu-           length of 1200 tokens with an overlap of 100 tokens. Equations
ment (in PDF or HTML format), a natural language question, and               parsed as Markdown are treated as regular text. (2) Image: Figures
annotated answerable segments across multimodal content.                     and tables, together with their captions and OCR-derived content,
                                                                             are treated as individual image-modality chunks. In addition, doc-
   Metrics. We adopt exact match Accuracy as the primary evalua-             ument pages are rendered as images for page-level methods and
tion metric to measure the factual correctness of generated answers.         MDoc2Query optimization. We further apply visual noise filter-
To ensure consistent and scalable judgment across modalities and             ing to image chunks via zero-shot classification using CLIP1 , with
formats, we follow recent work and employ an LLM-as-a-Judge                  details in Appendix B.
protocol [16], using a strong LLM (e.g., Qwen2.5-72B [36, 45]) to
verify whether the predicted answer matches the gold reference                   Model Configuration. We employ the BGE-m3 encoder to gener-
answer. The evaluation prompt is shown in Appendix A.                        ate dense embeddings for queries, which are stored and indexed in
                                                                             ElasticSearch [22] as the core vector database to support efficient
4.2     Baselines                                                            similarity search. For query generation and final answer generation,
We compare MLDocRAG with representative baselines from five                  we use Qwen2.5-VL-32B2 [4] by default, while Qwen2.5-VL-7B3 [4]
categories:                                                                  is adopted for MDoc2Query optimization. For evaluation, we adopt
• Text Only (txt). Use only text chunks with or without basic                an LLM-as-a-Judge setup using Qwen2.5-72B4 [36, 45]. All LLM-
retrieval (BM25 [30] / BGE-m3 [5]): LC𝑡𝑥𝑡 with textual long-context          s/LVLMs are deployed via the SGLang [51] framework on NVIDIA
reasoning, RAG𝑡𝑥𝑡                                                            H20 GPUs to enable high-throughput inference.
                 BM25 with sparse retrieval, RAGBGE-m3 with dense
                                                       𝑡𝑥𝑡

retrieval.                                                                      Default Hyperparameters. For experiments on both MMLongBench-
• Image2Text (txt+i2t). Augment text with LVLM-generated image               Doc and LongDocURL, we adopt a unified set of default hyperpa-
captions, treated as plain text: LC𝑡𝑥𝑡 +𝑖2𝑡 , RAG𝑡𝑥𝑡   +𝑖2𝑡      𝑡𝑥𝑡 +𝑖2𝑡
                                                    BM25 , RAGBGE-m3 .       rameters. Specifically, we set the KNN neighborhood size to 𝑘 = 3
• Multimodal (txt+img). Encode both text and image chunks using              for query–query edge construction, retrieve up to 𝑛 = 10 query
multimodal embedding models for dense retrieval: LC𝑡𝑥𝑡 +𝑖𝑚𝑔 for              nodes with a similarity threshold 𝛼 = 1.2, and perform ℎ = 2-hop
                                                 𝑡𝑥𝑡 +𝑖𝑚𝑔
multimodal long-context reasoning, MRAGCLIP                with CLIP [29],   query expansion. For answer generation, the top-𝐾 = 5 ranked
        𝑡𝑥𝑡 +𝑖𝑚𝑔                               𝑡𝑥𝑡 +𝑖𝑚𝑔                      multimodal chunks are selected as the retrieval context.
MRAGSigLIP with SigLIP [37, 47], MRAGColPali with ColPali [14].
• Page-level (page). Render full document pages as images and
perform vision-only retrieval followed by VQA: LC𝑝𝑎𝑔𝑒 for visual             5     Experimental Results
                                 𝑝𝑎𝑔𝑒           𝑝𝑎𝑔𝑒          𝑝𝑎𝑔𝑒
long-context reasoning, VRAGCLIP , VRAGSigLIP , VRAGColPali .                In this section, we analyse the experimental results with respect
• Graph. Construct knowledge graphs from extracted multimodal                to the four research questions stated in Section 4 to gauge the
entities with the augmented text (i.e., txt+i2t) for graph-based re-         effectiveness of our proposed MLDocRAG.
                      +𝑖2𝑡
trieval: GraphRAG𝑡𝑥𝑡𝐵𝐺𝐸−𝑚3 extended with efficient and lightweight
MiniRAG [13].                                                                5.1     MLDocRAG vs. Baselines (RQ1)
   In addition, we evaluate several variants of the proposed ML-             Table 1 reports the performance of MLDocRAG and representative
DocRAG framework under different MCQG construction and usage                 baselines on MMLongBench-Doc and LongDocURL in terms of accu-
settings to analyze the effects of key components and hyperparam-            racy (%). Overall, MLDocRAG achieves the best overall performance
eters: (1) Node Variants. (i) MLDocRAG w/ Query to use queries               on both datasets, with an accuracy of 47.9% on MMLongBench-
only as nodes; (ii) MLDocRAG w/ Answer to use answers only as                Doc and 50.8% on LongDocURL, consistently outperforming all
nodes; (iii) MLDocRAG w/ Mean to apply mean semantic similarity              baseline methods. In particular, compared to text-only and image-
for chunk node ranking instead of the max operation; (iv) ML-                to-text baselines, MLDocRAG benefits from explicitly modeling
DocRAG w/o Filter to disable visual noise filtering during document          multimodal evidence without collapsing visual information into
parsing. (2) Hyperparameters. (i) Hops ℎ ∈ {0, 1, 2, 3} for multi-           flat textual descriptions, thereby preserving fine-grained visual
hop neighbor expansion; (ii) KNN 𝑘 ∈ {1, 2, 3, 4, 5} for query-query         semantics that are critical for layout-, chart-, and figure-centric
edges; (iii) Max Nodes 𝑛 ∈ {5, 10, 15, 20} for query node retrieval.         questions. In contrast to multimodal dense retrieval methods that
We additionally compare different query node retrieval backends              independently retrieve text and image chunks, MLDocRAG orga-
(BGE-m3 vs. BM25) and similarity thresholds 𝛼 ∈ {1.0, 1.2}. Note             nizes multimodal content around generated, answerable queries
that MLDocRAG performs chunk-only query generation by default,               and performs query-centric multi-hop expansion, enabling effective
whereas MLDocRAG𝑃 and MLDocRAG𝑃𝑃 additionally incorporate                    aggregation of semantically related evidence scattered across pages.
page context during query generation and final answer generation,            This advantage is particularly evident in multi-page settings, where
respectively.                                                                simple chunk-level retrieval or page-level visual reasoning fails
                                                                             to capture long-range dependencies. Moreover, in contrast to the
4.3     Setup Details                                                        text-only graph-based baseline, MLDocRAG explicitly models cross-
                                                                             modal associations through the Multimodal Chunk–Query Graph,
                                                                             1 https://huggingface.co/openai/clip-vit-base-patch32
   Document Parsing Setting. Multimodal long-context documents               2 https://huggingface.co/Qwen/Qwen2.5-VL-32B-Instruct
are parsed using MinerU [40], which extracts layout-ordered ele-             3 https://huggingface.co/Qwen/Qwen2.5-VL-7B-Instruct

ments from PDF into structured JSON files. Chunks are constructed            4 https://huggingface.co/Qwen/Qwen2.5-72B-Instruct
MLDocRAG: Multimodal Long-Context Document Retrieval Augmented Generation                                 Conference acronym ’XX, June 03–05, 2018, Woodstock, NY


                                                                MMLongBench-Doc                             LongDocURL
                                 Model    Modality    Evidence Source    Evidence Page Overall Evidence Source   Evidence Page Overall
        Method              Retriever GEN TXT IMG TXT LAY CHA TAB FIG SIN MUL UNA ACC TXT LAY FIG TAB SP MP CE ACC
        LC𝑡𝑥𝑡                  -      LLM    ✓     ✗   44.3 31.9 20.8   12.8 22.0 32.8 21.9 69.3   36.9    59.1 38.8 26.0 41.5 43.3 45.7 29.2     40.2
        RAG𝑡𝑥𝑡
            𝐵𝑀25             BM25     LLM    ✓     ✗   44.9 26.1 20.2   14.2 17.1 31.6 18.9 76.3   36.8    60.2 37.4 24.9 37.3 43.1 45.9 26.8     39.5
        RAG𝑡𝑥𝑡
            𝐵𝐺𝐸 −𝑚3         BGE-m3    LLM    ✓     ✗   40.0 31.1 20.2   10.6 18.4 29.2 19.4 77.2   36.0    59.8 34.7 19.3 31.5 41.4 44.6 21.0     36.8
        LC𝑡𝑥𝑡 +𝑖2𝑡             -      LLM    ✓     ✗   48.5 32.8 40.5 41.7 28.6 44.1 32.5 54.8     42.5    51.1 31.0 29.1 33.6 42.2 49.0 15.7     37.3
        RAG𝑡𝑥𝑡  +𝑖2𝑡         BM25     LLM    ✓     ✗   43.6 31.9 38.2 38.1 27.0 45.3 26.9 66.7     43.7    60.6 36.5 45.7 40.3 61.9 54.1 22.4     48.1
            𝐵𝑀25
        RAG𝑡𝑥𝑡  +𝑖2𝑡        BGE-m3    LLM    ✓     ✗   42.3 26.1 37.6 45.41 31.3 49.0 27.2 71.5    46.5    59.7 32.8 47.0 42.3 61.9 57.4 17.1     47.8
            𝐵𝐺𝐸 −𝑚3
        LC𝑡𝑥𝑡 +𝑖𝑚𝑔              -     LVLM   ✓    ✓    53.8 34.5 45.5 45.9 35.9 52.4 37.8 45.6     46.1    57.7 34.7 30.9 39.8 46.0 48.9 23.4     40.7
               𝑡𝑥𝑡 +𝑖𝑚𝑔
        MRAG𝐶𝐿𝐼 𝑃             CLIP    LVLM   ✓    ✓    39.0 27.7 27.0 13.8 21.4 34.0 19.2 70.2     36.7    51.7 32.4 22.6 30.7 35.6 44.0 21.0     34.5
               𝑡𝑥𝑡 +𝑖𝑚𝑔
        MRAG𝑆𝑖𝑔𝐿𝐼 𝑃          SigLIP   LVLM   ✓    ✓    23.9 15.1 16.9 15.1 18.1 21.9 14.7 82.0     32.2    23.2 22.7 5.9 14.1 8.0 21.2 17.9       15.5
              𝑡𝑥𝑡 +𝑖𝑚𝑔
        MRAG𝐶𝑜𝑙𝑃𝑎𝑙𝑖         ColPali LVLM     ✓    ✓    34.1 29.4 28.1   25.7 25.3 35.8 20.3 71.1   38.1    51.0 31.8 32.9 34.0 45.2 44.8 23.4     38.9
        LC𝑝𝑎𝑔𝑒                  -     LVLM   ✗    ✓    41.0 26.9 31.5   30.3 27.6 39.7 23.6 53.1   37.2    40.2 29.7 23.7 30.3 34.0 39.1 17.9     31.3
             𝑝𝑎𝑔𝑒
        VRAG𝐶𝐿𝐼 𝑃             CLIP    LVLM   ✗    ✓    28.9 27.7 24.7   22.5 28.3 34.8 16.7 75.4   37.3    33.8 26.2 20.1 26.1 24.1 34.2 18.9     26.2
             𝑝𝑎𝑔𝑒
        VRAG𝑆𝑖𝑔𝐿𝐼 𝑃          SigLIP   LVLM   ✗    ✓    16.1 13.5 13.5    9.2 9.5 15.4 9.2 77.2     26.3    21.2 25.3 17.0 19.1 17.4 17.7 25.8     19.9
             𝑝𝑎𝑔𝑒
        VRAG𝐶𝑜𝑙𝑃𝑎𝑙𝑖         ColPali LVLM     ✗    ✓    40.0 37.8 32.0   30.7 32.2 44.1 23.9 63.2   41.4    56.8 39.4 45.8 53.1 52.1 50.3 36.4     47.1
        GraphRAG𝑡𝑥𝑡 +𝑖2𝑡    BGE-m3    LLM    ✓     ✗   48.1 25.5 36.4 51.5 30.2 51.3 27.1 48.5     42.6    58.2 33.9 32.8 36.1 59.2 54.4 15.7     45.3
                  𝐵𝐺𝐸 −𝑚3
        MLDocRAG            BGE-m3 LVLM      ✓    ✓    47.2 37.8 42.7   41.3 31.9 52.6 26.4 71.5   47.9    65.1 39.4 48.3 41.1 66.9 56.3 23.4     50.8
Table 1: Performance comparison on MMLongBench-Doc and LongDocURL measured by Accuracy (%). For MMLongBench-Doc,
five formats are considered: text (TXT), layout (LAY), chart (CHA), table (TAB), and image (FIG), with scopes including single-
page (SIN), multi-page (MUL), and unanswerable (UNA). For LongDocURL, four formats are evaluated: text (TXT), layout (LAY),
table (TAB), and figures (FIG), with evidence spans categorized as single-page (SP), multi-page (MP), or cross-element (CE),
where CE denotes the integration of multiple modalities. Best results are shown in bold, and second-best results are underlined.




                                                                                          (a) Hops ℎ                 (b) KNN 𝑘              (c) Max Nodes 𝑛
       (a) MMLongBench-Doc                       (b) LongDocURL                   Figure 4: Ablation on hyperparameters (MMLongBench-Doc).
 Figure 3: Ablation on node variants across both datasets.

allowing structured evidence propagation and ranking. As a re-
sult, MLDocRAG delivers consistent gains across different evidence
sources and document scopes, demonstrating superior grounding
and robustness for multimodal long-context document question
answering.

5.2    Impact of Node Variants (RQ2)                                                      (a) Hops ℎ                 (b) KNN 𝑘              (c) Max Nodes 𝑛

Figure 3 analyzes the impact of different MCQG node variants on the                  Figure 5: Ablation on hyperparameters (LongDocURL).
performance of MLDocRAG. (1) Query Node Choices (Query vs.
Answer). Generated queries play a dominant role in performance.                   rather than by an average over all associated queries. (3) Visual
While MLDocRAG w/ Query remains relatively stable, MLDocRAG                       Noise Filtering. Visual noise filtering is crucial for effective re-
w/ Answer exhibits substantial performance degradation (dropping                  trieval. Removing this component (MLDocRAG w/o Filter) leads
below 39% on MMLongBench-Doc), indicating that answers alone                      to noticeable performance drops, confirming that filtering out ir-
are insufficient as graph node representations. The default ML-                   relevant image chunks (e.g., blank pages or logos) is necessary to
DocRAG, which combines queries with answers, achieves the best                    prevent noise from interfering with retrieval.
results by leveraging answers as complementary contextual sig-
nals. (2) Chunk Node Ranking Strategies (Max vs. Mean). The                       5.3     Impact of Hyperparameters (RQ3)
Max strategy consistently outperforms Mean aggregation. Using                     Figures 4 and 5 illustrate the impact of key hyperparameters on the
averaged similarity scores (MLDocRAG w/ Mean) degrades perfor-                    performance of MLDocRAG. (1) Expansion Hops (ℎ). Multi-hop
mance compared to the default Max-based ranking, suggesting that                  expansion (ℎ = 1, 2) consistently outperforms zero-hop retrieval
a chunk’s relevance is better captured by its most relevant query                 (ℎ = 0), highlighting the benefit of query node expansion through
Conference acronym ’XX, June 03–05, 2018, Woodstock, NY                                                                                          Yongyue Zhang and Yaxiong Wu


                                                                            Question & Answer ✓
                                                                            Question: Which step in Figure 1 maps to the content of Figure 10?
                                                                            Evidence Pages: [3, 14]
                                                                            Ground Truth: Deletion/duplication/rearrangement of the genetic material and Genetic diseases.



                                                                            RAGtxt+i2t
                                                                               BGE-m3 p
                                                                            Response:
                                                                            The question asks which step in Figure 1 (Pathogenesis of genetic diseases) maps to the content of Figure 10.
                                                                            However, the provided context does not include any information about Figure 10. Since the content of Figure 10 is
                                                                            not described in the given text, it is impossible to determine which step in Figure 1 corresponds to it.
                                                                            Final Answer: I don’t know.
        (a) MMLongBench-Doc                       (b) LongDocURL
                                                                                     page
      Figure 6: Ablation on MDoc2Query optimization.                        VRAGColPali p
                                                                            Response:
                                                                            The question asks which step in Figure 1 maps to the content of Figure 10. However, the provided images and
graph traversal. However, performance degrades when ℎ = 3, in-              text do not include either Figure 1 or Figure 10. Without these figures, it is impossible to determine the mapping
                                                                            between them.
dicating that excessive expansion introduces semantic noise that            Final Answer: I don’t know.
outweighs the gains from additional context. (2) KNN Neighbors
(𝑘). Accuracy generally improves as the number of nearest neigh-            MLDocRAG ✓
bors increases, peaking around 𝑘 = 3. This suggests that a moderate         Response:
                                                                            To determine which step in Figure 1 maps to the content of Figure 10, let’s analyze both figures step by step.
graph density effectively bridges semantic gaps between queries,
                                                                          Figure 1: Pathogenesis of Genetic Diseases.
while denser connections beyond this point yield diminishing re-          Figure 1 outlines a sequence of events leading to genetic diseases:
                                                                          (1) Mutation
turns or introduce noise. (3) Max Nodes (𝑛). Performance exhibits         (2) Deletion / Duplication / Rearrangement of Genetic Material
a clear optimum at 𝑛 = 10. Retrieving too few nodes (𝑛 = 5) limits        (3) Deficient / Defective Transcription of mRNA
                                                                          (4) Deficient / Defective Post-Transcriptional Modifications of mRNA
evidence coverage, whereas retrieving too many nodes (𝑛 > 10)             (5) Deficient / Defective Translation of mRNA
                                                                          (6) Deficient / Defective Production of Proteins / Regulatory Factors
introduces irrelevant information, leading to notable performance         (7) Deficient / Defective Post-Translational Modifications of Proteins
                                                                          (8) Disturbed Function(s) of Metabolic Networks
drops. In addition, a stricter similarity threshold (𝛼 = 1.2) consis-     (9) Patho-Physiological Alterations of Cellular Functions
                                                                         (10) Genetic Disease
tently outperforms a looser threshold (𝛼 = 1.0), emphasizing the
                                                                            Figure 10: Pathological Consequences of Genomic Structural and Functional Mutations.
importance of prioritizing high-quality entry nodes over quantity.          Figure 10 illustrates the consequences of genomic imprinting defects and chromosomal abnormalities, specifically:
                                                                                     • Structural and numerical chromosomal mutations leading to altered genetic material.
                                                                                     • The resulting phenotypes (e.g., normal zygote, gynogenetic constitution, and androgenetic constitution)
5.4     Impact of MDoc2Query Optimization (RQ4)                                          are shown.

                                                                            Mapping the Content.
Figure 6 illustrates the impact of non-parametric and parametric            Figure 10 focuses on the consequences of structural and numerical chromosomal mutations, which directly
                                                                            correspond to the second step in Figure 1: Deletion / Duplication / Rearrangement of Genetic Material.
optimization strategies for MDoc2Query on the performance of                The phenotypes shown in Figure 10 (e.g., normal zygote, gynogenetic constitution, and androgenetic constitution)
                                                                            are the downstream effects of these chromosomal mutations, aligning with the pathogenesis outlined in Figure 1.
MLDocRAG. (1) Non-Parametric Optimization. Providing each
                                                                            Final Answer: Deletion / Duplication / Rearrangement of Genetic Material.
chunk with its corresponding page image during query generation
consistently improves performance. Specifically, MLDocRAG𝑃 out-                           Figure 7: Use Case on MMLongBench-Doc.
performs the chunk-only MLDocRAG across both datasets, demon-
strating that incorporating page-level context enhances query qual-
ity by mitigating semantic fragmentation caused by isolated chunks.     gap, MLDocRAG successfully retrieves the dispersed evidence and
Representative query–answer examples generated by MDoc2Query            performs the required multi-hop reasoning. Specifically, MLDocRAG
with and without page context are provided in Appendix C. Further-      accurately aligns the “chromosomal mutations” visually depicted in
more, MLDocRAG𝑃𝑃 integrates page-level information at both the          “Figure 10” on Page 14 with the corresponding “Deletion / Duplica-
query generation and answer generation stages, achieving the best       tion / Rearrangement” stage in “Figure 1” on Page 3, demonstrating
overall performance. This result confirms that supplying reference      its superior capability in fine-grained information extraction and
page context throughout both retrieval indexing and QA stages           cross-page visual alignment. More use cases are provided in Ap-
maximizes evidence utilization. (2) Parametric Optimization.            pendix D.
MLDocRAG remains effective when deployed with smaller LVLMs.
Although the 32B model achieves the strongest overall performance,      6        Conclusion
the 7B model with supervised fine-tuning (MLDocRAG w/ 7B SFT )          We presented MLDocRAG, a framework for multimodal long-document
attains 50.1% accuracy on LongDocURL, closely matching the 32B          QA built on the Multimodal Chunk-Query Graph (MCQG), which
baseline (50.8%). These results demonstrate that MLDocRAG can be        enables unified, query-centric retrieval. By extending document
efficiently adapted to resource-constrained models through para-        expansion to the multimodal setting via MDoc2Query, MCQG orga-
metric optimization.                                                    nizes heterogeneous chunks and their generated queries into a struc-
                                                                        tured graph that captures cross-modal and cross-page associations.
5.5     Use Case                                                        This query-centric representation supports selective, multi-hop re-
                                                                        trieval and semantically grounded evidence aggregation, achieving
   Figure 7 illustrates a representative use case from MMLongBench-     consistent gains on MMLongBench-Doc and LongDocURL. Our
Doc that requires cross-modal reasoning across distant scientific       results demonstrate the effectiveness of query-based multimodal
diagrams (Pages 3 and 14). In contrast to baseline methods such as      retrieval and the scalability of graph-structured organization for
     𝑡𝑥𝑡 +𝑖2𝑡 and 𝑉 𝑅𝐴𝐺 𝑝𝑎𝑔𝑒 , which fail to bridge this long-context
𝑅𝐴𝐺 BGE-m3                                                              multimodal long-context understanding.
                         ColPali
MLDocRAG: Multimodal Long-Context Document Retrieval Augmented Generation                                          Conference acronym ’XX, June 03–05, 2018, Woodstock, NY


7    Limitations                                                                          [19] Anwen Hu, Haiyang Xu, Jiabo Ye, Ming Yan, Liang Zhang, Bo Zhang, Ji Zhang,
                                                                                               Qin Jin, Fei Huang, and Jingren Zhou. 2024. mplug-docowl 1.5: Unified structure
While MLDocRAG achieves promising results, several limitations                                 learning for ocr-free document understanding. In Findings of the Association for
remain. First, it currently supports only text and image, limiting                             Computational Linguistics: EMNLP 2024. 3096–3120.
                                                                                          [20] Aaron Hurst, Adam Lerer, Adam P Goucher, Adam Perelman, Aditya Ramesh,
generalization to richer modalities such as video or audio. Second,                            Aidan Clark, AJ Ostrow, Akila Welihinda, Alan Hayes, Alec Radford, et al. 2024.
its effectiveness depends on the quality of generated queries—noisy                            Gpt-4o system card. arXiv preprint arXiv:2410.21276 (2024).
or incomplete queries may reduce retrieval accuracy. Finally, con-                        [21] Pranab Islam, Anand Kannappan, Douwe Kiela, Rebecca Qian, Nino Scherrer,
                                                                                               and Bertie Vidgen. 2023. Financebench: A new benchmark for financial question
structing large multimodal graphs can be computationally expen-                                answering. arXiv preprint arXiv:2311.11944 (2023).
sive, posing challenges for scaling to massive document collections.                      [22] Rafal Kuc and Marek Rogozinski. 2013. Elasticsearch server. Packt Publishing
                                                                                               Ltd.
                                                                                          [23] Jian Li, Weiheng Lu, Hao Fei, Meng Luo, Ming Dai, Min Xia, Yizhang Jin, Zhenye
References                                                                                     Gan, Ding Qi, Chaoyou Fu, et al. 2024. A survey on benchmarks of multimodal
 [1] Mohammad Mahdi Abootorabi, Amirhosein Zobeiri, Mahdi Dehghani, Moham-                     large language models. arXiv preprint arXiv:2408.08632 (2024).
     madali Mohammadkhani, Bardia Mohammadi, Omid Ghahroodi, Mahdieh Soley-               [24] Jiaheng Liu, Dawei Zhu, Zhiqi Bai, Yancheng He, Huanxuan Liao, Haoran Que,
     mani Baghshah, and Ehsaneddin Asgari. 2025. Ask in any modality: A compre-                Zekun Wang, Chenchen Zhang, Ge Zhang, Jiebin Zhang, et al. 2025. A comprehen-
     hensive survey on multimodal retrieval-augmented generation. arXiv preprint               sive survey on long context language modeling. arXiv preprint arXiv:2503.17407
     arXiv:2502.08826 (2025).                                                                  (2025).
 [2] Martin Aumüller, Erik Bernhardsson, and Alexander Faithfull. 2020. ANN-              [25] Yubo Ma, Yuhang Zang, Liangyu Chen, Meiqi Chen, Yizhu Jiao, Xinze Li, Xinyuan
     Benchmarks: A benchmarking tool for approximate nearest neighbor algorithms.              Lu, Ziyu Liu, Yan Ma, Xiaoyi Dong, et al. 2024. Mmlongbench-doc: Benchmarking
     Information Systems 87 (2020), 101374.                                                    long-context document understanding with visualizations. Advances in Neural
 [3] Shuai Bai, Keqin Chen, Xuejing Liu, Jialin Wang, Wenbin Ge, Sibo Song, Kai                Information Processing Systems 37 (2024), 95963–96010.
     Dang, Peng Wang, Shijie Wang, Jun Tang, et al. 2025. Qwen2. 5-vl technical           [26] Lang Mei, Siyu Mo, Zhihan Yang, and Chong Chen. 2025. A survey of multimodal
     report. arXiv preprint arXiv:2502.13923 (2025).                                           retrieval-augmented generation. arXiv preprint arXiv:2504.08748 (2025).
 [4] Shuai Bai, Keqin Chen, Xuejing Liu, Jialin Wang, Wenbin Ge, Sibo Song, Kai           [27] Rodrigo Nogueira, Wei Yang, Jimmy Lin, and Kyunghyun Cho. 2019. Document
     Dang, Peng Wang, Shijie Wang, Jun Tang, et al. 2025. Qwen2.5-vl technical report.         expansion by query prediction. arXiv preprint arXiv:1904.08375 (2019).
     arXiv preprint arXiv:2502.13923 (2025).                                              [28] Jiwon Park, Seohyun Pyeon, Jinwoo Kim, Rina Carines Cabal, Yihao Ding, and
 [5] Jianlv Chen, Shitao Xiao, Peitian Zhang, Kun Luo, Defu Lian, and Zheng Liu. 2024.         Soyeon Caren Han. 2025. DocHop-QA: Towards Multi-Hop Reasoning over
     Bge m3-embedding: Multi-lingual, multi-functionality, multi-granularity text              Multimodal Document Collections. arXiv preprint arXiv:2508.15851 (2025).
     embeddings through self-knowledge distillation. arXiv preprint arXiv:2402.03216      [29] Alec Radford, Jong Wook Kim, Chris Hallacy, Aditya Ramesh, Gabriel Goh,
     4, 5 (2024).                                                                              Sandhini Agarwal, Girish Sastry, Amanda Askell, Pamela Mishkin, Jack Clark,
 [6] Zhe Chen, Jiannan Wu, Wenhai Wang, Weijie Su, Guo Chen, Sen Xing, Muyan                   et al. 2021. Learning transferable visual models from natural language supervision.
     Zhong, Qinglong Zhang, Xizhou Zhu, Lewei Lu, et al. 2024. Internvl: Scaling               In International conference on machine learning. PmLR, 8748–8763.
     up vision foundation models and aligning for generic visual-linguistic tasks. In     [30] Stephen Robertson, Hugo Zaragoza, et al. 2009. The probabilistic relevance
     Proceedings of the IEEE/CVF conference on computer vision and pattern recognition.        framework: BM25 and beyond. Foundations and trends® in information retrieval
     24185–24198.                                                                              3, 4 (2009), 333–389.
 [7] Jaemin Cho, Debanjan Mahata, Ozan Irsoy, Yujie He, and Mohit Bansal. 2024.           [31] Amit Singhal and Fernando Pereira. 1999. Document expansion for speech
     M3docrag: Multi-modal retrieval is what you need for multi-page multi-document            retrieval. In Proceedings of the 22nd annual international ACM SIGIR conference
     understanding. arXiv preprint arXiv:2411.04952 (2024).                                    on Research and development in information retrieval. 34–41.
 [8] Chao Deng, Jiale Yuan, Pi Bu, Peijie Wang, Zhong-Zhi Li, Jian Xu, Xiao-Hui           [32] Ray Smith. 2007. An overview of the Tesseract OCR engine. In Ninth international
     Li, Yuan Gao, Jun Song, Bo Zheng, et al. 2025. Longdocurl: a comprehensive                conference on document analysis and recognition (ICDAR 2007), Vol. 2. IEEE, 629–
     multimodal long document benchmark integrating understanding, reasoning,                  633.
     and locating. In Proceedings of the 63rd Annual Meeting of the Association for       [33] Ryota Tanaka, Kyosuke Nishida, Kosuke Nishida, Taku Hasegawa, Itsumi Saito,
     Computational Linguistics (Volume 1: Long Papers). 1135–1159.                             and Kuniko Saito. 2023. Slidevqa: A dataset for document visual question an-
 [9] Xiaoyi Dong, Pan Zhang, Yuhang Zang, Yuhang Cao, Bin Wang, Linke Ouyang,                  swering on multiple images. In Proceedings of the AAAI Conference on Artificial
     Songyang Zhang, Haodong Duan, Wenwei Zhang, Yining Li, et al. 2024. Internlm-             Intelligence, Vol. 37. 13636–13645.
     xcomposer2-4khd: A pioneering large vision-language model handling resolu-           [34] Tao Tao, Xuanhui Wang, Qiaozhu Mei, and ChengXiang Zhai. 2006. Language
     tions from 336 pixels to 4k hd. Advances in Neural Information Processing Systems         model information retrieval with document expansion. In Proceedings of the
     37 (2024), 42566–42592.                                                                   Human Language Technology Conference of the NAACL, Main Conference. 407–
[10] Matthijs Douze, Alexandr Guzhva, Chengqi Deng, Jeff Johnson, Gergely Szilvasy,            414.
     Pierre-Emmanuel Mazaré, Maria Lomeli, Lucas Hosseini, and Hervé Jégou. 2025.         [35] Gemini Team, Rohan Anil, Sebastian Borgeaud, Jean-Baptiste Alayrac, Jiahui
     The faiss library. IEEE Transactions on Big Data (2025).                                  Yu, Radu Soricut, Johan Schalkwyk, Andrew M Dai, Anja Hauth, Katie Millican,
[11] Darren Edge, Ha Trinh, Newman Cheng, Joshua Bradley, Alex Chao, Apurva                    et al. 2023. Gemini: a family of highly capable multimodal models. arXiv preprint
     Mody, Steven Truitt, Dasha Metropolitansky, Robert Osazuwa Ness, and Jonathan             arXiv:2312.11805 (2023).
     Larson. 2024. From local to global: A graph rag approach to query-focused            [36] Qwen Team. 2024. Qwen2.5: A Party of Foundation Models. https://qwenlm.
     summarization. arXiv preprint arXiv:2404.16130 (2024).                                    github.io/blog/qwen2.5/
[12] Miles Efron, Peter Organisciak, and Katrina Fenlon. 2012. Improving retrieval of     [37] Michael Tschannen, Alexey Gritsenko, Xiao Wang, Muhammad Ferjad Naeem,
     short texts through document expansion. In Proceedings of the 35th international          Ibrahim Alabdulmohsin, Nikhil Parthasarathy, Talfan Evans, Lucas Beyer, Ye
     ACM SIGIR conference on Research and development in information retrieval. 911–           Xia, Basil Mustafa, et al. 2025. Siglip 2: Multilingual vision-language encoders
     920.                                                                                      with improved semantic understanding, localization, and dense features. arXiv
[13] Tianyu Fan, Jingyuan Wang, Xubin Ren, and Chao Huang. 2025. MiniRAG:                      preprint arXiv:2502.14786 (2025).
     Towards Extremely Simple Retrieval-Augmented Generation. arXiv preprint              [38] Jordy Van Landeghem, Rubèn Tito, Łukasz Borchmann, Michał Pietruszka, Pawel
     arXiv:2501.06713 (2025).                                                                  Joziak, Rafal Powalski, Dawid Jurkiewicz, Mickaël Coustaty, Bertrand Anckaert,
[14] Manuel Faysse, Hugues Sibille, Tony Wu, Bilel Omrani, Gautier Viaud, Céline               Ernest Valveny, et al. 2023. Document understanding dataset and evaluation
     Hudelot, and Pierre Colombo. 2024. Colpali: Efficient document retrieval with             (dude). In Proceedings of the IEEE/CVF International Conference on Computer Vision.
     vision language models. arXiv preprint arXiv:2407.01449 (2024).                           19528–19540.
[15] Mitko Gospodinov, Sean MacAvaney, and Craig Macdonald. 2023. Doc2Query–:             [39] Xiaojun Wan, Jianwu Yang, and Jianguo Xiao. 2007. Single document summa-
     when less is more. In European Conference on Information Retrieval. Springer,             rization with document expansion. In AAAI. 931–936.
     414–422.                                                                             [40] Bin Wang, Chao Xu, Xiaomeng Zhao, Linke Ouyang, Fan Wu, Zhiyuan Zhao,
[16] Jiawei Gu, Xuhui Jiang, Zhichao Shi, Hexiang Tan, Xuehao Zhai, Chengjin Xu,               Rui Xu, Kaiwen Liu, Yuan Qu, Fukai Shang, et al. 2024. Mineru: An open-source
     Wei Li, Yinghan Shen, Shengjie Ma, Honghao Liu, et al. 2024. A survey on                  solution for precise document content extraction. arXiv preprint arXiv:2409.18839
     llm-as-a-judge. The Innovation (2024).                                                    (2024).
[17] José Guia, Valéria Gonçalves Soares, and Jorge Bernardino. 2017. Graph databases:    [41] Hengyi Wang, Haizhou Shi, Shiwei Tan, Weiyi Qin, Wenyuan Wang, Tunyu
     Neo4j analysis.. In ICEIS (1). 351–356.                                                   Zhang, Akshay Nambi, Tanuja Ganu, and Hao Wang. 2025. Multimodal needle in
[18] MD Zakir Hossain, Ferdous Sohel, Mohd Fairuz Shiratuddin, and Hamid Laga.                 a haystack: Benchmarking long-context capability of multimodal large language
     2019. A comprehensive survey of deep learning for image captioning. ACM                   models. In Proceedings of the 2025 Conference of the Nations of the Americas Chapter
     Computing Surveys (CsUR) 51, 6 (2019), 1–36.                                              of the Association for Computational Linguistics: Human Language Technologies
Conference acronym ’XX, June 03–05, 2018, Woodstock, NY                                                                                    Yongyue Zhang and Yaxiong Wu


     (Volume 1: Long Papers). 3221–3241.                                                [46] Shukang Yin, Chaoyou Fu, Sirui Zhao, Ke Li, Xing Sun, Tong Xu, and Enhong
[42] Weiyun Wang, Shuibo Zhang, Yiming Ren, Yuchen Duan, Tiantong Li, Shuo                   Chen. 2024. A survey on multimodal large language models. National Science
     Liu, Mengkang Hu, Zhe Chen, Kaipeng Zhang, Lewei Lu, et al. 2024. Needle in             Review 11, 12 (2024), nwae403.
     a multimodal haystack. Advances in Neural Information Processing Systems 37        [47] Xiaohua Zhai, Basil Mustafa, Alexander Kolesnikov, and Lucas Beyer. 2023. Sig-
     (2024), 20540–20565.                                                                    moid loss for language image pre-training. In Proceedings of the IEEE/CVF inter-
[43] Yaoting Wang, Shengqiong Wu, Yuecheng Zhang, Shuicheng Yan, Ziwei Liu, Jiebo            national conference on computer vision. 11975–11986.
     Luo, and Hao Fei. 2025. Multimodal chain-of-thought reasoning: A comprehensive     [48] Junyuan Zhang, Qintong Zhang, Bin Wang, Linke Ouyang, Zichen Wen, Ying Li,
     survey. arXiv preprint arXiv:2503.12605 (2025).                                         Ka-Ho Chow, Conghui He, and Wentao Zhang. 2025. Ocr hinders rag: Evaluating
[44] Yaxiong Wu, Jianyuan Bo, Yongyue Zhang, Sheng Liang, and Yong Liu.                      the cascading impact of ocr on retrieval-augmented generation. In Proceedings of
     2025. Query-Centric Graph Retrieval Augmented Generation. arXiv preprint                the IEEE/CVF International Conference on Computer Vision. 17443–17453.
     arXiv:2509.21237 (2025).                                                           [49] Rui Zhang, Chen Liu, Yixin Su, Ruixuan Li, Xuanjing Huang, Xuelong Li, and
[45] An Yang, Baosong Yang, Binyuan Hui, Bo Zheng, Bowen Yu, Chang Zhou, Cheng-              Philip S Yu. 2025. A Comprehensive Survey on Multimodal RAG: All Combina-
     peng Li, Chengyuan Li, Dayiheng Liu, Fei Huang, Guanting Dong, Haoran Wei,              tions of Modalities as Input and Output. Authorea Preprints (2025).
     Huan Lin, Jialong Tang, Jialin Wang, Jian Yang, Jianhong Tu, Jianwei Zhang,        [50] Ruochen Zhao, Hailin Chen, Weishi Wang, Fangkai Jiao, Xuan Long Do, Chengwei
     Jianxin Ma, Jin Xu, Jingren Zhou, Jinze Bai, Jinzheng He, Junyang Lin, Kai Dang,        Qin, Bosheng Ding, Xiaobao Guo, Minzhi Li, Xingxuan Li, et al. 2023. Retrieving
     Keming Lu, Keqin Chen, Kexin Yang, Mei Li, Mingfeng Xue, Na Ni, Pei Zhang,              multimodal information for augmented generation: A survey. arXiv preprint
     Peng Wang, Ru Peng, Rui Men, Ruize Gao, Runji Lin, Shijie Wang, Shuai Bai,              arXiv:2303.10868 (2023).
     Sinan Tan, Tianhang Zhu, Tianhao Li, Tianyu Liu, Wenbin Ge, Xiaodong Deng,         [51] Lianmin Zheng, Liangsheng Yin, Zhiqiang Xie, Chuyue Livia Sun, Jeff Huang,
     Xiaohuan Zhou, Xingzhang Ren, Xinyu Zhang, Xipin Wei, Xuancheng Ren, Yang               Cody Hao Yu, Shiyi Cao, Christos Kozyrakis, Ion Stoica, Joseph E Gonzalez,
     Fan, Yang Yao, Yichang Zhang, Yu Wan, Yunfei Chu, Yuqiong Liu, Zeyu Cui,                et al. 2024. Sglang: Efficient execution of structured language model programs.
     Zhenru Zhang, and Zhihao Fan. 2024. Qwen2 Technical Report. arXiv preprint              Advances in neural information processing systems 37 (2024), 62557–62583.
     arXiv:2407.10671 (2024).
MLDocRAG: Multimodal Long-Context Document Retrieval Augmented Generation                                Conference acronym ’XX, June 03–05, 2018, Woodstock, NY


A       LLM Prompt                                                                         • "query": the generated question
 The following are some LLM prompts for query generation and                               • "answer": the exact answer
answer evaluation, including MDoc2Query Prompt, Page-Context-                        Adjust the number of queries according to the information richness of the
Aware MDoc2Query Prompt, Response Generation Prompt, Page-                           text and image (0–20 queries).

Context-Aware Response Generation and Evaluation Prompt.                             [
                                                                                         {"index": 0, "query": "Where did Alice and Bob meet?", "answer": "
                                                                                              Central Cafe"},
A.1       MDoc2Query Prompt                                                              {"index": 1, "query": "When did the meeting take place?", "answer":
                                                                                              "Tuesday"}
                                                                                     ]
    MDoc2Query Prompt
    —Role—
    You are a Doc2Query assistant.
    —Goal—                                                                         A.2     Page-Context-Aware MDoc2Query Prompt
    Given a text chunk and image, generate no more than 20 distinct user
    queries that can be directly answered by that provided text chunk and            Page-Context-Aware MDoc2Query Prompt
    image. For each query, also provide an exact answer and a relevance score.
    —Generation Rules—                                                               —Role—
       (1) Answerability: Every query must be answerable using only infor-           You are an expert **Document Understanding AI** designed to build a
           mation in the text chunk and image.                                       high-precision Retrieval Graph.
       (2) Comprehensive coverage: Collectively, all generated queries               —Inputs—
           should cover all key ideas in the text chunk and image from differ-          (1) Target Chunk: A specific segment of content (Text, Cropped
           ent viewpoints or levels of detail.                                              Image, or Table Data) extracted from a document.
       (3) Adaptive quantity: Adjust the number of generated queries (0-20)             (2) Source Page Image: The original full-page screenshot where this
           according to the semantic richness and information value of both                 chunk is located.
           text and image.
       (4) Diversity requirements: Ensure diversity along the following              —Workflow (Strict Execution Order)—
           dimensions:                                                               Step 1: Visual Localization & Context Recovery (Mental Scratchpad)
           • Question-style        variety:    Mix      interrogative     forms      Locate: First, look at the Source Page Image and identify exactly where the
              (who/what/why/how/where/when/did), imperative prompts                  Target Chunk is located.
              ("List...", "Summarize..."), comparative questions, conditional or     Scan Surroundings: Look immediately above, below, and to the sides of the
              speculative forms, etc.                                                chunk location in the full page.
           • Content-perspective variety: Include queries on facts, definitions,     Identify Missing Context: Find any information not inside the chunk but
              methods, reasons, outcomes, examples, comparisons, limita-             essential for understanding it. This includes:
              tions, and so on.                                                             • Headers: Section Titles, Page Headers, Chapter Names.
           • Information granularity: Combine macro (overall purpose, high-                 • Captions: Figure Titles (e.g., "Figure 3: Revenue Trend"), Table
              level summary) and micro (specific figures, terms, steps) queries.               Headers, or Axis Labels that were cut off.
           • User-intent variety: Simulate intents such as confirmation, eval-              • Pre-text: Preceding sentences that define what "this table" or "the
              uation, usability, diagnosis, and decision-making (e.g., "Is this                data below" refers to.
              approach more efficient than...?").                                    Step 2: Adaptive Query Generation
           • Linguistic expression variety: Vary wording, syntax (active ↔           Based on the chunk’s content and the recovered context from Step 1, gener-
              passive), and synonyms; avoid repeating near-identical phrases.        ate a set of 5 to 20 Query-Answer pairs.
           • No redundancy: Each query must be meaningfully distinct; elim-          Quantity Rule: If the chunk is dense (e.g., a complex table or dense text),
              inate trivial rephrases that offer no new angle.                       generate closer to 20. If it is sparse, generate closer to 5.
           • Chunk-grounded specificity: Queries must be grounded in spe-            Coverage Rule: You must generate queries for all 4 Levels defined below.
              cific factual points from the text chunk and image. Avoid vague        The distribution ratio is up to you based on the content type.
              or generic formulations such as "What did X say?" or "Tell me
              more about Y" that lack anchoring in actual content.                   —Query Level Definitions—
       (5) Required fields: Each output item must be based on the given              Level 1: Integrated Entity Relationships (Dense & Comprehensive)
           text chunk and image, including the following fields:                     Goal: Instead of asking about single entities one by one, generate complex
           • query: A question or search phrase a user might ask.                    queries that link multiple entities found in the chunk.
           • answer: A concise answer taken verbatim (or nearly verbatim)            Constraint: Do not generate simple questions like "What is X?". Instead,
              from the text chunk and image.                                         ask: "How does [Entity A] interact with [Entity B] regarding [Topic]?" or
                                                                                     "What are the key specifications and performance metrics of [Product X]?"
    —Example—                                                                        Why: To create strong semantic connections between entities in the graph
    1. Input Chunk and Images                                                        without flooding it with simple queries.
                                                                                     Level 2: Detailed Content Description (The "Core Message")
    [
        {"type": "images", "image": "/path/image1"},
                                                                                     Goal: Paraphrase and summarize the detailed information provided inside
        {"type": "images", "image": "/path/image2"},                                 the chunk.
        {"type": "text", "text": "Alice met with Bob at the Central Cafe on          Instruction: Imagine a user asks "What specific details does this para-
             Tuesday to discuss their upcoming collaborative research                graph/chart provide?". Cover the key arguments, data trends, or descriptive
             project..."}                                                            points.
    ]                                                                                Why: To ensure the chunk is retrievable via natural language descriptions
                                                                                     of its content.
    2. Generated Queries                                                             Level 3: Macro Hierarchy (Navigation)
         • Where did Alice and Bob meet?                                             Goal: Anchor this chunk to the document structure.
         • When did the meeting take place?                                          Instruction: Extract the Section Title, Chapter Name, or Page Header from
         • What was the main topic discussed during the meeting?                     the Source Page Image. Generate queries that link this specific chunk con-
         • Who suggested incorporating advanced AI methodologies?                    tent to that high-level topic.
         • ... (more queries)                                                        Example: "What information does the section ’[Section Title]’ provide re-
    —Output Format—                                                                  garding [Chunk Topic]?"
    Return only a JSON array of objects. Each object must include:                   Level 4: Context Restoration (Immediate Surroundings)
                                                                                     Goal: Fix "context loss" caused by chunking.
         • "index": a zero-based integer
                                                                                     Instruction: Explicitly incorporate the missing headers, captions, or pre-text
Conference acronym ’XX, June 03–05, 2018, Woodstock, NY                                                                                  Yongyue Zhang and Yaxiong Wu



    you found in Step 1 into the query.                                                      (1) Visual Verification (Grounding):
    Critical: If the chunk is a table/chart without a title, use the title found in              • Use the Reference Page Image to verify the context of the
    the Page Image to formulate the query.                                                          Text Chunk.
    Example: "According to [Figure Title found in Page Image], what trend is                     • Example: If a chunk is a row of numbers, look at the Page Image
    shown in the data regarding [Chunk Content]?" or "As detailed in [Table                         to identify the Column Headers and Row Labels to ensure
    Caption], what are the specific values for [Row Name]?"                                         you interpret the numbers correctly.
    —Output Format (JSON Only)—                                                                  • Example: If a chunk describes a chart trend, look at the Page
                                                                                                    Image to confirm the Axis Labels, Units, and Legends.
    [                                                                                        (2) Contextual Synthesis:
        {                                                                                        • The Text Chunk might be stripped of its section title. Use the
          "index": 0,                                                                               Page Image to see which Section Header (e.g., "2023 Q4 Results"
          "level": "level_1_entity_integrated",
          "query": "Comprehensive query connecting Entity A and B...",
                                                                                                    vs "2022 Q4 Results") the chunk belongs to.
          "answer": "Detailed answer..."                                                         • Combine information from multiple chunks if necessary to form
        },                                                                                          a complete answer.
        {                                                                                    (3) Strict Evidence-Based:
          "index": 1,                                                                            • Answer ONLY using the provided information. Do not use
          "level": "level_2_detailed_content",                                                      outside knowledge.
          "query": "...",                                                                        • If the text chunk and the image contradict each other, trust the
          "answer": "..."
        },
                                                                                                    Visual Evidence (Image) for raw data (numbers, charts) and
        {                                                                                           the Text Chunk for semantic explanations.
          "index": 2,                                                                            • If the answer is not present in the provided contexts, explicitly
          "level": "level_3_macro_hierarchy",                                                       state: "Based on the provided documents, I cannot answer this
          "query": "...",                                                                           question."
          "answer": "..."                                                                    (4) Conciseness:
        },                                                                                       • Get straight to the point. Do not start with "Based on the con-
        {
          "index": 3,
                                                                                                    text..." or "The image shows...". Just state the answer.
          "level": "level_4_context_restoration",                                       —Output Format—
          "query": "Query incorporating the external Figure Title/Table
           Header...",                                                                  Analysis: (Briefly map the chunk text to the visual location in the page
          "answer": "..."                                                                      image to confirm headers/legends)
        }                                                                               Final Answer: [Your direct answer]
        // ... generate 5 to 20 pairs total
    ]


                                                                                      A.5   Evaluation Prompt
A.3     Response Generation Prompt                                                      Evaluation Prompt

    Response Generation Prompt                                                          You are a strict and precise evaluation assistant. You will be given a ques-
                                                                                        tion, a reference answer, and a candidate answer generated via retrieval-
                                                                                        augmented generation (RAG).
    You are a knowledgeable assistant that answers questions based on the
    given text and image data.                                                          —Goal—
                                                                                        Evaluate the candidate answer against the reference answer based on factual
    —Guidelines—                                                                        accuracy and completeness. Slight differences in phrasing are acceptable as
       (1) Carefully reason through the provided information before answer-             long as the meaning is the same.
           ing, but only use evidence explicitly supported by the text or               If the candidate answer includes an analysis followed by "Final Answer:",
           image.                                                                       only evaluate the content after "Final Answer:". If "Final Answer:" is missing,
       (2) If the answer cannot be determined from the provided data, clearly           treat the entire candidate as the final answer.
           say you don’t know.
       (3) Avoid unnecessary explanations—respond concisely and directly.               —Normalization for Unanswerable/None—
       (4) Present the final output in the format: Final Answer: [your an-              Treat the following expressions as equivalent to "Not answerable / No
           swer]                                                                        answer / None" when they appear as the candidate’s final answer:
                                                                                              • Explicit statements: "I don’t know", "Not answerable", "Not enough
                                                                                                 information", "Insufficient information", "Not mentioned", "Un-
                                                                                                 known", "Cannot be determined", "No information provided", "N/A",
                                                                                                 "Not applicable", "None".
A.4     Page-Context-Aware Response Generation                                                • Negative-existence statements: Assertions of absence for list/type
        Prompt                                                                                   questions, e.g., "No stages require a cooler.", "No such category
                                                                                                 exists.", "There are none.", "No [items] are present.", "None of the
    Page-Context-Aware Response Generation                                                       stages...".
                                                                                        Note: This normalization applies only when the reference answer itself
    Prompt                                                                              is unanswerable/none/empty. Normalization takes precedence over
                                                                                        all other rules when determining equivalence.
    You are an expert Multimodal QA Assistant. You will be provided with a              —Important Rules—
    user question and a set of Retrieved Contexts. Each Context consists of:
                                                                                            • If the candidate answer fails to provide an answer (e.g., says "I
         (1) Text/Data Chunk: A specific segment of text, a table row, or a                   don’t know") when the reference is answerable, it must receive
             data point retrieved from a document.                                            a score of 0.
         (2) Reference Page Image: The full document page where this chunk                  • If the reference answer is unanswerable/none/empty, the candidate
             is located.                                                                      answer must produce an unanswerable-equivalent expression (as
    —Goal—                                                                                    normalized above) to receive score 1. If the candidate gives any
    Answer the user’s question accurately by synthesizing information from the                substantive or fabricated specific content, assign score 0.
    provided Text Chunks and verifying it against the Reference Page Images.                • If the candidate answer overgeneralizes, omits key elements, or
                                                                                              adds unrelated information not supported by the reference, the
    —Reasoning Guidelines—                                                                    score must be 0, even if part of it is correct.
MLDocRAG: Multimodal Long-Context Document Retrieval Augmented Generation                            Conference acronym ’XX, June 03–05, 2018, Woodstock, NY



             • Only when the candidate answer covers all essential factual
               elements of the reference answer without introducing unrelated
               content, should the score be 1.
    —Scoring Criteria—
    Score = 1 (Correct):
         • The candidate answer accurately matches the factual content and
            level of detail of the reference answer. Minor wording differences
            are acceptable if the meaning is equivalent.
         • If the reference answer is "Unable to answer" / "Not answerable"
            / "None" / empty, and the candidate provides an unanswerable-
            equivalent expression (after normalization).
    Score = 0 (Incorrect):
         • The reference answer is answerable, but the candidate says
            any unanswerable-equivalent expression (including negative-
            existence).
         • The reference answer is answerable, but the candidate gives an        Corresponding Page Image:
            incorrect, incomplete, or irrelevant answer.
         • The reference answer is unanswerable/none/empty, but the candi-
            date provides any substantive or fabricated answer.



B    Details of Visual Noise Filtering
We employ clip-vit-base-patch32 to classify visual chunks via
zero-shot inference. Based on their semantic relevance to the RAG
task, visual elements are partitioned into two sets: those retained
for indexing and those filtered as decorative noise. Table 2 lists the
specific labels for each action.

    Retain       table, chart, graph, diagram, map, infographic, equation,       Doc2Query Example
                 flow chart, scatter plot, bar chart, form
    Filter       logo, banner, advertisement, poster, cover, illustration,       [
                 background, icon, photo, texture                                    {
                                                                                           "index": 0,
                                                                                           "query": "Which app store had more apps in 2015?",
                                                                                           "answer": "Google Play Store",
 Table 2: Visual chunk classification and filtering actions.                               "q_id": "reportq32015-151009093138-lva1-app6891_95-6-0"
                                                                                     },
                                                                                     {
                                                                                           "index": 1,
                                                                                           "query": "How many apps were in the Apple App Store in 2015?",
Rationale: Elements labeled for filtering are pruned to eliminate                          "answer": "1,5 million",
redundant visual noise (e.g., repeating logos) and enhance the pre-                        "q_id": "reportq32015-151009093138-lva1-app6891_95-6-1"
                                                                                     },
cision of the embedding space during retrieval.                                      {
                                                                                           "index": 2,
                                                                                           "query": "What was the number of apps in the Google Play Store
C       MDoc2Query Example                                                                 in 2015?",
                                                                                           "answer": "1,6 million",
There are some query-answer pair examples generated by MDoc2Query                          "q_id": "reportq32015-151009093138-lva1-app6891_95-6-2"
and Page-Context-Aware MDoc2Query. The multimodal chunk and                          },
                                                                                     {
corresponding page image as follows:                                                       "index": 3,
                                                                                           "query": "In which year did the number of apps in both stores
    Multimodal Chunk with Page Image                                                      start to increase significantly?",
                                                                                           "answer": "2013",
                                                                                           "q_id": "reportq32015-151009093138-lva1-app6891_95-6-3"
                                                                                     },
    {                                                                                {
         "type": "image",                                                                  "index": 4,
         "text": "",                                                                       "query": "How many apps were in the Apple App Store in 2012?",
         "image": [                                                                        "answer": "0,5 million",
             "./images/9bc7afb9a74e615b67303104c415d.jpg"                                  "q_id": "reportq32015-151009093138-lva1-app6891_95-6-4"
             ],                                                                      },
         "visual_context": "./visual_context/a325667e4e534f96.png"                   {
    }                                                                                      "index": 5,
                                                                                           "query": "What was the number of apps in the Google Play Store
    Chunk Image:                                                                           in 2012?",
                                                                                           "answer": "0,35 million",
                                                                                           "q_id": "reportq32015-151009093138-lva1-app6891_95-6-5"
                                                                                     },
                                                                                     ...
                                                                                 ]
Conference acronym ’XX, June 03–05, 2018, Woodstock, NY                                                                      Yongyue Zhang and Yaxiong Wu


    Page-Context-Aware Example                                                  QA Example 1 on MMLongBench-Doc
                                                                                Souce evidence images:
    [
         {
               "index": 0,
               "level": "level_1_entity_integrated",
               "query": "How do the growth trends of apps in the Apple App
              Store and Google Play Store compare from 2012 to 2015, and what
               does this indicate about their market dynamics?",
               "answer": "From 2012 to 2015, both the Apple App Store and
              Google Play Store experienced significant growth in the number
              of apps. The Google Play Store showed a more rapid increase,
              starting at 0.35 million in 2012 and reaching 1.6 million in
              2015. The Apple App Store started at 0.5 million in 2012 and
              reached 1.5 million in 2015. This indicates that while both
              platforms grew, Google Play Store expanded at a faster rate,
              leading to a larger number of apps by 2015.",
               "q_id": "reportq32015-151009093138-lva1-app6891_95-6-0"
         },
         {
               "index": 1,
               "level": "level_2_detailed_content",
               "query": "What specific details does the chart provide about
              the number of apps in the Apple App Store and Google Play Store
               from 2012 to 2015?",
               "answer": "The chart shows the number of apps in the Apple App
               Store and Google Play Store from 2012 to 2015, measured in
              millions. In 2012, the Apple App Store had 0.5 million apps,
              while the Google Play Store had 0.35 million. By 2013, the
              numbers increased to 0.8 million for the Apple App Store and
              0.37 million for the Google Play Store. In 2014, the Apple App
              Store reached 1.25 million apps, and the Google Play Store
              reached 1.3 million. By 2015, the Apple App Store had 1.5
              million apps, and the Google Play Store had 1.6 million apps.",
               "q_id": "reportq32015-151009093138-lva1-app6891_95-6-1"
         },
         {
               "index": 2,
               "level": "level_3_macro_hierarchy",
               "query": "What information does the section 'Global Mobile
              Apps by Number' provide regarding the growth of apps in the
              Apple App Store and Google Play Store?",
               "answer": "The section 'Global Mobile Apps by Number' provides
               information on the growth of apps in the Apple App Store and
              Google Play Store from 2012 to 2015. It highlights that the
              number of apps in the Google Play Store grew by more than 50%
              last year, reaching over 1.6 million, compared to 1.5 million
              for the Apple App Store. This section emphasizes the rapid
              expansion of mobile apps globally and the competitive landscape
               between the two major app stores.",
               "q_id": "reportq32015-151009093138-lva1-app6891_95-6-2"
         },
         {
               "index": 3,
               "level": "level_4_context_restoration",
               "query": "According to the 'Global Mobile Apps by Number'
              section, what trend is shown in the data regarding the growth
              of apps in the Apple App Store and Google Play Store?",
               "answer": "The 'Global Mobile Apps by Number' section shows a
              consistent upward trend in the number of apps in both the Apple
               App Store and Google Play Store from 2012 to 2015. The Google
              Play Store experienced a more significant growth rate,
              surpassing the Apple App Store by 2015. This trend indicates
              the rapid expansion of the mobile app market and the increasing
               competition between the two major app stores.",
               "q_id": "reportq32015-151009093138-lva1-app6891_95-6-3"
         },
         ...
    ]




D       MLDocRAG QA Example

   There is a use case from the MMLongBench-Doc dataset to eval-
uate the multi-page and cross-modal reasoning capabilities on base-
line method and our MLDocRAG.
                                                                                Question: Among the adults conducted the survey on April 25 - May 1 2018,
                                                                                how many adults rated Trump’s government ethical standards as poor?
                                                                                Evidence Pages: [3, 4]
                                                                                Ground Truth: 541
MLDocRAG: Multimodal Long-Context Document Retrieval Augmented Generation                                                       Conference acronym ’XX, June 03–05, 2018, Woodstock, NY




      RAGtxt+i2t
         BGE-m3 p
      Response:
      To answer the question, let’s break down the information provided:
      (1) Overall Ratings of Trump’s Government Ethical Standards:
           • The survey conducted from April 25 to May 1, 2018, asked respondents to rate the ethical
             standards of top Trump administration officials.
           • According to the text, 58% of adults rated the ethical standards of top Trump administration
             officials as “not good” or “poor.”
      (2) Specific Breakdown:
           • Poor: The text does not provide a specific percentage for those who rated the ethical
             standards as “poor” alone.
           • However, it does state that 36% of adults rated the ethical standards as “poor.”
      (3) Conclusion:
           • The question asks for the number of adults who rated Trump’s government ethical stan-
             dards as “poor.”
           • Based on the information provided, 36% of adults rated the ethical standards as “poor.”
      Final Answer: 36%




                page
      VRAGColPali p
      Response:
      To answer the question, let’s analyze the relevant information from the provided images:
      (1) The survey was conducted from April 25 to May 1, 2018, as stated in the text.
      (2) The relevant chart is the one titled “Most rate top Trump administration officials’ ethics as
          ‘not good’ or ‘poor”’ (Image 2).
      (3) This chart shows the percentage of adults who rated the ethical standards of top Trump
          administration officials as “Poor,” “Not good,” “Good,” or “Excellent.”
      (4) The “Poor” category is represented by the dark blue bar, which shows 58% of the total respon-
          dents.

      Final Answer: 58% of adults rated Trump’s government ethical standards as poor.




      MLDocRAG ✓
      Response:
      To answer the question, let’s break down the information provided:
      (1) The survey was conducted from April 25 to May 1, 2018.
      (2) The question asks about the number of adults who rated Trump’s government ethical standards
          as “poor.”
      (3) From the text, we know:
           • About four-in-ten Americans rate the ethical standards of Trump administration officials
               as excellent (9%) or good (30%).
           • 58% say they are not good (21%) or poor (36%).
      (4) Specifically, the text states: “58% say they are not good (21%) or poor (36%).” This means 36% of
          the adults rated Trump’s government ethical standards as “poor.”
      (5) The survey sample size is 1,503 adults.
      (6) To find the number of adults who rated Trump’s government ethical standards as “poor,” we
          calculate:
           • 36% of 1,503 = 0.36 × 1,503 = 541.08
      Since we can’t have a fraction of a person, we round to the nearest whole number.
      Final Answer: 541




   Section 5.5 presents a QA example on MMLongBench-Doc with
detailed result comparisons; in this section, we further supplement
the example with two evidence page images.

    QA Example 2 on MMLongBench-Doc
    Souce evidence images:




                                                                                                              Question: Which step in Figure 1 maps to the content of Figure 10?
                                                                                                              Evidence Pages: [3, 14]
                                                                                                              Ground Truth: Deletion/duplication/rearrangement of the genetic material
                                                                                                              and Genetic diseases.
