Organizations: The Hong Kong University of Science and Technology (Guangzhou), Guangzhou, China · ASCETEX INTERNATIONAL LIMITED, Hong Kong, China · MOVENSYS Inc., Seongnam-si, Republic of Korea · Schneider Electric, Shanghai, China · Technical University of Munich, Munich, Germany · The Hong Kong University of Science and Technology, Hong Kong SAR, China
Existing multimodal RAG methods often flatten structured documents into isolated text and image units, weakening the source organization and local text-image logic needed for faithful evidence selection and placement. We propose HAM-RAG, a Hierarchy-Aware Multimodal RAG framework for structure-faithful interleaved generation. HAM-RAG uses document hierarchy as a grounding signal across retrieval and generation, contextualizing textual and visual evidence and preserving source position and local text-image relations in the prompt. We further introduce HAM-Bench, covering Wukong, Wiki, arXiv, and Recipe across game walkthroughs, web pages, scientific papers, and step-wise recipe documents. Across multiple backbones, HAM-RAG improves the main multimodal average by 17.3% over the strongest non-hierarchical baseline. On Wukong, HAM-RAG improves Img-CBS by 24.2% over the strongest non-hierarchical baseline, demonstrating substantially better local text-image alignment. The main experiments and ablation study together demonstrate that document hierarchy is a key grounding signal for faithful image selection, placement, and local text-image alignment. These findings highlight the value of hierarchy-aware grounding for reliable multimodal assistants that generate answers faithful to the source organization, procedural structure, and local text-image evidence of structured documents, such as technical manuals, maintenance guides, and industrial SOPs. The code is available at https://github.com/MCCodeAI/HAM-RAG.git.
Figures & tables
Benchmark
Setting
MM
Inter.
Struct.
Recon.
Hier. Eval.
WebQA ( Chang et al., 2022 )
MM QA
Yes
No
No
No
No
MRAMG-Bench ( Yu et al., 2025a )
MM RAG
Yes
Yes
Partial
Partial
No
MMDocRAG ( Dong et al., 2025 )
MM DocRAG
Yes
Yes
Partial
No
No
HAM-Bench
Hier. MM RAG
Yes
Yes
Yes
Yes
Yes
Table 1: Comparison of HAM-Bench with representative multimodal QA/RAG benchmarks.
Subset
Domain
Struct. Source
Multi-Doc
Proc. QA
Docs
QAs
Imgs
Img/Ans
Img/Doc
QA/Doc
#H1
#H2
Wukong
Game Walkthrough
Native
Yes
Yes
431
540
2594
4.60
8.83
2.11
1.04
2.03
Wiki
Web
Recon.
No
No
538
500
539
1.00
0.98
0.93
1.00
3.65
arXiv
Academic
Recon.
No
No
101
191
3136
1.35
31.05
1.89
1.02
12.78
Recipe
Lifestyle
Recon.
No
Yes
1528
2360
8569
2.15
5.60
1.54
1.00
4.97
Table 2: Structural statistics of HAM-Bench. Native/Recon. indicate native/reconstructed document hierarchies. Imgs counts unique source images; Img/Ans, Img/Doc, and QA/Doc are mean images per answer, image occurrences per document, and QA-document associations per document, respectively. #H1/#H2 are mean level-1/2 headings per document.
Framework
Model
Wukong ↑
Wiki ↑
arXiv ↑
Recipe ↑
MM Avg. ↑
Img-F1
Img-CBS
Qual.
Img-F1
Img-CBS
Qual.
Img-F1
Img-CBS
Qual.
Img-F1
Img-CBS
Qual.
HAM-RAG
DeepSeek-V3
55.67
55.49
3.74
100
70.48
3.39
50.57
50.82
3.34
74.81
65.74
3.76
67.35
Gemini-2.5-Flash
65.31
59.17
3.76
97.53
69.71
3.39
54.01
49.24
3.39
87.82
71.10
3.81
70.07
Gemini-2.5-Pro
67.59
63.10
3.88
93.80
65.93
3.47
45.52
41.17
3.46
85.62
71.40
3.84
68.93
GPT-4o
57.44
52.08
3.74
99.60
69.59
3.42
44.09
47.87
3.36
83.11
63.30
3.78
66.92
GPT-5
60.52
51.52
3.88
98.33
69.07
3.50
58.69
53.23
3.62
88.07
69.89
3.93
70.66
Table 3: Main multimodal generation results on HAM-Bench, covering image selection, local image-context alignment, and holistic multimodal quality. MM Avg. is the unweighted mean of Img-F1, Img-CBS, and Qual. ×20 across all subsets.
Stage
Method / Pipeline
Wukong ↑
Wiki ↑
arXiv ↑
Recipe ↑
Text (TCR@15)
HAM-RAG
0.99
0.80
0.77
0.97
Shared Baseline (LLM / MLLM / Rule)
0.80
0.70
0.62
0.91
Image (IR)
HAM-RAG
0.83
1.00
0.86
0.97
MLLM-Based (CLIP-filtered)
0.50
0.98
0.57
0.73
Shared Baseline (LLM / Rule)
0.65
0.98
0.99
0.92
Table 4: HAM-Bench retrieval results.
Figure 3: HAM-RAG ablation results on Wukong for Image F1 Score, Image Context BERTScore, and Average Score.