Manuscript Offprint
arXiv:2608.29037DocIntent: Answerability-Guided Agentic Restoration for Real-World Document Visual Question Answering
Abstract
Real-world degradations such as blur, shadow, distortion, and moiré patterns severely impair the document question-answering capabilities of Multimodal Large Language Models (MLLMs). Applying restoration tools before Visual Question Answering (VQA) is an intuitive solution. However, existing restoration approaches remain limited, as manually designing and executing restoration strategies is labor-intensive and requires domain expertise. Agentic restoration offers new possibilities for automation, yet existing frameworks primarily target natural images and pursue perceptual quality, overlooking that restoration should serve downstream tasks rather than optimize generic image quality metrics. To this end, we explore the value of agentic restoration for real-world degraded document VQA and propose DocIntent, a training-free Answerability-Guided Agentic Restoration framework. DocIntent first assesses question answerability, then identifies task-relevant degradations and selectively invokes restoration tools. A Comparison-Based Rollback mechanism validates each restoration step and reverts it when question-relevant evidence becomes less decipherable. The entire process requires no additional pretrained degradation classifier or image quality assessment model. Extensive experiments on the WildDoc benchmark show that DocIntent consistently improves the average score and consistency of different open- and closed-source MLLMs. The code and experimental data will be publicly available.
1 Introduction
In the digital era, enterprises and organizations handle large volumes of documents, such as invoices, contracts, and forms (Jaume et al., 2019; Park et al., 2019). These documents often contain critical information for business workflows, making efficient and accurate information extraction

Figure 1: Comparison between existing real-world document VQA methods and the proposed DocIntent (bottom). The ground truth answer to the question is 212.
essential. However, traditional manual processing is labor-intensive and time-consuming. Visual Question Answering (VQA) on document-related data addresses this challenge by enabling intelligent systems to understand document content and answer user-specified questions (Mathew et al., 2021, 2022), supporting more flexible document processing.
Recently, Multimodal Large Language Models (MLLMs) (Team, 2025; Team et al., 2023; Hurst et al., 2024) have demonstrated remarkable potential in document understanding (Mathew et al., 2021, 2022; Masry et al., 2022). However, real-world document images often exhibit degradations such as blur, shadow, and distortion (Wang et al., 2025a; Zhang et al., 2024; Feng et al., 2021; Zhang et al., 2025a), which severely hinder information extraction by MLLMs. Research on benchmarks such as WildDoc (Wang et al., 2025a) reveals that even state-of-the-art MLLMs experience substantial performance degradation when confronted with degraded documents, as illustrated in Figure 1 (top-left). A straightforward strategy is to preprocess
Corresponding author.
degraded documents with restoration tools before feeding them into MLLMs (Figure 1, top-right). However, this pipeline depends on manually diagnosing degradation types and selecting appropriate tools, making it impractical for non-experts. Recently, agentic image restoration methods (Chen et al., 2024; Zhou et al., 2025; Zhu et al., 2024; Zuo et al., 2025; Zhang et al., 2026b) have achieved success in natural image restoration. However, these methods primarily focus on natural image processing and pursue the highest perceptual image quality rather than aligning with downstream task requirements. In document question answering, different questions exhibit varying sensitivity to degradations, and not all degradations hinder question answering. Existing document restoration tools (Zhang et al., 2024; Yang et al., 2025; Zhao et al., 2025) optimize perceptual quality metrics such as SSIM (Wang et al., 2004) and PSNR. However, these overall quality metrics cannot ensure local text clarity. The restoration process may introduce artifacts, text blurring, or distortion that impair question-answering performance. Processing task-irrelevant degradations unnecessarily accumulates such risks. Therefore, a critical question arises: How to tailor document restoration to specific question-answering tasks?
To address this question, we propose DocIntent, a training-free and user-friendly answerability-guided document image restoration framework. As illustrated in Figure 1 (bottom), DocIntent integrates downstream question awareness into restoration planning through a two-phase cyclic mechanism. In Phase A: Answerability-Guided Restoration (AGRes), the MLLM first assesses whether the current image provides sufficient information to answer the question. If restoration is needed, it identifies the degradation that most affects answerability and invokes the corresponding restoration tool to improve the document image. In Phase B: Comparison-Based Review, the Comparison-Based Rollback (CBRb) mechanism compares the restored image with the previous image to determine whether the operation improves the conditions for answering. Beneficial restorations are accepted for subsequent reasoning, while harmful ones are rolled back, and the corresponding tool is disabled. Both phases are performed by the MLLM without requiring an additional pretrained degradation classifier or image quality assessment model. Through this cycle, DocIntent selectively applies restoration to improve answerability while avoiding unnecessary or harmful preprocessing.
In summary, our contributions are as follows:
-
To the best of our knowledge, we are the first to explore the value of agentic restoration for document restoration and real-world degraded document VQA. We propose an Answerability-Guided Agentic Restoration framework that incorporates downstream question awareness into restoration planning.
-
We design a two-phase cyclic mechanism with Answerability-Guided Restoration and Comparison-Based Rollback, enabling MLLMs to selectively invoke document restoration tools and roll back harmful results without additional training, a pretrained degradation classifier, or an image quality assessment model. A standardized tool interface also supports the integration of stronger restoration models in the future.
-
Extensive experiments on the WildDoc (Wang et al., 2025a) benchmark demonstrate that DocIntent consistently improves models' question-answering performance on degraded documents across different capability levels and achieves results close to human expert preprocessing.
2.1 Document Visual Question Answering
Visual Question Answering (VQA) on document-related data (Mathew et al., 2021; Nandi et al., 2026) requires models to answer questions about document images by understanding the text, images, and layout. Early methods (Xu et al., 2021; Huang et al., 2022; Appalaraju et al., 2024; Zhu et al., 2025) adopted OCR-based pipelines, extracting textual and layout information (Zhang et al., 2025b) through OCR systems before answering questions. Subsequent end-to-end approaches (Kim et al., 2021; Zhang and Zhang, 2025; Souibgui et al., 2025) eliminated the OCR module, directly learning document representations through visual encoders. With the rise of MLLMs (Qwen Team, 2026a; Wang et al., 2025b; Team et al., 2023; Hurst et al., 2024; Anthropic, 2025; Bytedance Seed Team, 2025), general-purpose MLLMs have demonstrated strong performance in document understanding tasks. Specialized document-understanding MLLMs (Hu et al.,

PHASE B: Comparison-Based Review
Figure 2: Overview of the DocIntent framework with two-phase cyclic mechanism: Phase A (Answerability-Guided Restoration) and Phase B (Comparison-Based Review). The figure illustrates an example where deshadowing triggers rollback (bottom-left), while appearance enhancement succeeds and continues (bottom-right).
2025; Li et al., 2024b; Huang et al., 2024; Zhao et al., 2024; Yu et al., 2025) have also achieved significant results on standard benchmarks (Mathew et al., 2021; Masry et al., 2022; Kim et al., 2024; Mathew et al., 2022). Uni-DocRobust (Zhou et al.) improves robustness through feature restoration, whereas DocIntent selectively invokes image restoration tools based on question answerability.
However, existing MLLMs exhibit significant performance degradation on real-world document question answering (Wang et al., 2025a). Real-world degradations severely impair MLLMs' ability to perceive and understand document content. To address this challenge, we propose DocIntent, a training-free answerability-guided document restoration framework. DocIntent leverages MLLMs' inherent degradation recognition capability and employs a selective restoration strategy to enhance their document-question-answering performance under real-world degradation scenarios.
2.2 Agentic Image Restoration
In the field of image restoration, Restore-Agent (Chen et al., 2024) pioneered the agentic
image restoration paradigm, using task-specific trained models (Zamir et al., 2022) to restore images of natural scenes with multiple degradations. Existing agentic image restoration frameworks (Zhu et al., 2024; Chen et al., 2024; Li et al., 2025; Zhou et al., 2025; Zuo et al., 2025; Zhang et al., 2026b) primarily focus on natural images and pursue optimal quality. AgenticIR (Zhu et al., 2024) uses a fine-tuned vision model for degradation recognition and quality assessment, while 4KAgent (Zuo et al., 2025) combines multiple image quality assessment models to plan and validate restoration results. In contrast, document image restoration is intended to serve specific downstream tasks rather than pursue the highest image quality. Different models and questions also exhibit varying sensitivities to degradations. Therefore, our approach does not rely on a specialized degradation classifier or image quality assessment model and requires no additional training. Instead, it enables MLLMs to adaptively assess whether the current image quality hinders answering the specific question at hand. Meanwhile, the emergence of multi-task document restoration models (Zhang et al.,

Figure 3: Cases where models fail on degraded images but succeed with DocIntent. Left two columns: Qwen3.5-9B (Qwen Team, 2026a). Right two columns: Gemini-3.1-Pro (Google DeepMind, 2026).
2024; Yang et al., 2025; Zhao et al., 2025; Peng et al., 2024; Zhang et al., 2026a) provides strong support for the use of restoration tools.
Based on these observations, we propose DocIntent, an answerability-guided document image restoration framework. DocIntent adopts a selective restoration strategy, processing degradations that affect downstream tasks, and decides whether to accept restoration results through a comparison-based rollback mechanism, ensuring task performance while avoiding unnecessary processing overhead and risk of text quality degradation.
3 Method
We first introduce the DocIntent framework, including three core modules: Answerability-Guided Analysis, Tool Execution, and Comparison-Based Rollback (Sec. 3.1). We then detail the complete two-phase cyclic workflow, demonstrating how these modules collaborate to achieve answerability-guided selective restoration while preventing quality degradation (Sec. 3.2).
3.1 DocIntent Framework
Question answering on degraded document images involves several practical challenges, including determining whether restoration is needed, selecting appropriate restoration tools, and avoiding perfor-
mance degradation caused by unsuitable restoration. To address these issues, DocIntent is designed with three core modules: Answerability-Guided Analysis, Tool Execution, and Comparison-Based Rollback, as shown in Figure 2.
Answerability-guided analysis. The MLLM first analyzes the image in conjunction with the question to determine whether the question can be answered directly from the current image. If so, it generates the answer directly without triggering restoration. Otherwise, the MLLM identifies which degradations prevent it from answering and selects the most severe one whose corresponding tool is available for restoration. Unlike traditional methods (Zhu et al., 2024; Chen et al., 2024; Li et al., 2025; Zhou et al., 2025) that pursue the highest image quality, our approach triggers restoration only when degradation hinders answering. As illustrated in Figure 4, when degradations do not affect task-critical regions, questions can be correctly answered without any restoration, making blind restoration unnecessary and potentially harmful. This selective restoration approach reduces computational cost while minimizing the risk of text distortion or blurring by avoiding unnecessary restoration operations.
Tool execution. Once the MLLM identifies degradation types that hinder question answering and selects the most severe one whose tool is available, the system invokes the corresponding restoration tool to process the document image. We maintain an available tool list for MLLM selection. The initial tool list contains: deblurring, dewarping, deshadowing, appearance enhancement, demoiréing, 90° rotation, 180° rotation, and 270° rotation, which respectively target blur, warp, shadow, uneven illumination, moiré pattern, and orientation degradations. We design a standardized tool interface to support future extensions, enabling flexible replacement with more powerful restoration models or integration of new tools for emerging degradation types. Notably, our core contribution is leveraging restoration tools based on task requirements to enhance MLLMs' question answering on degraded documents, rather than improving existing restoration models.
Comparison-based rollback. Existing agentic restoration frameworks typically rely on fine-tuned degradation perception models or specialized image quality assessment models to evaluate restoration results and trigger rollback (Zhu et al., 2024; Zuo et al., 2025). To avoid additional training and dependence on these specialized models, we design Comparison-Based Rollback. This mechanism provides the MLLM with the current question and the images before and after restoration, allowing it to compare the readability of question-relevant evidence. When restoration distorts or blurs the relevant text and makes the question more difficult to answer, the system triggers rollback (see Figure 10). We accordingly determine that the tool cannot effectively address the degradation, disable it from the available tool list, and attempt to address other degradations. When restoration improves the readability of question-relevant evidence and facilitates answering, the system accepts and retains the restored result. As a training-free safeguard, this mechanism prevents harmful restoration results from accumulating across successive operations.
3.2 Workflow
DocIntent achieves answerability-guided document restoration through a two-phase cyclic mechanism. Given an input real-world document image and question, the system performs Answerability-Guided Restoration in Phase A, followed by Comparison-Based Review in Phase B. This iterat

Figure 4: Representative cases where questions can be correctly answered despite visible degradations. D denotes degradation type.
tive process continues until the MLLM determines that the current image is sufficient to answer the question or that all tools capable of addressing the degradations that hinder answering have been disabled, as illustrated in Figure 2.
The two phases coordinate to achieve selective restoration with a quality safeguard. In Phase A, the system determines whether restoration is needed. If the current image suffices for answering, the MLLM generates the answer directly. Otherwise, the system identifies the most severe degradation that hinders answering, invokes the corresponding tool, and proceeds to Phase B. In Phase B, the Comparison-Based Rollback mechanism evaluates the restoration outcome. If textual clarity improves and facilitates question answering, the system accepts the restoration. Otherwise, it triggers a rollback and disables the tool. After either outcome, the system returns to Phase A. Through this cyclic mechanism, DocIntent progressively improves document readability to facilitate question answering.
The design ensures two desirable properties: (1) minimality—only degradations that impair answerability are addressed, avoiding unnecessary processing. (2) safety—every restoration action is validated before being committed, preventing error accumulation across successive operations.
4 Experiments
4.1 Experimental Settings
Implementation details. All restoration tools are deployed on a single NVIDIA A6000 GPU: DocRes (Zhang et al., 2024) for deblurring, dewarping, deshadowing, and appearance enhancement, and UniDemoiré (Yang et al., 2025) for demoiréing (see Appendix I for tool selection discussions). Open-source MLLMs (e.g., Qwen3.5-9B) run on 4 NVIDIA A6000 GPUs, while closed-
| Model | WildDocVQA | WildChartQA | WildTableVQA | Average | ||||
|---|---|---|---|---|---|---|---|---|
| ANLS | Consistency | Acc. | Consistency | Acc. | Consistency | Score | Consistency | |
| MiniMonkey-2B (Huang et al., 2024) | 54.3 | 22.8 | 32.3 | 12.0 | 31.3 | 13.4 | 39.3 | 16.1 |
| Monkey (Li et al., 2024b) | 31.0 | 9.9 | 22.4 | 9.8 | 23.0 | 11.7 | 25.5 | 10.5 |
| TextHarmony (Zhao et al., 2024) | 37.1 | 16.0 | 21.9 | 10.2 | 14.7 | 6.5 | 24.6 | 10.9 |
| Llava-Onevision-7B (Li et al., 2024a) | 52.9 | 23.7 | 49.4 | 20.2 | 33.9 | 13.3 | 45.4 | 19.1 |
| mPLUG-DocOwl2 (Hu et al., 2025) | 44.2 | 19.2 | 23.3 | 11.6 | 22.1 | 4.8 | 29.9 | 11.9 |
| MiniCPM-V4.5 (Yu et al., 2025) | 73.1 | 53.2 | 58.9 | 42.4 | 56.8 | 22.4 | 62.9 | 39.3 |
| InternVL3.5-8B (Wang et al., 2025b) | 56.1 | 28.0 | 48.3 | 26.8 | 43.2 | 12.8 | 49.2 | 22.5 |
| InternVL3.5-38B (Wang et al., 2025b) | 66.8 | 42.0 | 60.5 | 37.6 | 51.9 | 18.8 | 59.7 | 32.8 |
| Qwen3.5-9B (Qwen Team, 2026a) | 82.5 | 70.8 | 51.9 | 33.2 | 71.1 | 45.2 | 68.5 | 49.7 |
| Qwen3.5-27B (Qwen Team, 2026a) | 83.3 | 72.8 | 53.2 | 43.6 | 76.6 | 49.2 | 71.0 | 55.2 |
| Qwen3.6-27B (Qwen Team, 2026b) | 82.9 | 72.4 | 60.3 | 46.0 | 77.8 | 53.2 | 73.7 | 57.2 |
| Closed-source MLLMs | ||||||||
| GPT-4o (Hurst et al., 2024) | 63.2 | 41.6 | 31.9 | 23.2 | 59.6 | 30.8 | 51.6 | 31.9 |
| Qwen3.5-Plus (Qwen Team, 2026a) | 84.4 | 77.0 | 62.5 | 52.4 | 81.5 | 59.6 | 76.1 | 63.0 |
| Claude Sonnet 4.6 (Anthropic, 2025) | 63.4 | 38.4 | 50.0 | 31.6 | 59.1 | 21.6 | 57.5 | 30.5 |
| Gemini-3.1-Pro (Google DeepMind, 2026) | 92.8 | 88.0 | 66.7 | 59.6 | 89.5 | 78.8 | 83.0 | 75.5 |
| Doubao-2.0-Pro (Bytedance Seed Team, 2025) | 82.7 | 72.8 | 62.3 | 52.0 | 84.6 | 65.6 | 76.5 | 63.5 |
| GPT-5.2 (Singh et al., 2025) | 66.1 | 37.6 | 58.3 | 44.8 | 64.2 | 33.6 | 62.9 | 38.7 |
| DocIntent(Qwen3.5-9B) | 85.4 +2.9 | 76.4 +5.6 | 53.6 +1.7 | 42.0 +8.8 | 75.7 +4.6 | 48.4 +3.2 | 71.6 +3.1 | 55.6 +5.9 |
| DocIntent(Gemini-3.1-Pro) | 94.1 +1.3 | 91.6 +3.6 | 67.7 +1.0 | 63.6 +4.0 | 91.2 +1.7 | 84.8 +6.0 | 84.3 +1.3 | 80.0 +4.5 |
Table 1: Evaluation on the WildDoc (Wang et al., 2025a) benchmark. "ANLS" denotes Average Normalized Levenshtein Similarity. Top results are bolded and second-best underlined.
source MLLMs are accessed via official APIs. Task-specific prompts for the three WildDoc sub-tasks are in Appendix M. We retain text context (tool decisions and quality assessments) and only the previous image. Context management comparisons and preprocessing and decoding settings are in Appendices E and F, respectively.
Datasets. We adopt WildDoc (Wang et al., 2025a) as our evaluation benchmark. To the best of our knowledge, at the time of our evaluation, WildDoc was the only publicly available benchmark specifically designed for document VQA under real-world capture degradations. It contains three subtasks: WildDocVQA, WildChartQA, and WildTableVQA, covering degradations such as blur, shadow, geometric distortion, moiré patterns, uneven illumination, and rotation. Each question corresponds to images captured under four real-world conditions, enabling evaluation of question-answering performance and consistency across degradations.
Metrics. Following WildDoc (Wang et al., 2025a), we use Average Normalized Levenshtein Similarity (ANLS) for WildDocVQA, Accuracy (Acc.) for WildChartQA and WildTableVQA, and Consistency (Cons.) for robustness across degradation scenarios. See Appendix A for definitions.
4.2 Main Results
We evaluate DocIntent on WildDoc with Qwen3.5-9B (Qwen Team, 2026a) and Gemini-3.1-Pro (Google DeepMind, 2026) as backbone models. Table 1 compares it with a range of open- and closed-source MLLMs.
Among baseline models, we observe a common phenomenon: models' consistency scores are substantially lower than their average score, reflecting their lack of robustness when dealing with different degradation conditions. This score-consistency gap is pervasive across models of varying capabilities. For example, Claude Sonnet 4.6 achieves a 57.5% average score but only 30.5% consistency, a 27.0 percentage-point gap. Even the best-performing Gemini-3.1-Pro shows a 7.5 percentage-point gap (83.0% vs 75.5%). This widespread phenomenon indicates the fundamental challenge of maintaining stable performance across diverse real-world degradation scenarios.
DocIntent achieves consistent improvements on both backbone models. When applied to Gemini-3.1-Pro, the average score improves from 83.0% to 84.3%. When applied to Qwen3.5-9B, the average score improves from 68.5% to 71.6%. Notably, DocIntent demonstrates greater improvements in consistency, with gains of 4.5 points (75.5% → 80.0%) on Gemini-3.1-Pro and 5.9 points (49.7% → 55.6%) on Qwen3.5-9B. These consistency improvements narrow the score-consistency gap, demonstrating that DocIntent not only improves

Figure 5: Comparison of restoration strategies. Pipeline blindly applies all tools, MLLM-Judge applies tools to address MLLM-identified degradations, Human Expert uses manually selected tools, and DocIntent performs answerability-guided selective restoration. See Section 4.3 for detailed definitions.
question-answering performance on degraded documents but also enhances answer stability across diverse degradation scenarios. Figure 3 presents cases where DocIntent enables correct answers on degraded images.
4.3 Comparisons with Other Strategies
Following AgenticIR's evaluation of random tool invocation (Zhu et al., 2024), we design two restoration baselines, Pipeline and MLLM-Judge. Pipeline applies all image restoration tools sequentially without degradation assessment. MLLM-Judge first uses the MLLM to identify degradations in the image and then invokes the corresponding restoration tools. For both strategies, we test random and fixed tool orders. Random shuffles the tools, whereas fixed follows the sequence of orientation correction, dewarping, demoiréing, deblurring, deshadowing, and appearance enhancement.
Pipeline excludes orientation correction because it requires MLLM judgment. The Human Expert strategy involves 40 experts with document restoration experience who identify degradations and select tools to optimize overall document readability without access to the corresponding questions. For Human Expert (Question-aware), experts locate question-relevant evidence and select tools to improve its readability, while skipping restoration when the evidence is already clearly visible. Unlike DocIntent, all comparison strategies answer directly from the preprocessed images without Comparison-Based Rollback.
As shown in Table 2, the Pipeline strategy blindly invokes all tools, causing severe information corruption and substantial performance degradation. The MLLM-Judge strategy reduces tool invocations to an average of 2.78 and 2.47 invocations but exhibits performance instability. This is
| Model | Method | Avg. Tools | Avg. Score | Avg. Cons. |
|---|---|---|---|---|
| Qwen3.5-9B | No restoration | 0.00 | 68.5 | 49.7 |
| Pipeline-random | 5.00 | 63.2 | 45.7 | |
| Pipeline-fixed | 5.00 | 63.5 | 47.6 | |
| MLLM-Judge-random | 2.78 | 67.7 | 48.8 | |
| MLLM-Judge-fixed | 2.78 | 68.5 | 50.7 | |
| Human Expert | 2.35 | 71.8 | 56.3 | |
| Human Expert (Question-aware) | 1.55 | 72.2 | 57.1 | |
| DocIntent (Ours) | 1.69 | 71.6 | 55.6 | |
| Gemini-3.1-Pro | No restoration | 0.00 | 83.0 | 75.5 |
| Pipeline-random | 5.00 | 79.0 | 68.9 | |
| Pipeline-fixed | 5.00 | 79.5 | 69.3 | |
| MLLM-Judge-random | 2.47 | 82.9 | 75.3 | |
| MLLM-Judge-fixed | 2.47 | 83.1 | 75.2 | |
| Human Expert | 2.35 | 84.0 | 79.7 | |
| Human Expert (Question-aware) | 1.55 | 84.5 | 80.4 | |
| DocIntent (Ours) | 1.16 | 84.3 | 80.0 |
Table 2: Comparison of different restoration strategies on WildDoc benchmark. "Avg." indicates the average results across all three subtasks. Top results are bolded and second-best underlined. Complete results for each subtask are provided in Appendix H.
partly due to MLLM misjudgments that may trigger inappropriate tool usage. The fixed sequence and random ordering show only marginal differences, indicating that tool sequencing is not the key limitation. Moreover, even with the comprehensive restoration strategy planned by human experts, restoration tools themselves may introduce text distortion, potentially causing information loss or readability degradation. The absence of a rollback mechanism prevents these errors from being corrected. Both MLLM-Judge and the question-agnostic Human Expert baseline restore all identified degradations, thereby accumulating risks from restoration operations, as illustrated in Figure 5.
The results show that incorporating question awareness helps human experts reduce tool invocations while improving document VQA performance, validating the importance of integrating downstream questions into restoration planning. Without human intervention, DocIntent achieves results close to question-aware human expert preprocessing on both models, demonstrating its potential to automate selective document restoration.
4.4 Ablation Study
We analyze the effectiveness of each core component in DocIntent through ablation experiments. As shown in Table 3, the Prompt-only setting, which enables the Answerability-Guided Prompt while disabling restoration tools and rollback, fails to improve the VQA score and slightly degrades the performance of Qwen3.5-9B. This result shows that more detailed prompting alone cannot explain DocIntent's gains, which primarily come from the selective invocation of restoration tools through
| Model | AG Prompt | AGRes. | CBRb. | Avg. Score | Avg. Cons. |
|---|---|---|---|---|---|
| Qwen3.5-9B | ✗ | ✗ | ✗ | 68.5 | 49.7 |
| ✓ | ✗ | ✗ | 67.8 | 49.2 | |
| ✓ | ✓ | ✗ | 69.2 | 50.5 | |
| ✓ | ✓ | ✓ | 71.6 | 55.6 | |
| Gemini-3.1-Pro | ✗ | ✗ | ✗ | 83.0 | 75.5 |
| ✓ | ✗ | ✗ | 82.9 | 75.7 | |
| ✓ | ✓ | ✗ | 83.7 | 78.4 | |
| ✓ | ✓ | ✓ | 84.3 | 80.0 |
Table 3: Ablation study on DocIntent components on WildDoc benchmark. "AG Prompt" denotes answerability-guided prompting. The Prompt-only setting enables AG Prompt while disabling AGRes and CBRb. "Avg." indicates the average results across all three subtasks. Complete results for each subtask are provided in Appendix H.
Answerability-Guided Restoration (AGRes). With AGRes, the average score and consistency of Gemini-3.1-Pro improve from 83.0% and 75.5% to 83.7% and 78.4%, respectively. Adding the Comparison-Based Rollback module (CBRb) further improves them to 84.3% and 80.0%. On Qwen3.5-9B, AGRes brings modest gains, while the complete DocIntent improves the average score and consistency to 71.6% and 55.6%, respectively.
These results demonstrate the effectiveness of both components. For the more capable Gemini-3.1-Pro, AGRes provides effective restoration decisions and brings stable improvements, while CBRb further provides a quality safeguard. For the less capable Qwen3.5-9B, AGRes brings limited gains, making CBRb more critical. CBRb promptly identifies and rolls back inappropriate restorations through quality comparison (Figure 6), bringing greater performance gains to weaker models. These results validate the complete system design: answerability-guided restoration provides selective processing capability, the rollback mechanism provides a quality safeguard, and their synergy achieves stable improvements across models of different capability levels.
5 Conclusion
In this paper, we demonstrate that beyond the quality of restoration tools, the critical factor for document restoration in VQA is the intelligence of the orchestration strategy: determining when to restore, which tool to use, and whether to accept the results. Answerability-guided selective restoration is essential for performance improvement. Based on these insights, we present DocIntent, a training-free document restoration framework that achieves selective restoration with a quality safeguard through a two-phase cyclic mechanism. Extensive experiments demonstrate that our method improves models' question-answering performance on degraded documents through efficient tool utilization.
Limitations
While our approach efficiently utilizes restoration tools to assist MLLMs in document question answering on degraded images, the system's performance is fundamentally limited by the capabilities of the underlying restoration tools. Additionally, as a training-free agentic framework, the system's judgment capability depends on the intrinsic abilities of the underlying MLLM.
Ethical Considerations
This research poses no significant ethical risks. All experiments are conducted on publicly available open-source datasets, without involving any personally identifiable information or sensitive content. This work only restores degraded documents and does not involve content tampering or forgery, ensuring no additional ethical concerns.
References
Anthropic. 2025. Claude Sonnet 4.6. Accessed: 2026-04-14.
Srikar Appalaraju, Peng Tang, Qi Dong, Nishant Sankaran, Yichu Zhou, and R Manmatha. 2024. DocFormerv2: Local features for document understanding. In Proceedings of the AAAI conference on artificial intelligence, volume 38, pages 709–718.
Bytedance Seed Team. 2025. Seed 2.0 model card: Towards intelligence frontier for real-world complexity. Accessed: 2026-05-09.
Haoyu Chen, Wenbo Li, Jinjin Gu, Jingjing Ren, Sixi-ang Chen, Tian Ye, Renjing Pei, Kaiwen Zhou, Fenglong Song, and Lei Zhu. 2024. RestoreAgent: Autonomous image restoration agent via multimodal large language models. Advances in Neural Information Processing Systems, 37:110643–110666.
Giordano Cicchetti and Danilo Comminiello. 2024. NAF-DPM: A nonlinear activation-free diffusion probabilistic model for document enhancement. arXiv preprint arXiv:2404.05669.
Hao Feng, Yuechen Wang, Wengang Zhou, Jiajun Deng, and Houqiang Li. 2021. DocTR: Document image transformer for geometric unwarping and illumination correction. arXiv preprint arXiv:2110.12942.
Google DeepMind. 2026. Gemini 3.1 pro. https://deepmind.google/models/gemini/pro/. Accessed: 2026-05-09.
Anwen Hu, Haiyang Xu, Liang Zhang, Jiabo Ye, Ming Yan, Ji Zhang, Qin Jin, Fei Huang, and Jingren Zhou. 2025. mPLUG-DocOwl2: High-resolution compressing for OCR-free multi-page document understanding. In Proceedings of the 63rd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 5817–5834.
Mingxin Huang, Yuliang Liu, Dingkang Liang, Lianwen Jin, and Xiang Bai. 2024. Mini-monkey: Alleviating the semantic sawtooth effect for lightweight mlms via complementary image pyramid. arXiv preprint arXiv:2408.02034.
Yupan Huang, Tengchao Lv, Lei Cui, Yutong Lu, and Furu Wei. 2022. Layoutlmv3: Pre-training for document ai with unified text and image masking. In Proceedings of the 30th ACM international conference on multimedia, pages 4083–4091.
Aaron Hurst, Adam Lerer, Adam P Goucher, Adam Perelman, Aditya Ramesh, Aidan Clark, AJ Ostrow, Akila Welihinda, Alan Hayes, Alec Radford, and 1 others. 2024. GPT-4o system card. arXiv preprint arXiv:2410.21276.
Guillaume Jaume, Hazim Kemal Ekenel, and Jean-Philippe Thiran. 2019. Funsd: A dataset for form understanding in noisy scanned documents. arXiv preprint arXiv:1905.13538.
Geewook Kim, Teakgyu Hong, Moonbin Yim, Jinyoung Park, Jinyeong Yim, Wonseok Hwang, Sangdoo Yun, Dongyoon Han, and Seunghyun Park. 2021. Donut: Document understanding transformer without OCR. arXiv preprint arXiv:2111.15664, 7(15):2.
Yoonsik Kim, Moonbin Yim, and Ka Yeon Song. 2024. TableVQA-Bench: A visual question answering benchmark on multiple table domains. arXiv preprint arXiv:2404.19205.
Bingchen Li, Xin Li, Yiting Lu, and Zhibo Chen. 2025. Hybrid agents for image restoration. arXiv preprint arXiv:2503.10120.
Bo Li, Yuanhan Zhang, Dong Guo, Renrui Zhang, Feng Li, Hao Zhang, Kaichen Zhang, Peiyuan Zhang, Yanwei Li, Ziwei Liu, and 1 others. 2024a. Llava-onevision: Easy visual task transfer. arXiv preprint arXiv:2408.03326.
Zhang Li, Biao Yang, Qiang Liu, Zhiyin Ma, Shuo Zhang, Jingxu Yang, Yabo Sun, Yuliang Liu, and Xiang Bai. 2024b. Monkey: Image resolution and text label are important things for large multi-modal models. In proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pages 26763–26773.
Ahmed Masry, Xuan Long Do, Jia Qing Tan, Shafiq Joty, and Enamul Hoque. 2022. ChartQA: A benchmark for question answering about charts with visual and logical reasoning. In Findings of the association for computational linguistics: ACL 2022, pages 2263–2279.
Minesh Mathew, Viraj Bagal, Rubèn Tito, Dimosthenis Karatzas, Ernest Valveny, and CV Jawahar. 2022. InfographicVQA. In Proceedings of the IEEE/CVF Winter Conference on Applications of Computer Vision, pages 1697–1706.
Minesh Mathew, Dimosthenis Karatzas, and CV Jawahar. 2021. DocVQA: A dataset for vqa on document images. In Proceedings of the IEEE/CVF winter conference on applications of computer vision, pages 2200–2209.
Kalyan Nandi, S Siva Sathya, and 1 others. 2026. Document visual question answering: A comprehensive analysis of methods, datasets, and challenges. In 2026 9th International Conference on Computational Intelligence in Data Science (ICCIDS), pages 1–6. IEEE.
Seunghyun Park, Seung Shin, Bado Lee, Junyeop Lee, Jaeheung Surh, Minjoon Seo, and Hwalsuk Lee. 2019. Cord: a consolidated receipt dataset for post-OCR parsing. In Workshop on document intelligence at NeurIPS, volume 2019, page 5.
Dezhi Peng, Zhenhua Yang, Jiaxin Zhang, Chongyu Liu, Yongxin Shi, Kai Ding, Fengjun Guo, and Lianwen Jin. 2024. UPOCR: Towards unified pixel-level OCR interface. In Forty-first International Conference on Machine Learning.
Qwen Team. 2026a. Qwen3.5: Towards native multi-modal agents.
Qwen Team. 2026b. Qwen3.6-27B: Flagship-level coding in a 27B dense model.
Aaditya Singh, Adam Fry, Adam Perelman, Adam Tart, Adi Ganesh, Ahmed El-Kishky, Aidan McLaughlin, Aiden Low, AJ Ostrow, Akhila Ananthram, and 1 others. 2025. Openai GPT-5 system card. arXiv preprint arXiv:2601.03267.
Mohamed Ali Souibgui, Changkyu Choi, Andrey Barsky, Kangsoo Jung, Ernest Valveny, and Dimosthenis Karatzas. 2025. DocVXQA: Context-aware visual explanations for document question answering. arXiv preprint arXiv:2505.07496.
Gemini Team, Rohan Anil, Sebastian Borgeaud, Jean-Baptiste Alayrac, Jiahui Yu, Radu Soricut, Johan Schalkwyk, Andrew M Dai, Anja Hauth, Katie Millican, and 1 others. 2023. Gemini: a family of highly capable multimodal models. arXiv preprint arXiv:2312.11805.
Qwen Team. 2025. Qwen2.5-vl.
An-Lan Wang, Jingqun Tang, Lei Liao, Hao Feng, Qi Liu, Xiang Fei, Jinghui Lu, Han Wang, Hao Liu, Yuliang Liu, and 1 others. 2025a. WildDoc: How far are we from achieving comprehensive and robust document understanding in the wild? In Proceedings of the 2025 Conference on Empirical Methods in Natural Language Processing, pages 23002–23012.
Weiyun Wang, Zhangwei Gao, Lixin Gu, Hengjun Pu, Long Cui, Xingguang Wei, Zhaoyang Liu, Linglin Jing, Shenglong Ye, Jie Shao, and 1 others. 2025b. Internv13.5: Advancing open-source multimodal models in versatility, reasoning, and efficiency. arXiv preprint arXiv:2508.18265.
Zhou Wang, Alan C Bovik, Hamid R Sheikh, and Eero P Simoncelli. 2004. Image quality assessment: from error visibility to structural similarity. IEEE transactions on image processing, 13(4):600–612.
Yang Xu, Yiheng Xu, Tengchao Lv, Lei Cui, Furu Wei, Guoxin Wang, Yijuan Lu, Dinei Florencio, Cha Zhang, Wanxiang Che, and 1 others. 2021. Layoutlmv2: Multi-modal pre-training for visually-rich document understanding. In Proceedings of the 59th Annual Meeting of the Association for Computational Linguistics and the 11th International Joint Conference on Natural Language Processing (Volume 1: Long Papers), pages 2579–2591.
Zemin Yang, Yujing Sun, Xidong Peng, Siu Ming Yiu, and Yuexin Ma. 2025. UniDemoire: Towards universal image demoiréing with data generation and synthesis. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 39, pages 9354–9362.
Tianyu Yu, Zefan Wang, Chongyi Wang, Fuwei Huang, Wenshuo Ma, Zhihui He, Tianchi Cai, Weize Chen, Yuxiang Huang, Yuanqian Zhao, Bokai Xu, Junbo Cui, Yingjing Xu, Liqing Ruan, Luoyuan Zhang, Hanyu Liu, Jingkun Tang, Hongyuan Liu, Qining Guo, and 15 others. 2025. MiniCPM-V 4.5: Cooking efficient mlmlms via architecture, data, and training recipe. Preprint, arXiv:2509.18154.
Syed Waqas Zamir, Aditya Arora, Salman Khan, Munawar Hayat, Fahad Shahbaz Khan, and Ming-Hsuan Yang. 2022. Restormer: Efficient transformer for high-resolution image restoration. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pages 5728–5739.
Jiaxin Zhang, Dezhi Peng, Chongyu Liu, Peirong Zhang, and Lianwen Jin. 2024. DocRes: A generalist model toward unifying document image restoration tasks. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 15654–15664.
Jiaxin Zhang, Peirong Zhang, Huiyi Cheng, Xinhong Chen, Haowei Xu, Kai Ding, and Lianwen Jin. 2026a. DocAligner: Automating the Annotation of Photographed Documents through Real-Virtual Alignment. Pattern Recognition, 171:112191.
Jinxu Zhang and Yu Zhang. 2025. DocRouter: Prompt guided vision transformer and mixture of experts connector for document understanding. Information Fusion, 122:103206.
Ling Zhang, Yinghao He, Qing Zhang, Zheng Liu, Xiaolong Zhang, and Chunxia Xiao. 2023. Document image shadow removal guided by color-aware background. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 1818–1827.
Peirong Zhang, Haowei Xu, Jiaxin Zhang, Xuhan Zheng, Guitao Xu, Yuyi Zhang, Junle Liu, Zhenhua Yang, Wei Zhou, and Lianwen Jin. 2025a. OCR-GenBench: A Comprehensive Benchmark for Evaluating OCR Generative Capabilities. arXiv preprint arXiv:2507.15085.
Peirong Zhang, Jiaxin Zhang, Jiahuan Cao, Hongliang Li, and Lianwen Jin. 2025b. Smaller But Better: Unifying Layout Generation with Smaller Large Language Models. International Journal of Computer Vision, 133:3891–3917.
Yisheng Zhang, Guoli Jia, Haote Hu, Shanxu Zhao, Kaiakai Zhao, Long Sun, Xinwei Long, Kai Tian, Che Jiang, Zhaoxiang Liu, and 1 others. 2026b. Tir-agent: Training an explorative and efficient agent for image restoration. arXiv preprint arXiv:2603.27742.
Fangmin Zhao, Weichao Zeng, Zhenhang Li, Dongbao Yang, Binbin Li, Xiaojun Bi, and Yu Zhou. 2025. Uni-DocDiff: A unified document restoration model based on diffusion. In Proceedings of the 33rd ACM International Conference on Multimedia, pages 8204–8213.
Zhen Zhao, Jingqun Tang, Binghong Wu, Chunhui Lin, Shu Wei, Hao Liu, Xin Tan, Zhizhong Zhang, Can Huang, and Yuan Xie. 2024. Harmonizing visual text comprehension and generation. Advances in Neural Information Processing Systems, 37:97499–97522.
Yingjie Zhou, Jiezhang Cao, Zicheng Zhang, Farong Wen, Yanwei Jiang, Jun Jia, Xiaohong Liu, Xiongkuo Min, and Guangtao Zhai. 2025. Q-Agent: quality-driven chain-of-thought image restoration agent through robust multimodal large language model. arXiv preprint arXiv:2504.07148.
Yuxuan Zhou, Baole Wei, Xingjian Hu, Haowei Chen, Yu Li, Xingyue Lin, Liangcai Gao, and Zhi Tang. Uni-docrobust: Universal plug-and-play robustness enhancement for multi-modal llms via feature restoration. In Forty-third International Conference on Machine Learning.
Kaiwen Zhu, Jinjin Gu, Zhiyuan You, Yu Qiao, and Chao Dong. 2024. An intelligent agentic system for complex image restoration problems. arXiv preprint arXiv:2410.17809.
Zhaoqing Zhu, Chuwei Luo, Zirui Shao, Feiyu Gao, Hangdi Xing, Qi Zheng, and Ji Zhang. 2025. A simple yet effective layout token in large language models for document understanding. In Proceedings of the Computer Vision and Pattern Recognition Conference, pages 14472–14482.
Yushen Zuo, Qi Zheng, Mingyang Wu, Xinrui Jiang, Renjie Li, Jian Wang, Yide Zhang, Gengchen Mai, Li-hong V Wang, James Zou, and 1 others. 2025. 4KA-gent: agentic any image to 4k super-resolution. arXiv preprint arXiv:2507.07105.
Appendix
A Evaluation Metrics
We provide detailed definitions of the evaluation metrics used in our experiments.
The accuracy metric quantifies the proportion of questions where the predicted answer precisely corresponds with any of the designated target answers for that question.
For the Average Normalized Levenshtein Similarity (ANLS), we follow previous works (Mathew et al., 2021), which is defined as follows:
where is defined as when , the normalized Levenshtein distance, is less than a predefined threshold ; otherwise 0. We set the threshold , as previous works do (Mathew et al., 2021).
Following WildDoc (Wang et al., 2025a), we also report the consistency score, a robustness metric designed to assess the resilience of models when handling the same question across images captured under various conditions. This metric calculates the document-level accuracy. A model's response is considered accurate only if it correctly answers the question in all four distinct scenarios presented.
B Algorithm Workflow
Algorithm 1 describes the complete inference workflow of DocIntent. The functions Analyze, Select-Tool, Compare, and Answer are all implemented by the MLLM. In the Analyze function, the MLLM analyzes the current image and question to determine whether it can be directly answered. In the SelectTool function, the MLLM identifies degradation types that hinder answering and selects the tool corresponding to the most severe degradation from the available tool list. The Execute function invokes the actual restoration tools. In the Compare function, the MLLM compares the images before and after restoration with respect to the question to determine whether the restoration improves the readability of question-relevant evidence. In the Answer function, the MLLM generates the answer to the question based on the final image.
We set a maximum iteration count for the inference workflow to prevent the system from falling into excessive repetitive tool invocations in extreme
Algorithm 1 DocIntent Workflow
Require: Initial document image , Question , Maximum iterations
Ensure: Answer
1: tools ← ALL_TOOLS 2: for to do 3: can_answer ← Analyze() 4: if can_answer then 5: return Answer() 6: end if 7: tool ← SelectTool() 8: if tool is None then 9: return Answer() 10: end if 11: 12: is_improved ← Compare() 13: if not is_improved then 14: 15: tools ← tools \ {tool} 16: end if 17: end for 18: return Answer()
cases where the comparison-based rollback mechanism fails. In all experiments, we set , providing sufficient restoration redundancy for the system.
C Additional Experiments
To evaluate DocIntent across models with different capability levels, we conduct additional experiments on more MLLMs. As shown in Table 4, DocIntent achieves performance improvements across all tested models. These additional experiments cover the open-source model Qwen3.5-27B (Qwen Team, 2026a) and closed-source models including GPT-4o (Hurst et al., 2024), Qwen3.5-Plus (Qwen Team, 2026a), Claude Sonnet 4.6 (Anthropic, 2025), Doubao-2.0-Pro (Bytedance Seed Team, 2025), and GPT-5.2 (Singh et al., 2025), showing consistent improvements on the evaluated MLLMs.
D Analysis of Tool Invocation Decisions
Different MLLMs vary in their sensitivity to degradation types; tool invocation decisions should therefore be analyzed in the context of the particular model and downstream task. Table 6 uses direct answering for all categories and partitions samples into the Confident subset, which the model judges
| Model | WildDocVQA | WildChartQA | WildTableVQA | Average | |||||
|---|---|---|---|---|---|---|---|---|---|
| ANLS | Consistency | Acc. | Consistency | Acc. | Consistency | Score | Consistency | ||
| Qwen3.5-27B (Qwen Team, 2026a) | 83.3 | 72.8 | 53.2 | 43.6 | 76.6 | 49.2 | 71.0 | 55.2 | |
| w/ DocIntent | 84.1 +0.8 | 74.4 +1.6 | 54.9 +1.7 | 50.8 +7.2 | 86.3 +9.7 | 58.8 +9.6 | 75.1 +4.1 | 61.3 +6.1 | |
| GPT-4o (Hurst et al., 2024) | 63.2 | 41.6 | 31.9 | 23.2 | 59.6 | 30.8 | 51.6 | 31.9 | |
| w/ DocIntent | 73.7 +10.5 | 58.4 +16.8 | 35.8 +3.9 | 34.4 +11.2 | 64.2 +4.6 | 38.4 +7.6 | 57.9 +6.3 | 43.7 +11.8 | |
| Qwen3.5-Plus (Qwen Team, 2026a) | 84.4 | 77.0 | 62.5 | 52.4 | 81.5 | 59.6 | 76.1 | 63.0 | |
| w/ DocIntent | 91.0 +6.6 | 82.4 +5.4 | 67.9 +5.4 | 59.6 +7.2 | 86.1 +4.6 | 67.6 +8.0 | 81.7 +5.6 | 69.9 +6.9 | |
| Claude Sonnet 4.6 (Anthropic, 2025) | 63.4 | 38.4 | 50.0 | 31.6 | 59.1 | 21.6 | 57.5 | 30.5 | |
| w/ DocIntent | 71.9 +8.5 | 49.6 +11.2 | 57.0 +7.0 | 39.2 +7.6 | 70.3 +11.2 | 36.4 +14.8 | 66.4 +8.9 | 41.7 +11.2 | |
| Doubao-2.0-Pro (Bytedance Seed Team, 2025) | 82.7 | 72.8 | 62.3 | 52.0 | 84.6 | 65.6 | 76.5 | 63.5 | |
| w/ DocIntent | 83.0 +0.3 | 74.8 +2.0 | 67.4 +5.1 | 58.0 +6.0 | 84.9 +0.3 | 66.4 +0.8 | 78.4 +1.9 | 66.4 +2.9 | |
| GPT-5.2 (Singh et al., 2025) | 66.1 | 37.6 | 58.3 | 44.8 | 64.2 | 33.6 | 62.9 | 38.7 | |
| w/ DocIntent | 76.7 +10.6 | 52.8 +15.2 | 62.5 +4.2 | 48.8 +4.0 | 69.4 +5.2 | 41.6 +8.0 | 69.5 +6.6 | 47.7 +9.0 | |
Table 4: Performance of additional MLLMs w/ and w/o DocIntent on WildDoc benchmark (Wang et al., 2025a). "ANLS" denotes Average Normalized Levenshtein Similarity.
| Model | Context Strategy | WildDocVQA | WildChartQA | WildTableVQA | Average | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ANLS | Consistency | Tokens | Acc. | Consistency | Tokens | Acc. | Consistency | Tokens | Score | Consistency | Tokens | ||
| Qwen3.5-9B | No Context | 84.6 | 75.6 | 15880 | 40.7 | 32.8 | 29792 | 71.5 | 43.4 | 25826 | 65.6 | 50.6 | 23833 |
| Full Context | 86.1 | 76.0 | 27967 | 54.9 | 41.6 | 30735 | 73.5 | 46.0 | 29615 | 71.5 | 54.5 | 29439 | |
| Text-only (Ours) | 85.4 | 76.4 | 17967 | 53.6 | 42.0 | 19611 | 75.7 | 48.4 | 19518 | 71.6 | 55.6 | 19032 | |
| Gemini-3.1-Pro | No Context | 92.5 | 88.0 | 4904 | 61.6 | 56.4 | 5322 | 90.7 | 81.2 | 4322 | 81.6 | 75.2 | 4849 |
| Full Context | 94.0 | 92.0 | 7352 | 66.3 | 62.8 | 7625 | 92.4 | 85.7 | 7147 | 84.2 | 80.2 | 7375 | |
| Text-only (Ours) | 94.1 | 91.6 | 5817 | 67.7 | 63.6 | 6791 | 91.2 | 84.8 | 5711 | 84.3 | 80.0 | 6106 | |
Table 5: Comparison of different context management strategies. "ANLS" denotes Average Normalized Levenshtein Similarity. Within each model, top results are bolded and second-best underlined.
answerable directly, and the Forced subset, which the model judges require tool assistance. The Confident subset usually scores higher than the overall baseline, whereas the Forced subset scores lower, indicating that answerability judgments distinguish samples with different levels of direct-answering difficulty.
To further assess the downstream utility of tool invocation, Table 7 compares Direct Answer and DocIntent on each model's Forced subset. DocIntent obtains higher scores for all models and sub-tasks, showing that Answerability-Guided Restoration provides consistent aggregate gains on samples that are more difficult to answer directly. Together, the two tables show that DocIntent improves downstream VQA performance through selective restoration on samples judged to require tool assistance.
E Context Management Strategy
In agentic frameworks, context management strategies strongly affect system performance and efficiency. We explore three different context management approaches. The No Context strategy uses independent conversations for both Phase A and Phase B, retaining no historical context. The Full Context strategy retains all conversation history and intermediate restored images, providing complete reasoning history. The Text-only strategy, our approach, retains text context such as tool invocation decisions and quality assessment results but does not retain intermediate restored images. Table 5 presents the experimental results of the three strategies.
The experimental results reveal that while the No Context strategy can reduce token consumption, it leads to notable performance degradation. For example, Qwen3.5-9B achieves only 40.7% accuracy on WildChartQA under the No Context strategy, substantially lower than other strategies. We attribute this to the fact that historical context helps models make better judgments and complete tasks more effectively. Additionally, the No Context strategy may cause smaller models to misjudge during the Phase B quality comparison, leading to repeated invocations of the same tool and consequently increased token consumption. The Full Context strategy achieves high accuracy but incurs substantially higher token consumption. For instance, Qwen3.5-9B's average token consumption is 29439, 1.55 times that of the Text-only strategy. Furthermore, for less capable models, multiple images in long contexts can cause attention dispersion issues. In contrast, the Text-only strategy achieves an excellent balance between performance and ef-
| Model | Category | WildDocVQA ANLS | WildChartQA Acc. | WildTableVQA Acc. | Average Score |
|---|---|---|---|---|---|
| Qwen3.5-9B | Baseline | 82.5 | 51.9 | 71.1 | 68.5 |
| Confident | 84.6 +2.1 | 54.4 +2.5 | 83.7 +12.6 | 74.2 +5.7 | |
| Forced | 78.6 -3.9 | 48.8 -3.1 | 57.6 +3.5 | 61.7 -6.8 | |
| Gemini-3.1-Pro | Baseline | 92.8 | 66.7 | 89.5 | 83.0 |
| Confident | 95.6 +2.8 | 70.9 +4.2 | 91.1 +1.6 | 85.9 +2.9 | |
| Forced | 90.3 -2.5 | 60.7 -6.0 | 87.6 -1.9 | 79.5 -3.5 | |
| Qwen3.5-27B | Baseline | 83.3 | 53.2 | 76.6 | 71.0 |
| Confident | 90.0 +6.7 | 61.3 +8.1 | 83.2 +6.6 | 78.2 +7.2 | |
| Forced | 72.5 -10.8 | 41.6 -11.6 | 65.7 -10.9 | 59.9 -11.1 | |
| GPT-4o | Baseline | 63.2 | 31.9 | 59.6 | 51.6 |
| Confident | 86.3 +23.1 | 40.0 +8.1 | 79.7 +20.1 | 68.7 +17.1 | |
| Forced | 43.4 -19.8 | 26.7 -5.2 | 45.4 +14.2 | 38.5 -13.1 | |
| Qwen3.5-Plus | Baseline | 84.4 | 62.5 | 81.5 | 76.1 |
| Confident | 95.5 +11.1 | 65.5 +3.0 | 90.9 +9.4 | 84.0 +7.9 | |
| Forced | 73.4 -11.0 | 60.4 -2.1 | 74.3 -7.2 | 69.4 -6.7 | |
| Claude Sonnet 4.6 | Baseline | 63.4 | 50.0 | 59.1 | 57.5 |
| Confident | 85.8 +22.4 | 58.7 +8.7 | 77.1 +18.0 | 73.9 +16.4 | |
| Forced | 56.7 -6.7 | 37.7 -12.3 | 44.7 -14.4 | 46.4 -11.1 | |
| Doubao-2.0-Pro | Baseline | 82.7 | 62.3 | 84.6 | 76.5 |
| Confident | 87.0 +4.3 | 64.5 +2.2 | 87.5 +2.9 | 79.7 +3.2 | |
| Forced | 69.5 -13.2 | 56.1 -6.2 | 67.0 -17.6 | 64.2 -12.3 | |
| GPT-5.2 | Baseline | 66.1 | 58.3 | 64.2 | 62.9 |
| Confident | 87.3 +21.2 | 64.3 +6.0 | 78.7 +14.5 | 76.8 +13.9 | |
| Forced | 41.9 -24.2 | 50.2 -8.1 | 50.4 -13.8 | 47.5 -15.4 |
Table 6: Analysis of tool invocation decisions where all categories employ direct answering w/o DocIntent. "ANLS" denotes Average Normalized Levenshtein Similarity.
| Model | Method | WildDocVQA | WildChartQA | WildTableVQA | Average Score |
|---|---|---|---|---|---|
| ANLS | Acc. | Acc. | |||
| Qwen3.5-9B | Direct Answer | 78.6 | 48.8 | 57.6 | 61.7 |
| DocIntent | 86.9 +8.3 | 52.6 +3.8 | 67.1 +9.5 | 68.9 +7.2 | |
| Gemini-3.1-Pro | Direct Answer | 90.3 | 60.7 | 87.6 | 79.5 |
| DocIntent | 92.8 +2.5 | 63.1 +2.4 | 91.3 +3.7 | 82.4 +2.9 | |
| Qwen3.5-27B | Direct Answer | 72.5 | 41.6 | 65.7 | 59.9 |
| DocIntent | 74.6 +2.1 | 45.7 +4.1 | 91.4 +25.7 | 70.6 +10.7 | |
| GPT-4o | Direct Answer | 43.4 | 26.7 | 45.4 | 38.5 |
| DocIntent | 62.9 +19.5 | 33.1 +6.4 | 53.3 +7.9 | 49.8 +11.3 | |
| Qwen3.5-Plus | Direct Answer | 73.4 | 60.4 | 74.3 | 69.4 |
| DocIntent | 86.5 +13.1 | 69.6 +9.2 | 82.4 +8.1 | 79.5 +10.1 | |
| Claude Sonnet 4.6 | Direct Answer | 56.7 | 37.7 | 44.7 | 46.4 |
| DocIntent | 67.7 +11.0 | 54.6 +16.9 | 64.9 +20.2 | 62.4 +16.0 | |
| Doubao-2.0-Pro | Direct Answer | 69.5 | 56.1 | 67.0 | 64.2 |
| DocIntent | 70.7 +1.2 | 75.6 +19.5 | 69.1 +2.1 | 71.8 +7.6 | |
| GPT-5.2 | Direct Answer | 41.9 | 50.2 | 50.4 | 47.5 |
| DocIntent | 64.6 +22.7 | 60.1 +9.9 | 60.5 +10.1 | 61.7 +14.2 |
Table 7: Comparison on the Forced subset, where DocIntent decides to invoke restoration tools. "ANLS" denotes Average Normalized Levenshtein Similarity.
ficiency, attaining the best or near-best results on most metrics while effectively controlling token consumption. Based on these observations, we chose the Text-only strategy after weighing performance and efficiency, leveraging MLLMs' image understanding capabilities for accurate decisions based on current images while retaining text context to provide necessary historical experience and avoid repeated errors.
F Reproducibility Details
The system prompts and tool strategies were developed using samples outside the evaluation sets. These samples were used only to validate the end-to-end workflow and determine answer formats, without tuning based on evaluation results.

Figure 6: Rollback mechanism demonstration. Failed restoration triggers rollback and alternative attempt.
All document images are dynamically resized while preserving their original aspect ratios, with the longest edge capped at 2,048 pixels to avoid API payload limits and out-of-memory errors. For all evaluated open- and closed-source models, we set temperature=0.0. Where supported, we use top_p=1.0, frequency_penalty=0.0, and presence_penalty=0.0. The maximum output length is set to 4,096 tokens, while all other generation parameters retain their default values.
All restoration tools use their official open-source checkpoints and default inference scripts. We adapt each restoration model to DocIntent through the standardized tool interface described in Section 3.1.
G Cost Analysis
Table 14 reports the average token consumption of different models with and without DocIntent. The additional overhead mainly arises from answerability assessment and comparison between the images before and after restoration, which support selective restoration and Comparison-Based Rollback.
For closed-source MLLMs, Table 10 further reports the exact API versions, official input/output token prices at the time of evaluation, and DocIntent's average token usage and per-sample cost. For example, Gemini-3.1-Pro consumes an average of 5,033 input tokens and 1,073 output tokens, corresponding to approximately $0.0394 per sample.
The cost also depends on each model's tool invocation strategy. Doubao-2.0-Pro (Bytedance Seed Team, 2025) invokes tools 0.69 times per sample on average, whereas GPT-4o (Hurst et al., 2024) and GPT-5.2 (Singh et al., 2025) invoke tools approximately twice, indicating that model-specific decision preferences affect the final token consumption.
Overall, DocIntent trades additional inference
| Model | Method | Avg. Tools | WildDocVQA | WildChartQA | WildTableVQA | Average | ||||
|---|---|---|---|---|---|---|---|---|---|---|
| ANLS | Consistency | Acc. | Consistency | Acc. | Consistency | Score | Consistency | |||
| Qwen3.5-9B | No restoration | 0.00 | 82.5 | 70.8 | 51.9 | 33.2 | 71.1 | 45.2 | 68.5 | 49.7 |
| Pipeline-random | 5.00 | 78.2 | 62.4 | 51.4 | 32.8 | 60.0 | 42.0 | 63.2 | 45.7 | |
| Pipeline-fixed | 5.00 | 80.6 | 69.6 | 51.0 | 31.6 | 58.9 | 41.6 | 63.5 | 47.6 | |
| MLLM-Judge-random | 2.78 | 82.9 | 68.8 | 50.1 | 32.0 | 70.1 | 45.6 | 67.7 | 48.8 | |
| MLLM-Judge-fixed | 2.78 | 82.7 | 70.6 | 51.7 | 34.8 | 71.2 | 46.8 | 68.5 | 50.7 | |
| Human Expert | 2.35 | 85.7 | 75.6 | 53.6 | 43.2 | 76.2 | 50.0 | 71.8 | 56.3 | |
| Human Expert (Question-aware) | 1.55 | 86.3 | 76.8 | 53.5 | 43.6 | 76.9 | 50.8 | 72.2 | 57.1 | |
| DocIntent (Ours) | 1.69 | 85.4 | 76.4 | 53.6 | 42.0 | 75.7 | 48.4 | 71.6 | 55.6 | |
| Gemini-3.1-Pro | No restoration | 0.00 | 92.8 | 88.0 | 66.7 | 59.6 | 89.5 | 78.8 | 83.0 | 75.5 |
| Pipeline-random | 5.00 | 89.1 | 75.2 | 61.4 | 54.4 | 86.4 | 77.2 | 79.0 | 68.9 | |
| Pipeline-fixed | 5.00 | 89.7 | 77.2 | 61.7 | 54.0 | 87.0 | 76.8 | 79.5 | 69.3 | |
| MLLM-Judge-random | 2.47 | 92.7 | 87.2 | 65.4 | 57.2 | 90.6 | 81.6 | 82.9 | 75.3 | |
| MLLM-Judge-fixed | 2.47 | 92.2 | 86.4 | 66.2 | 57.6 | 90.9 | 81.6 | 83.1 | 75.2 | |
| Human Expert | 2.35 | 93.5 | 89.6 | 67.4 | 65.2 | 91.0 | 84.4 | 84.0 | 79.7 | |
| Human Expert (Question-aware) | 1.55 | 94.0 | 91.3 | 68.0 | 65.2 | 91.4 | 84.8 | 84.5 | 80.4 | |
| DocIntent (Ours) | 1.16 | 94.1 | 91.6 | 67.7 | 63.6 | 91.2 | 84.8 | 84.3 | 80.0 | |
Table 8: Complete results of restoration strategy comparison on WildDoc benchmark. "ANLS" denotes Average Normalized Levenshtein Similarity. "Avg. Tools" denotes the average number of tool invocations per sample. Top results are bolded and second-best underlined.
| Model | AG Prompt | AGRes. | CBRb. | WildDocVQA | WildChartQA | WildTableVQA | Average | ||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| ANLS | Consistency | Acc. | Consistency | Acc. | Consistency | Score | Consistency | ||||
| Qwen3.5-9B | ✕ | ✕ | ✕ | 82.5 | 70.8 | 51.9 | 33.2 | 71.1 | 45.2 | 68.5 | 49.7 |
| ✓ | ✕ | ✕ | 82.0 | 70.3 | 51.0 | 33.7 | 70.4 | 43.7 | 67.8 | 49.2 | |
| ✓ | ✓ | ✕ | 84.0 | 69.6 | 52.1 | 35.6 | 71.5 | 46.4 | 69.2 | 50.5 | |
| ✓ | ✓ | ✓ | 85.4 | 76.4 | 53.6 | 42.0 | 75.7 | 48.4 | 71.6 | 55.6 | |
| Gemini-3.1-Pro | ✕ | ✕ | ✕ | 92.8 | 88.0 | 66.7 | 59.6 | 89.5 | 78.8 | 83.0 | 75.5 |
| ✓ | ✕ | ✕ | 92.9 | 87.2 | 66.6 | 60.8 | 89.2 | 79.0 | 82.9 | 75.7 | |
| ✓ | ✓ | ✕ | 94.0 | 90.8 | 66.2 | 60.8 | 90.8 | 83.6 | 83.7 | 78.4 | |
| ✓ | ✓ | ✓ | 94.1 | 91.6 | 67.7 | 63.6 | 91.2 | 84.8 | 84.3 | 80.0 | |
Table 9: Complete results of ablation study on DocIntent components. "AG Prompt" denotes answerability-guided prompting. The Prompt-only setting enables AG Prompt while disabling AGRes and CBRb. "ANLS" denotes Average Normalized Levenshtein Similarity. Top results are bolded and second-best underlined.
cost for improvements in document VQA performance and consistency. In practical deployment, the backbone model can be selected according to the desired balance between performance and cost.
H Complete Experimental Results
This section provides the complete experimental results for both the strategy comparison (Table 8) and ablation study (Table 9). These tables present detailed performance metrics across all three sub-tasks of the WildDoc benchmark: WildDocVQA, WildChartQA, and WildTableVQA.
I Impact of Tool Selection
To analyze the impact of different tool choices on DocIntent, we conduct comparative experiments with two tool backend configurations. Group 1 employs DocRes (Zhang et al., 2024) for deblurring, dewarping, deshadowing, and appearance enhancement, combined with UniDemoiré (Yang et al., 2025) for demoiréing. Group 2 uses NAF-DPM (Cicchetti and Comminiello, 2024) for deblurring, BGShadowNet (Zhang et al., 2023) for deshadowing, DocRes (Zhang et al., 2024) for dewarping and appearance enhancement, and UniDemoiré (Yang et al., 2025) for demoiréing.
Table 11 presents the experimental results. For Qwen3.5-9B, Group 1 achieves a 71.6% average score and 55.6% consistency, while Group 2 obtains 70.9% and 54.4%. For Gemini-3.1-Pro, Group 1 achieves an 84.3% average score and 80.0% consistency, while Group 2 achieves 84.1% and 78.9%. The two configurations show similar performance levels across both models. These results indicate that DocIntent achieves effective performance improvements regardless of tool backend choices. The answerability-guided restoration strategy and comparison-based rollback mechanism can effectively coordinate different restoration tool combinations. Based on overall performance, we adopt the Group 1 configuration in our main experiments. Notably, our contribution lies in effectively
| Model | API Version | Price ($/1M, In/Out) | Avg. Tokens (In/Out) | Cost/Sample ($) |
|---|---|---|---|---|
| Gemini-3.1-Pro | gemini-3.1-pro-preview | 4.00/18.00 | 5,033/1,073 | 0.0394 |
| GPT-4o | gpt-4o-2024-08-06 | 2.50/10.00 | 12,004/2,468 | 0.0547 |
| GPT-5.2 | gpt-5.2-2025-12-11 | 1.75/14.00 | 16,758/2,444 | 0.0635 |
| Claude Sonnet 4.6 | claude-sonnet-4-6 | 5.00/25.00 | 11,124/1,504 | 0.0932 |
| Qwen3.5-Plus | qwen3.5-plus-2026-02-15 | 0.57/3.43 | 16,814/2,220 | 0.0172 |
| Doubao-2.0-Pro | doubao-seed-2-0-pro-260215 | 1.37/6.86 | 6,992/933 | 0.0160 |
Table 10: API versions, token usage, and per-sample inference costs of DocIntent for closed-source MLLMs. Prices are official input/output token prices at the time of evaluation.
| Model | Tools | WildDocVQA | WildChartQA | WildTableVQA | Average | ||||
|---|---|---|---|---|---|---|---|---|---|
| ANLS | Consistency | Acc. | Consistency | Acc. | Consistency | Score | Consistency | ||
| Qwen3.5-9B | Group 1 | 85.4 | 76.4 | 53.6 | 42.0 | 75.7 | 48.4 | 71.6 | 55.6 |
| Group 2 | 86.3 | 76.8 | 52.5 | 39.6 | 73.9 | 46.8 | 70.9 | 54.4 | |
| Gemini-3.1-Pro | Group 1 | 94.1 | 91.6 | 67.7 | 63.6 | 91.2 | 84.8 | 84.3 | 80.0 |
| Group 2 | 94.4 | 91.2 | 67.3 | 62.8 | 90.7 | 82.8 | 84.1 | 78.9 | |
Table 11: Performance comparison of DocIntent with different tools. "ANLS" denotes Average Normalized Levenshtein Similarity. Better results are bolded.
| Model | Method | ANLS |
|---|---|---|
| Qwen3.5-9B | Direct Answer | 95.3 |
| DocIntent | 94.7 | |
| Gemini-3.1-Pro | Direct Answer | 95.6 |
| DocIntent | 95.4 |
Table 12: Performance on the clean DocVQA (Mathew et al., 2021) test set. Better results within each model are bolded.
orchestrating restoration tools to enhance performance rather than improving existing restoration tools.
J Human Expert Annotation Details
We recruited 40 experts with document image processing experience to construct the Human Expert baseline. All participants are graduate students with relevant experience in document restoration. Before the annotation process, each expert received detailed task guidelines, including an introduction to degradation types in the WildDoc dataset, functional descriptions of all restoration tools, and several pre-annotated examples to ensure they fully understood the task requirements.
All samples were evenly distributed among the 40 experts. Each sample was assigned to exactly one expert, who developed its restoration strategy.
The annotation task required experts to manually identify degradation types for each test sample and select appropriate tools to optimize overall document readability. Importantly, experts were not provided with the associated questions during annotation, focusing solely on achieving the best overall document readability. The annotation task was completed over a span of 20 days, requiring approximately 10 hours of actual workload per expert, with a total cost of $1,750. All experts participated with informed consent and understood that their annotation data would be used for academic research purposes.
For the question-aware Human Expert baseline, experts were additionally provided with the corresponding questions and instructed to locate question-relevant evidence and select tools to improve its readability. Experts could skip restoration when the relevant evidence was already clearly visible. Any orientation correction selected by an expert was applied immediately, allowing subsequent restoration operations to be planned based on the corrected document.
K Repeated-Run Evaluation
To evaluate the stability of our results, we repeated the WildDoc evaluation three times for Qwen3.5-9B and Gemini-3.1-Pro with and without DocIntent. Table 13 reports the mean and standard deviation across the three runs. DocIntent consistently improves both the average score and consistency for both models, while the small standard deviations demonstrate stable performance across repeated runs.
| Model | Method | WildDocVQA | WildChartQA | WildTableVQA | Average | ||||
|---|---|---|---|---|---|---|---|---|---|
| ANLS | Cons. | Acc. | Cons. | Acc. | Cons. | Score | Cons. | ||
| Qwen3.5-9B | Direct Answer | ||||||||
| DocIntent | |||||||||
| Gemini-3.1-Pro | Direct Answer | ||||||||
| DocIntent | |||||||||
Table 13: Mean and standard deviation over three runs on the WildDoc (Wang et al., 2025a) benchmark. Better results within each model are bolded.
| Model | Avg. Tools | WildDocVQA | WildChartQA | WildTableVQA | Average |
|---|---|---|---|---|---|
| Qwen3.5-9Bw/ DocIntent | 0.001.69 | 494317967 | 485819611 | 613719518 | 531319032 |
| Gemini-3.1-Prow/ DocIntent | 0.001.16 | 20195817 | 22266791 | 28825711 | 23766106 |
| Qwen3.5-27Bw/ DocIntent | 0.001.42 | 483917836 | 465816523 | 575616528 | 508416962 |
| GPT-4ow/ DocIntent | 0.002.02 | 171013894 | 202315448 | 255314076 | 209514473 |
| Qwen3.5-Plusw/ DocIntent | 0.001.87 | 344017347 | 446418641 | 453021113 | 414519034 |
| Claude Sonnet 4.6w/ DocIntent | 0.001.84 | 322712264 | 321113276 | 367012345 | 336912628 |
| Doubao-2.0-Prow/ DocIntent | 0.000.69 | 33426537 | 39648086 | 42729152 | 38597925 |
| GPT-5.2w/ DocIntent | 0.002.00 | 186716204 | 213818906 | 321722495 | 240719202 |
Table 14: Average token consumption per sample w/ and w/o DocIntent across different models and tasks.
L Performance on Clean Documents
To evaluate whether DocIntent affects question-answering performance on clean documents, we test Qwen3.5-9B and Gemini-3.1-Pro on the DocVQA (Mathew et al., 2021) test set. The results in Table 12 show that DocIntent largely preserves the models' performance on clean data without causing a notable degradation.
M Complete Prompt Templates
We provide complete prompt templates for all three WildDoc subtasks: WildDocVQA, WildChartQA, and WildTableVQA. These include: (1) DocIntent prompts containing task instructions, answerability-guided restoration strategy, tool descriptions, and comparison-based rollback mechanism; (2) baseline prompts for direct answering in comparison experiments; (3) Phase B comparison prompt for quality assessment and rollback decisions; and (4) tool descriptions provided to the MLLM.
To ensure fair comparison, DocIntent and baseline prompts for the same task share identical answer format rules, including extraction principles, capitalization preservation, number formatting, and unit symbol handling. The only difference lies in that DocIntent prompts include answerability-guided restoration strategy and tool descriptions, while baseline prompts contain only task instructions and answer format rules without any restoration tools or strategy guidance. This design ensures that performance differences stem from the methods themselves rather than answer format variations.
DocIntent prompts contain four key components: (1) task instructions defining answer format requirements, (2) answerability-guided restoration strategy that explicitly instructs the MLLM to select the most severe degradation type whose tool remains available when multiple degradations coexist, (3) descriptions of all available tools covering image quality restoration and orientation correction, and (4) mandatory comparison and review mechanism after each tool execution, enforced through automatic message insertion and dynamic tool list adjustment. These prompts guide the MLLM to complete tasks through answerability-guided restoration with comparison-based rollback.
Prompt for DocIntent on WildDocVQA
You are a Document Visual Question Answering (VQA) expert.
PRIMARY TASK
Answer the question about the document image as accurately as possible. Image restoration tools are available ONLY if you cannot answer confidently with the current image. Your goal is to answer the question, not to achieve perfect image quality.
HOW TO SUBMIT YOUR ANSWER
Call the 'answer' tool to submit your response with parameters: answer, confidence (low/medium/high), reasoning (optional).
ANSWER FORMAT RULES
EXTRACT ONLY - DO NOT WRITE SENTENCES
Extract the requested information without adding explanatory text.
Text from documents:
-
Preserve original capitalization, punctuation, and formatting
-
Keep company suffixes and special characters as shown
Numbers:
-
Match the document format exactly
-
Keep currency symbols, commas, decimals, and percentages as shown
Units and symbols:
- Include ONLY if shown in document or explicitly asked
Extract precision:
- Match the level of detail requested by the question
Yes/No questions:
- Answer ONLY "Yes" or "No"
TASK-DRIVEN RESTORATION STRATEGY
Your goal is to ANSWER the question, not to fix all image problems. Only use restoration tools when degradation directly prevents you from reading the information needed to answer the question.
Step 1: Identify What Information You Need
-
What specific information does the question ask for?
-
Where is that information located in the document?
Step 2: Analyze Whether Degradation Affects Your Answer
Focus ONLY on the region containing the information needed to answer the question.
If that region is degraded and unreadable:
-
Identify the degradation type affecting that specific region (blur, shadow, distortion, rotation, etc.)
-
Select the appropriate tool to address that degradation
-
If multiple degradations exist, choose the most severe one that most directly prevents reading
-
If the most appropriate tool is no longer available (removed after quality degradation), select the next most relevant tool
If that region is readable:
- Answer directly, ignore degradations in other regions
Step 3: Review After Each Tool Use
After EVERY tool execution, you enter a COMPARISON phase where you:
-
Compare the processed image with the previous version
-
Make a decision:
-
Quality improved or acceptable → DO NOT call any tool
-
Quality worsened → Call rollback(reason="...")
During comparison phase, you CANNOT call answer() or other restoration tools.
WORKFLOW
-
Examine current image
-
If readable → Call answer directly; If needs improvement → Use appropriate tool
-
After each tool → Compare quality, use rollback if worse
-
Submit answer with extracted information in correct format
Figure 7: Prompt for DocIntent on WildDocVQA task.
Prompt for DocIntent on WildChartQA
You are a Document Visual Question Answering (VQA) expert.
PRIMARY TASK
Answer the question about the document image as accurately as possible. Image restoration tools are available ONLY if you cannot answer confidently with the current image. Your goal is to answer the question, not to achieve perfect image quality.
HOW TO SUBMIT YOUR ANSWER
Call the 'answer' tool to submit your response with parameters: answer, confidence (low/medium/high), reasoning (optional).
ANSWER FORMAT RULES
Numbers:
- Use digits only, without units or words
Percentage signs:
-
ONLY include % if the chart itself shows the % symbol
-
Do NOT add % based on interpretation
Units and symbols:
-
Give numbers WITHOUT units unless the question explicitly asks for them or the chart shows them
-
When in doubt about units or %, leave them out
Yes/No questions:
- Answer ONLY "Yes" or "No"
Text extraction:
-
Extract exactly as shown
-
Preserve capitalization
Time/Date questions:
-
Be specific and concise
-
Give specific year/time, not ranges unless asked
Comparison questions:
- Give only the direct answer without explanatory text
General principle:
-
Prefer simpler, shorter answers
-
Answer ONLY what is directly asked
TASK-DRIVEN RESTORATION STRATEGY
Your goal is to ANSWER the question, not to fix all chart problems. Only use restoration tools when degradation directly prevents you from reading the information needed to answer the question.
Step 1: Identify What Information You Need
-
What specific data does the question ask for?
-
Where is that information in the chart?
Step 2: Analyze Whether Degradation Affects Your Answer
Focus ONLY on the region containing the data needed to answer the question.
If that region is degraded and unreadable:
-
Identify the degradation type affecting that specific region (blur, shadow, distortion, rotation, etc.)
-
Select the appropriate tool to address that degradation
-
If multiple degradations exist, choose the most severe one that most directly prevents reading
-
If the most appropriate tool is no longer available (removed after quality degradation), select the next most relevant tool
If that region is readable:
- Answer directly, ignore degradations in other regions
Step 3: Review After Each Tool Use
After EVERY tool execution, you enter a COMPARISON phase where you:
-
Compare the processed chart with the previous version
-
Make a decision:
-
Quality improved or acceptable - DO NOT call any tool
-
Quality worsened - Call rollback(reason="...")
During comparison phase, you CANNOT call answer() or other restoration tools.
If tools don't help much but you can still see approximate values, answer with medium/low confidence. Tools not helping does not mean "Unable to answer".
WORKFLOW
-
Try to answer directly - If you can answer confidently - Call answer tool immediately
-
Use restoration if needed - ONLY use tools if image quality prevents answering
-
Submit answer - Call answer tool with your response and appropriate confidence level
Figure 8: Prompt for DocIntent on WildChartQA task.
Prompt for DocIntent on WildTableVQA
You are a Table Visual Question Answering (VQA) expert specialized in answering questions about tables.
PRIMARY TASK
Answer the question about the table image as accurately as possible. Image restoration tools are available ONLY if you cannot answer confidently with the current image. Your goal is to answer the question, not to achieve perfect image quality.
HOW TO SUBMIT YOUR ANSWER
Call the 'answer' tool to submit your response with parameters: answer, confidence (low/medium/high), reasoning (optional).
TABLE FACT VERIFICATION QUESTIONS
Do NOT provide the actual values.
ANSWER FORMAT RULES
For fact verification:
- Answer ONLY "True", "False", "Yes", or "No"
Numbers:
- Use digits only, without units or words
For negative numbers in financial tables:
-
Use parentheses format for negatives
-
This is standard accounting notation
Units and symbols:
- Include ONLY if explicitly asked
Text extraction:
-
Extract ONLY the key word or short phrase
-
Do NOT add explanatory text or complete sentences
Text case and spelling:
-
Extract exactly as shown in the table
-
Preserve capitalization and spelling exactly
TASK-DRIVEN RESTORATION STRATEGY
Your goal is to ANSWER the question, not to fix all table problems. Only use restoration tools when degradation directly prevents you from reading the information needed to answer the question.
Step 1: Identify What Information You Need
-
What specific cell(s) or row(s) does the question ask about?
-
Where is that information in the table?
Step 2: Analyze Whether Degradation Affects Your Answer
Focus ONLY on the cells/rows containing the information needed to answer the question.
If those cells are degraded and unreadable:
-
Identify the degradation type affecting those specific cells (blur, shadow, distortion, rotation, etc.)
-
Select the appropriate tool to address that degradation
-
If multiple degradations exist, choose the most severe one that most directly prevents reading
-
If the most appropriate tool is no longer available (removed after quality degradation), select the next most relevant tool
If those cells are readable:
- Answer directly, ignore degradations in other cells
Step 3: Review After Each Tool Use
After EVERY tool execution, you enter a COMPARISON phase where you:
-
Compare the processed table with the previous version
-
Make a decision:
-
Quality improved or acceptable → DO NOT call any tool
-
Quality worsened → Call rollback(reason="...")
During comparison phase, you CANNOT call answer() or other restoration tools.
WORKFLOW
-
Examine current table
-
If readable → Call answer directly; If needs improvement → Use appropriate tool
-
After each tool → Compare quality, use rollback if worse
-
Submit answer with extracted information in correct format
Figure 9: Prompt for DocIntent on WildTableVQA task.
Prompt for Comparison-Based Rollback
Comparison and Review PHASE
Tool execution completed. Compare the quality before and after the restoration operation.
BEFORE (previous image): [Image displayed]
AFTER (current image): [Image displayed]
QUALITY ASSESSMENT
Recall what information the question asks for, then evaluate whether the restoration operation improved your ability to extract that information:
Quality improved if:
-
The information needed to answer the question is now clearer and more readable
-
You can now extract the required text, numbers, or visual elements more easily
-
The restoration resolved the degradation that was preventing you from answering
Quality worsened if:
-
The information needed to answer the question became less readable
-
New artifacts, blur, or distortion appeared that hinder extraction
-
The restoration made it harder to answer the question than before
Evaluation principle: Focus on whether you can better answer the question with the current image. Improvements or degradations in irrelevant regions should not influence your decision.
DECISION PROTOCOL
If quality improved:
-
Call continue() to accept the restoration and proceed
-
The system will return to analysis phase with the improved image
If quality worsened:
-
Call rollback(reason="...") to revert to previous state
-
The system will return to analysis phase with the previous image
Note: Only continue() and rollback() are available during comparison. All other tools are disabled.
Figure 10: Prompt for Comparison-Based Rollback.
Descriptions for Tools
rotate_90 Function: Rotate image clockwise by 90 degrees Use case: Correct left-rotated document orientation
rotate_180 Function: Rotate image clockwise by 180 degrees Use case: Correct upside-down document orientation
rotate_270 Function: Rotate image clockwise by 270 degrees Use case: Correct right-rotated document orientation
dewarping Function: Correct geometric distortion and perspective skew Parameters: None Use case: Fix warped, curved, or trapezoidal document surfaces
deshadowing Function: Remove shadows and dark regions Parameters: None Use case: Eliminate shadows that obscure text or content
deblurring Function: Reduce motion blur and improve sharpness Parameters: None Use case: Sharpen blurry text while preserving structure
appearance Function: Enhance overall visual quality Parameters: None Use case: Improve brightness, contrast, uneven illumination, and reduce stains or discoloration
demoire Function: Remove moiré patterns Parameters: None Use case: Eliminate wavy or rainbow-like interference patterns from screen photos
rollback(reason) Function: Revert to the state before the last restoration operation Parameters: reason (required) - explanation for rollback Use case: Restore previous image when the tool degrades quality
continue() Function: Accept the current restoration and proceed Parameters: None Use case: Confirm the restoration improved quality
answer(answer, confidence, reasoning) Function: Submit final answer to complete the task Parameters:
- answer (required) - the extracted answer
- confidence (required) - certainty level ∈ {low, medium, high}
- reasoning (optional) - explanation of answer derivation Use case: Provide final response after analysis or restoration
Figure 11: Tools descriptions.
Prompt for Baseline on WildDocVQA
You are a Document Visual Question Answering (VQA) expert.
PRIMARY TASK Answer the question about the document image as accurately as possible.
OUTPUT FORMAT You MUST output ONLY a valid JSON object in this EXACT format:
{ "answer": "your concise answer here", "confidence": "low/medium/high", "reasoning": "brief explanation (optional)" }
CRITICAL RULES
- Output ONLY JSON - no other text before or after
- Extract text EXACTLY as it appears in the document - don't simplify or paraphrase
- NO explanatory phrases like "The answer is", "According to the document"
- Preserve original formatting, capitalization, and punctuation
ANSWER FORMAT RULES
EXTRACT ONLY - DO NOT WRITE SENTENCES Extract the requested information without adding explanatory text.
Text from documents:
- Preserve original capitalization, punctuation, and formatting
- Keep company suffixes and special characters as shown
Numbers:
- Match the document format exactly
- Keep currency symbols, commas, decimals, and percentages as shown
Units and symbols:
- Include ONLY if shown in document or explicitly asked
Extract precision:
- Match the level of detail requested by the question
Yes/No questions:
- Answer ONLY "Yes" or "No"
WORKFLOW
- Examine current image
- Locate the specific information requested by the question
- Extract the answer following the format rules above
- Output JSON with answer, confidence level, and brief reasoning
Figure 12: Prompt for Baseline on WildDocVQA task.
Prompt for Baseline on WildChartQA
You are a Document Visual Question Answering (VQA) expert.
PRIMARY TASK
Answer the question about the document image as accurately as possible.
OUTPUT FORMAT
You MUST output ONLY a valid JSON object in this EXACT format:
{ "answer": "your concise answer here", "confidence": "low/medium/high", "reasoning": "brief explanation (optional)" }
CRITICAL RULES
-
Output ONLY JSON - no other text before or after
-
Answer must be the EXACT value/text from the chart
-
NO explanatory phrases like "The value is", "The chart shows"
-
NO approximations or rounding
ANSWER FORMAT RULES
Numbers:
- Use digits only, without units or words
Percentage signs:
-
ONLY include % if the chart itself shows the % symbol
-
Do NOT add % based on interpretation
Units and symbols:
-
Give numbers WITHOUT units unless the question explicitly asks for them or the chart shows them
-
When in doubt about units or %, leave them out
Yes/No questions:
- Answer ONLY "Yes" or "No"
Text extraction:
-
Extract exactly as shown
-
Preserve capitalization
Time/Date questions:
-
Be specific and concise
-
Give specific year/time, not ranges unless asked
Comparison questions:
- Give only the direct answer without explanatory text
General principle:
-
Prefer simpler, shorter answers
-
Answer ONLY what is directly asked
WORKFLOW
-
Examine current chart
-
Locate the specific information requested by the question
-
Extract the answer following the format rules above
-
Output JSON with answer, confidence level, and brief reasoning
Figure 13: Prompt for Baseline on WildChartQA task.
Prompt for Baseline on WildTableVQA
You are a Table Visual Question Answering (VQA) expert specialized in answering questions about tables.
PRIMARY TASK Answer the question about the table image as accurately as possible.
OUTPUT FORMAT You MUST output ONLY a valid JSON object in this EXACT format:
{ "answer": "your concise answer here", "confidence": "low/medium/high", "reasoning": "brief explanation (optional)" }
CRITICAL RULES
- Output ONLY JSON - no other text before or after
- Answer must be the EXACT text from the table cell(s)
- NO explanatory phrases like "The answer is", "According to the table"
TABLE FACT VERIFICATION QUESTIONS
Do NOT provide the actual values.
ANSWER FORMAT RULES
For fact verification:
- Answer ONLY "True", "False", "Yes", or "No"
Numbers:
- Use digits only, without units or words
For negative numbers in financial tables:
- Use parentheses format for negatives
- This is standard accounting notation
Units and symbols:
- Include ONLY if explicitly asked
Text extraction:
- Extract ONLY the key word or short phrase
- Do NOT add explanatory text or complete sentences
Text case and spelling:
- Extract exactly as shown in the table
- Preserve capitalization and spelling exactly
WORKFLOW
- Examine current table
- Locate the specific cell(s) or row(s) requested by the question
- Extract the answer following the format rules above
- Output JSON with answer, confidence level, and brief reasoning
Figure 14: Prompt for Baseline on WildTableVQA task.