File size: 6,609 Bytes
050f99f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5bb8b43
050f99f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
---
pretty_name: doc-decision-bench
language:
  - zh
  - en
tags:
  - document-understanding
  - visual-question-answering
  - document-classification
  - multiple-choice
  - document-benchmark
---

<h1 align="center">doc-decision-bench</h1>
<p align="center"><b>From document understanding to document decisions.</b></p>
<p align="center">608 images · 2,617 Chinese–English question pairs · 5,234 language records</p>
<p align="center"><b>English</b> · <a href="https://huggingface.co/datasets/Immortal-Zhang/doc-decision-bench/blob/main/README.zh-CN.md">简体中文</a></p>

## 📄 A benchmark for document understanding and decisions

**Understanding a document means being able to answer questions, check information and make judgments based on its content.** `doc-decision-bench` is a bilingual Chinese–English multiple-choice benchmark for document images. It compares models on document recognition, content understanding, information verification and rule-based judgments.

The benchmark uses a unified input format: **document image + question + candidates → answer label**. Decision conditions and candidates are explicitly provided so that different models can be evaluated on the same inputs.

Each image can have multiple questions, with different candidate content and counts. Chinese and English versions are paired through `pair_id`, supporting analysis by language, task and document category.

## 🔎 Evaluation

| Capability | What is evaluated |
| :--- | :--- |
| Document recognition and classification | Identifying a document's domain, category, purpose and hierarchical relationships |
| Visual attributes and layout understanding | Recognizing orientation, layout, document regions and visible elements |
| Fields and content relationships | Understanding fields and comparing relationships among numbers, text and table contents |
| Consistency and completeness | Checking whether information is consistent and whether specified materials or fields are present |
| Conditional reasoning and rule-based judgments | Combining document facts under explicitly provided conditions |
| Workflow routing and action selection | Selecting a processing category or next action based on document facts and question-level rules |

These tasks evaluate understanding of images and the conditions stated in questions. Business rules are provided in the questions; models are not expected to infer the approval policies of real organizations.

## 📊 Dataset composition

| Category | Images | Bilingual question pairs | Language records |
| :--- | ---: | ---: | ---: |
| Document understanding and decisions | 388 | 1,848 | 3,696 |
| Cross-industry classification | 220 | 769 | 1,538 |

- **Document understanding and decisions**: covers document categories, field understanding and relationships, layout, content consistency, completeness, conditional reasoning, workflow routing, action selection and orientation recognition.
- **Cross-industry classification**: covers a document's domain, type, hierarchical category and purpose.

Chinese and English each contain **2,617 records**. The total of 5,234 counts language records, not 5,234 independent questions.

## 🗂️ Repository structure

```text
doc-decision-bench/
├── README.md
├── README.zh-CN.md
├── data/
│   └── data.jsonl
└── images/
    ├── 000001.jpg
    ├── 000002.jpg
    ├── ...
    └── 000608.png
```

Images retain their original JPG or PNG format. Each line in `data/data.jsonl` contains one question record. Multiple questions about the same image share one image file.

Image paths are relative to the directory containing `data.jsonl`, so records use paths such as `../images/000001.jpg`. Reusing image files across questions avoids duplicate storage.

## 📥 Download and read the dataset

### Download

```bash
hf download Immortal-Zhang/doc-decision-bench \
  --repo-type dataset \
  --local-dir doc-decision-bench
```

### Read records and resolve image paths

```python
import json
from pathlib import Path

jsonl_path = Path("doc-decision-bench/data/data.jsonl")

with jsonl_path.open(encoding="utf-8") as f:
    records = [json.loads(line) for line in f if line.strip()]

record = records[0]
image_path = (jsonl_path.parent / record["image"]).resolve()
question = record["question"]["instructions"]
candidates = record["question"]["criteria"]
reference_label = record["label"]

print(image_path)
print(question)
print(candidates)
```

## 🧩 Data format

Each record contains only 7 top-level fields: `id`, `image`, `pair_id`, `language`, `subset`, `question` and `label`. The example below is the English counterpart of the first record. Each record occupies a single line in the JSONL file:

```json
{
  "id": "000001_01_en",
  "image": "../images/000001.jpg",
  "pair_id": "000001_01",
  "language": "en",
  "subset": "document_decision",
  "question": {
    "instructions": "What is the main explanatory purpose of this excerpt?",
    "criteria": {
      "A": "To compare the performance of two processing methods",
      "B": "To specify the acceptance criteria for a processing method",
      "C": "To define a processing method and the objects it is used to process",
      "D": "To list the operating steps of a processing method"
    }
  },
  "label": "C"
}
```

| Field | Meaning |
| :--- | :--- |
| `id` | Unique identifier for each language record |
| `image` | Image path relative to the directory containing the JSONL file |
| `pair_id` | Identifier shared by the Chinese and English versions of the same question |
| `language` | `zh` for Chinese or `en` for English |
| `subset` | `document_decision` or `industry_classification` |
| `question` | Question object; `instructions` contains the question and decision rules, while `criteria` contains ordered candidate labels and text |
| `label` | Reference answer label, matching a key in `question.criteria` |

## 🎯 Dataset categories and evaluation

| Category | Images | Bilingual question pairs | Language records |
| :--- | ---: | ---: | ---: |
| Document understanding and decisions | 388 | 1,848 | 3,696 |
| Cross-industry classification | 220 | 769 | 1,538 |

All records are stored in one `data.jsonl` file. Filter by `subset`: `document_decision` denotes document understanding and decisions, and `industry_classification` denotes cross-industry classification.

## Data quality and evaluation boundaries

All reference answers have been manually reviewed.

## License and source information

The annotation license in the complete source records is `Apache 2.0`.