SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2503.13964 · 2025

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

arXiv · PDF · Open in the Atlas

Code that ran

4 of 4 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 3 have no contract verdict; 1 failure of our instrument; 0 no recorded run), measured 2026-11-23; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2503.13964.json · badge: /api/ran/2503.13964.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
aiming-lab/mdocagent canonical (classifier label)
classifier basis not recorded on the link
4 ran · 0 no recorded run
FunctionStatusWhere it lives
encode_image Ran
ran; our contract draft was wrong, not the code
aiming-lab/mdocagent/models/openai.py
pointer only (licence: MIT); the stored copy get_code serves, from jongwoopark7978/LVNet, is pointer only (licence: NONE) · get_code("f41cb1a19b154297")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from jongwoopark7978/LVNet, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

extract_evaluation_metrics Ran
ran on a synthesized input
aiming-lab/mdocagent/agents/base_agent.py
code served (permissive licence) · get_code("c30be806ef3f2fca")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned dict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import json

def extract_evaluation_metrics(eval_str: str) -> dict:
    try:
        start_index = eval_str.find('{')
        end_index = eval_str.rfind('}') + 1
        eval_str = eval_str[start_index:end_index]
        metrics = json.loads(eval_str)
        return {'binary_correctness': int(metrics.get('binary_correctness', 0))}
    except json.JSONDecodeError as e:
        return {'binary_correctness': 0}
    except Exception as e:
        return {'binary_correctness': 0}

ARGS = {
    'eval_str': 'Some prefix text {"binary_correctness": 1, "accuracy": 0.95} some suffix'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
extract_time Ran
ran on a synthesized input
aiming-lab/mdocagent/mydatasets/base_dataset.py
code served (permissive licence) · get_code("e4c5da1807297224")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned datetime. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import os
from datetime import datetime

def extract_time(file_path):
    file_name = os.path.basename(file_path)
    time_str = file_name.split('.json')[0]
    return datetime.strptime(time_str, '%Y-%m-%d-%H-%M')

ARGS = {
    'file_path': '2024-01-15-14-30.json'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type datetime — a datetime output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a datetime output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
find_latest_json Ran
ran on a synthesized input
aiming-lab/mdocagent/mydatasets/base_dataset.py
code served (permissive licence) · get_code("2e062cb95ade3d46")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import os
import tempfile
from datetime import datetime

# Create a temporary directory for testing
temp_dir = tempfile.mkdtemp()

# Create some dummy JSON files with timestamps in their names
dummy_files = [
    os.path.join(temp_dir, '2024-01-15-10-30.json'),
    os.path.join(temp_dir, '2024-01-15-11-45.json'),
    os.path.join(temp_dir, '2024-01-15-09-15.json'),
]

# Write minimal content to the dummy files
for file_path in dummy_files:
    with open(file_path, 'w') as f:
        f.write('{}')

# Also create a _results.json file that should be filtered out
results_file = os.path.join(temp_dir, '2024-01-15-12-00_results.json')
with open(results_file, 'w') as f:
    f.write('{}')

ARGS = {
    'result_dir': temp_dir
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block

Also present in other papers' code

Of 4 samples lifted from this paper's linked repositories, 4 carry a function identity and 0 do not. Of the 4 distinct functions with an identity, 1 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 1 the same month, 1 later) and 3 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

FunctionAlso present inEarliest-datedOthers named
encode_image 76 other papers
58 dated earlier, 2 the same month, 12 later, 4 same year, order not determinable
2309.05950 (2023-09)
Language Models as Black-Box Optimizers for Vision-Language Models
2311.15732 (2023-11)
GPT4Vis: What Can GPT-4 Do for Zero-shot Visual Recognition?
2312.14867 (2023-12)
VIEScore: Towards Explainable Metrics for Conditional Image Synthesis Evaluation
and 73 more not named here

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-23.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

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

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2503.13964")
get_code_for_paper("2503.13964")
have("2503.13964")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2503.13964.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2503.13964.svg)](https://syntology.ai/paper/2503.13964)

Connect an agent — have() is free.