zihengh1 commited on
Commit
9c732f3
·
verified ·
1 Parent(s): 77ca2f1

Add cleaned TCMQA: 33,872 MCQs + 5,250-question doctor-annotated subset

Browse files

Cleaned from the 38,279-row working collection: dropped 4,282 exact duplicates, 77 rows in 32 contradictory-answer groups, 34 unanswerable rows with duplicated option text, and 14 malformed stems; normalized escaping/markup/whitespace; removed the internal source-path column. Adds a doctor_annotated config with 15,151 answers from 102 practitioners.

README.md CHANGED
@@ -1,3 +1,174 @@
1
  ---
2
- license: apache-2.0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ license: cc-by-nc-sa-4.0
3
+ language:
4
+ - zh
5
+ task_categories:
6
+ - question-answering
7
+ pretty_name: TCMQA
8
+ size_categories:
9
+ - 10K<n<100K
10
+ tags:
11
+ - medical
12
+ - traditional-chinese-medicine
13
+ - tcm
14
+ - multiple-choice
15
+ - benchmark
16
+ configs:
17
+ - config_name: qa
18
+ default: true
19
+ data_files:
20
+ - split: train
21
+ path: data/qa/train-*
22
+ - config_name: doctor_annotated
23
+ data_files:
24
+ - split: train
25
+ path: data/doctor_annotated/train-*
26
  ---
27
+
28
+ # TCMQA
29
+
30
+ A Traditional Chinese Medicine question-answering benchmark: **33,872 Chinese-language
31
+ multiple-choice questions** drawn from TCM licensing-exam material, plus a
32
+ **5,250-question subset answered by 102 licensed TCM practitioners**, giving a human
33
+ reference point for the same items a model is scored on.
34
+
35
+ The human subset is what distinguishes this from a plain exam dump. Every question in it
36
+ carries the individual answers of the doctors who attempted it, their perceived
37
+ difficulty rating, and their categorization of the question — so model accuracy can be
38
+ compared against a measured human baseline rather than an assumed passing score.
39
+
40
+ ## Configs
41
+
42
+ ### `qa` (default) — 33,872 rows
43
+
44
+ | Field | Type | Notes |
45
+ |---|---|---|
46
+ | `id` | int64 | Stable question id. Not contiguous — ids are preserved from the source collection across cleaning. |
47
+ | `question` | string | Question stem, Chinese. |
48
+ | `choices` | struct `{A,B,C,D,E}` | Option text. **`E` is an empty string on 4-option questions** (12,193 rows); use `num_choices` rather than assuming five. |
49
+ | `num_choices` | int64 | 4 or 5. |
50
+ | `answer` | string | Correct option letters, sorted, e.g. `"B"` or `"BD"`. |
51
+ | `num_answers` | int64 | 1–5. |
52
+ | `is_multi_answer` | bool | True for 2,308 rows (6.8%). |
53
+ | `explanation` | string / null | Reference rationale where the source provided one (20,692 rows). |
54
+ | `topic` | string / null | Free-text topic label (23,779 rows, 5,738 distinct). Uncontrolled vocabulary — see Limitations. |
55
+ | `difficulty_raw` | int64 | Source-provided integer. **Not a calibrated difficulty signal** — see Limitations. |
56
+
57
+ ### `doctor_annotated` — 5,250 rows, 15,151 human answers
58
+
59
+ | Field | Type | Notes |
60
+ |---|---|---|
61
+ | `subset_id` | int64 | Unique row id within this config. |
62
+ | `qa_id` | int64 / null | Joins to `qa.id`. Null for 10 rows whose question was removed from `qa` during cleaning. |
63
+ | `question`, `choices`, `answer`, `explanation`, `topic` | | Same meaning as in `qa`. |
64
+ | `annotations` | list of struct | One entry per doctor who answered this question. |
65
+ | `annotations[].rater_id` | int64 | Pseudonymous practitioner id (102 distinct). Stable across rows, so per-rater analysis is possible. |
66
+ | `annotations[].selected` | string | Letters the rater chose, sorted. |
67
+ | `annotations[].is_correct` | bool | Exact match against `answer` (multi-answer questions require the full set). |
68
+ | `annotations[].perceived_difficulty` | int64 | Rater's own 1–5 rating. |
69
+ | `annotations[].categories` | list of string | Rater's assignment into 10 TCM domains; empty list where the rater gave none. |
70
+ | `num_raters` | int64 | 3 for 4,801 rows, 2 for 299, 1 for 150. |
71
+ | `num_correct_raters` | int64 | Convenience count for majority-vote scoring. |
72
+
73
+ ## Usage
74
+
75
+ ```python
76
+ from datasets import load_dataset
77
+
78
+ qa = load_dataset("TechTCM/TCMQA", split="train") # 33,872
79
+ doc = load_dataset("TechTCM/TCMQA", "doctor_annotated", split="train") # 5,250
80
+ ```
81
+
82
+ Rendering a prompt, skipping the padded fifth option:
83
+
84
+ ```python
85
+ def render(row):
86
+ letters = "ABCDE"[: row["num_choices"]]
87
+ opts = "\n".join(f"{c}. {row['choices'][c]}" for c in letters)
88
+ return f"{row['question']}\n{opts}"
89
+ ```
90
+
91
+ ## Human baseline
92
+
93
+ Computed directly from the `doctor_annotated` config:
94
+
95
+ | Measure | Value |
96
+ |---|---|
97
+ | Practitioners | 102 |
98
+ | Total answers | 15,151 |
99
+ | Per-answer accuracy (all 15,151) | **62.10%** |
100
+ | 3-rater majority-vote accuracy (4,801 questions) | **64.94%** |
101
+
102
+ Both numbers are correct and measure different things. Use **62.10%** for "how well does
103
+ an individual practitioner do on an item", and **64.94%** when comparing a single model
104
+ prediction against a panel of three practitioners on the 4,801-question subset — the
105
+ latter is the appropriate baseline for most model-vs-human claims.
106
+
107
+ Doctors answered under exam-like conditions without reference material. Majority vote on
108
+ a 3-rater panel uses `num_correct_raters >= 2`.
109
+
110
+ ## Construction
111
+
112
+ Questions were aggregated from Chinese TCM licensing-exam preparation material and from
113
+ publicly released TCM exam datasets, then normalized to a uniform A–E multiple-choice
114
+ schema. The following cleaning was applied to produce this release:
115
+
116
+ | Step | Rows affected |
117
+ |---|---|
118
+ | Input | 38,279 |
119
+ | Dropped — stem was a leaked answer key or explanation fragment, not a question | 14 |
120
+ | Dropped — a correct option's text was duplicated verbatim by a distractor (unanswerable) | 34 |
121
+ | Dropped — identical stem and options appearing with contradictory answer keys (32 groups) | 77 |
122
+ | Dropped — exact duplicates of an earlier row (same stem, options and answer) | 4,282 |
123
+ | **Output** | **33,872** |
124
+
125
+ Text normalization applied to every retained field: literal `\"` escape artifacts
126
+ unescaped, HTML markup and entities stripped, newlines and runs of whitespace collapsed
127
+ to single spaces, leading/trailing whitespace removed, multi-answer keys sorted into
128
+ canonical order. Empty `explanation` and `topic` strings became nulls.
129
+
130
+ The internal source-document path recorded per question in the working collection was
131
+ removed before release; it contained collection-workflow file paths and the names of
132
+ individual contributors.
133
+
134
+ ## Provenance and attribution
135
+
136
+ Roughly 29% of the pre-cleaning rows were derived from publicly released datasets, and
137
+ the remainder from an internally collected exam-preparation bank. Because the per-row
138
+ source path was removed, upstream attribution is given here at the dataset level:
139
+
140
+ - [`FreedomIntelligence/TCM-Text-Exams`](https://huggingface.co/datasets/FreedomIntelligence/TCM-Text-Exams)
141
+ - `FreedomIntelligence/2023_Pharmacist_Licensure_Examination-TCM_track`
142
+ - [`JTBTechnology/tcm_exam_questions`](https://huggingface.co/datasets/JTBTechnology/tcm_exam_questions)
143
+
144
+ If you redistribute or build on TCMQA, carry these attributions forward. Users with
145
+ commercial intentions should check the terms of the upstream datasets directly rather
146
+ than relying on this release's license alone.
147
+
148
+ ## Limitations
149
+
150
+ - **`difficulty_raw` is not a usable difficulty label.** It is uniformly `5` for every
151
+ row imported from an external dataset and ranges 0–9 for internally collected rows, so
152
+ it mostly encodes provenance rather than difficulty. It is retained only for
153
+ traceability. For a real difficulty signal, use `perceived_difficulty` or
154
+ `num_correct_raters` in the `doctor_annotated` config.
155
+ - **`topic` is an uncontrolled vocabulary.** 5,738 distinct free-text strings at wildly
156
+ varying granularity (from `中医基础理论` down to `胃痛`), and absent on 10,093 rows.
157
+ Treat it as a weak hint, not a taxonomy. The `categories` field in
158
+ `doctor_annotated` is a proper 10-way scheme, but it reflects each rater's judgment and
159
+ raters sometimes disagree.
160
+ - **Answer keys are as-published by the source material** and have not been independently
161
+ re-adjudicated by a clinician. The 32 contradictory groups removed above are the cases
162
+ where the collection disagreed with itself; single-source errors would not be caught.
163
+ - **Mixed orthography.** Rows sourced from Taiwanese exams use traditional characters;
164
+ most rows use simplified. No conversion was applied.
165
+ - **218 rows in `doctor_annotated` share a `qa_id` with another row** — the same question
166
+ was administered to more than one panel. Deduplicate on `qa_id` if you need one row per
167
+ distinct question.
168
+ - **Not medical advice.** These are exam items. Performance here says something about
169
+ recall of TCM exam content and nothing about clinical safety or competence.
170
+
171
+ ## License
172
+
173
+ Released under **CC BY-NC-SA 4.0**. Non-commercial use, attribution required, derivatives
174
+ under the same terms. See the provenance section regarding upstream material.
data/doctor_annotated/train-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6a0c95e1cf06f41eafa1498178360d97107c352f4ad8ae0cf497ce36a56c2d09
3
+ size 1453845
data/qa/train-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:dec2019b778ca8d1fa589189a5cea3f49603ef75694a4b027e6b6f9d0bf743e2
3
+ size 7456532