YangL1122 commited on
Commit
b9e2e1d
·
verified ·
1 Parent(s): 5631806

Upload folder using huggingface_hub

Browse files
.gitattributes CHANGED
@@ -58,3 +58,8 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
58
  # Video files - compressed
59
  *.mp4 filter=lfs diff=lfs merge=lfs -text
60
  *.webm filter=lfs diff=lfs merge=lfs -text
 
 
 
 
 
 
58
  # Video files - compressed
59
  *.mp4 filter=lfs diff=lfs merge=lfs -text
60
  *.webm filter=lfs diff=lfs merge=lfs -text
61
+ data/test-00000-of-00001.jsonl filter=lfs diff=lfs merge=lfs -text
62
+ data/train-00000-of-00003.jsonl filter=lfs diff=lfs merge=lfs -text
63
+ data/train-00001-of-00003.jsonl filter=lfs diff=lfs merge=lfs -text
64
+ data/train-00002-of-00003.jsonl filter=lfs diff=lfs merge=lfs -text
65
+ data/val-00000-of-00001.jsonl filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,173 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - en
4
+ - zh
5
+ license: cc-by-4.0
6
+ task_categories:
7
+ - text-generation
8
+ - question-answering
9
+ tags:
10
+ - hallucination
11
+ - regulatory-compliance
12
+ - preference-optimization
13
+ - dpo
14
+ - long-context
15
+ - detail-faithfulness
16
+ size_categories:
17
+ - 10K<n<100K
18
+ configs:
19
+ - config_name: default
20
+ data_files:
21
+ - split: train
22
+ path: data/train-*.jsonl
23
+ - split: validation
24
+ path: data/val-*.jsonl
25
+ - split: test
26
+ path: data/test-*.jsonl
27
+ ---
28
+
29
+ # DetailBench
30
+
31
+ **A Benchmark for Detail Hallucination in Long Regulatory Documents**
32
+
33
+ DetailBench is a benchmark for evaluating and mitigating *detail hallucination* in LLM outputs on long regulatory documents. It accompanies the paper:
34
+
35
+ > **DetailDPO: Targeted Preference Optimization for Reducing Detail Hallucination in Long Regulatory Documents**
36
+ > (EMNLP 2026)
37
+
38
+ ## Overview
39
+
40
+ Large language models frequently produce *detail hallucinations*—subtle errors in threshold values, units, scopes, obligation levels, and conditions—when processing long regulatory documents. DetailBench provides:
41
+
42
+ - **322 source documents** (172 real + 150 synthetic) from three jurisdictions
43
+ - **13,000 preference pairs** (10,000 train / 1,000 validation / 2,000 test)
44
+ - **Five detail error types** (τ₁–τ₅) with balanced training distribution
45
+ - **Three context-length tiers**: Short (8K–16K), Medium (16K–32K), Long (32K–64K tokens)
46
+
47
+ ## Data Sources
48
+
49
+ | Source | Count | Description |
50
+ |--------|------:|-------------|
51
+ | GB Standards | 65 | Chinese national standards on hydrogen production, storage, transportation, and safety |
52
+ | US CFR | 31 | Code of Federal Regulations (Title 49: Transportation, Title 40: Environmental Protection) via eCFR API |
53
+ | EUR-Lex | 76 | EU regulations on hydrogen infrastructure, clean energy, pressure equipment via CELLAR API |
54
+ | Synthetic | 150 | Domain-template generated documents for training augmentation |
55
+
56
+ ## Schema
57
+
58
+ Each sample in the JSONL files contains:
59
+
60
+ ```json
61
+ {
62
+ "sample_id": "test_00000",
63
+ "context_tier": "long",
64
+ "token_count": 43368,
65
+ "documents": [
66
+ {
67
+ "doc_id": "SYNTH_0075",
68
+ "source": "synthetic",
69
+ "segments": [
70
+ {
71
+ "segment_id": "SYNTH_0075_seg_0",
72
+ "text": "...",
73
+ "token_count": 605
74
+ }
75
+ ]
76
+ }
77
+ ],
78
+ "query": "An electrolyser plant produces hydrogen at ...",
79
+ "chosen": {
80
+ "is_compliant": true,
81
+ "constraints": [
82
+ {"type": "tau_1", "description": "...", "value": "82", "unit": "°C"}
83
+ ],
84
+ "evidence": [
85
+ {"segment_id": "...", "quote": "..."}
86
+ ]
87
+ },
88
+ "rejected": {
89
+ "is_compliant": true,
90
+ "constraints": ["... (with one perturbed detail)"],
91
+ "evidence": ["..."]
92
+ },
93
+ "perturbation": {
94
+ "error_type": "tau_5_condition",
95
+ "original_value": "where appropriate",
96
+ "perturbed_value": "[dropped]",
97
+ "detail_element_id": "...",
98
+ "segment_id": "..."
99
+ },
100
+ "detail_elements": [
101
+ {
102
+ "element_id": "...",
103
+ "type": "tau_1",
104
+ "value": "3928.0",
105
+ "unit": "kg",
106
+ "span": [46, 55],
107
+ "segment_id": "...",
108
+ "quote": "..."
109
+ }
110
+ ]
111
+ }
112
+ ```
113
+
114
+ ## Detail Error Taxonomy
115
+
116
+ | Type | Name | Description | Example |
117
+ |------|------|-------------|---------|
118
+ | τ₁ | Threshold | Numeric value errors | "pressure ≤ **35** MPa" → "pressure ≤ **45** MPa" |
119
+ | τ₂ | Unit | Measurement unit errors | "distance in **meters**" → "distance in **feet**" |
120
+ | τ₃ | Scope | Applicability scope errors | "for **indoor** facilities" → "for **all** facilities" |
121
+ | τ₄ | Level | Obligation level errors | "**shall** comply" → "**should** comply" |
122
+ | τ₅ | Condition | Conditional clause errors | "if temperature **exceeds 60°C**" → condition dropped |
123
+
124
+ ## Evaluation Metrics
125
+
126
+ - **Compliance Accuracy**: Fraction of correct compliance judgments
127
+ - **Detail Error Rate (DER)**: Per-type and overall error rate on detail elements
128
+ - **Evidence F1**: Precision/recall/F1 of predicted evidence citations
129
+ - **Evidence Consistency**: Fraction of citations where quoted text matches source
130
+
131
+ ## Usage
132
+
133
+ ```python
134
+ from datasets import load_dataset
135
+
136
+ ds = load_dataset("YOUR_USERNAME/DetailBench")
137
+
138
+ # Access splits
139
+ train = ds["train"] # 10,000 samples
140
+ val = ds["validation"] # 1,000 samples
141
+ test = ds["test"] # 2,000 samples
142
+
143
+ # Example: inspect a test sample
144
+ sample = test[0]
145
+ print(sample["query"])
146
+ print(sample["context_tier"]) # "short", "medium", or "long"
147
+ print(len(sample["documents"]))
148
+ ```
149
+
150
+ ## Split Statistics
151
+
152
+ | Split | Samples | Short | Medium | Long |
153
+ |-------|--------:|------:|-------:|-----:|
154
+ | Train | 10,000 | 6,463 | 2,263 | 1,274 |
155
+ | Val | 1,000 | 605 | 249 | 146 |
156
+ | Test | 2,000 | 1,215 | 519 | 266 |
157
+
158
+ Error type distribution in the training set is balanced at 20% each (2,000 per type).
159
+
160
+ ## Citation
161
+
162
+ ```bibtex
163
+ @inproceedings{detaildpo2026,
164
+ title={DetailDPO: Targeted Preference Optimization for Reducing Detail Hallucination in Long Regulatory Documents},
165
+ author={...},
166
+ booktitle={Proceedings of EMNLP 2026},
167
+ year={2026}
168
+ }
169
+ ```
170
+
171
+ ## License
172
+
173
+ This dataset is released under CC-BY-4.0. The underlying regulatory documents are sourced from public government repositories (eCFR, EUR-Lex, openstd.samr.gov.cn).
data/test-00000-of-00001.jsonl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1964dd2d916d64fe6b722d09394b0db5803d4f59680841dcb6d07e3d3d5ee1c6
3
+ size 3000606504
data/train-00000-of-00003.jsonl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:fc7ca72dfcdccd7fc29c3abdd248cb676901d452f7386b74db7f0d76bee7cb3c
3
+ size 5099658443
data/train-00001-of-00003.jsonl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:69f06fdd7c910505ae1566c46d5a7824fef64905103054642e5af7a8de94a283
3
+ size 4083251068
data/train-00002-of-00003.jsonl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:eec88efb233972ba808e70c7518086ea69c53efb6f417ced89bacd044e4e732b
3
+ size 5720334420
data/val-00000-of-00001.jsonl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a4d813f7a8f954a5470f09257a6e3c6ad2930481c124c7e1d45bc4151b2cbe07
3
+ size 1251588263