lianghsun's picture
Build from 考選部 open data
b43079b verified
|
Raw
History Blame Contribute Delete
8.71 kB
metadata
license: apache-2.0
language:
  - zh
tags:
  - benchmark
  - evaluation
  - taiwan
  - zh-tw
  - multiple-choice
  - twinkle-eval
  - basic-electricity
task_categories:
  - question-answering
size_categories:
  - n<1K
configs:
  - config_name: default
    data_files:
      - split: test
        path: benchmark.csv

Basic Electricity (基本電學)

A multiple-choice benchmark for Basic Electricity — the subject 「基本電學」 as examined in Taiwan's national examinations, in Traditional Chinese. Built from the papers published as open data by the Ministry of Examination (考選部).

One dataset per academic subject: papers are grouped by the subject they examine, not by the professional category sitting the exam.

Part of OpenTWBench — an open evaluation suite for Taiwan-domain knowledge.

Overview

Property Value
Questions 803 (deduplicated)
Years 2012–2026
Source papers parsed 59 of 69
Format 4-choice single-answer (A/B/C/D)
Language Traditional Chinese (zh-TW)
Framework Twinkle Eval compatible
Field engineering

Fields

The row shape is the Twinkle Eval MCQ contract — question, AD, answer — with provenance columns alongside, which the harness ignores.

Field Description
question Question stem
A / B / C / D Option texts
answer Gold option letter
subject Full examination subject name (科目全名)
subject_group Examination category (類科組別)
exam_level Examination grade (等級分類)
exam_name Official title of the examination
year_roc / year_ce Exam year (ROC / CE calendar)
q_no Question number on the original paper
paper_id Originating paper identifier
n_source_papers How many papers published this identical item

Examination Categories

類科組別 Questions
電子工程 552
機檢工程 159
電子組 28
電子科學組 23
電子工程類科 21
電力工程 20

Examination Levels

等級分類 Questions
五等考試 359
初等考試 265
佐級考試 179

Usage

Twinkle Eval

twinkle-eval --init
# point `dataset_paths` at a directory holding benchmark.jsonl, then:
twinkle-eval --config config.yaml --export json csv

datasets

from datasets import load_dataset

ds = load_dataset("OpenTWBench/tw-basic-electricity-bench", split="test")
print(ds[0]["question"], ds[0]["answer"])

Construction

  1. Index — the Ministry of Examination open-data index (wHandExamQandA_CSV.ashx), filtered to multiple-choice papers that publish an answer key.
  2. Retrieval — question and answer-key PDFs fetched directly, rate-limited and cached.
  3. Parsing — PDF text layer extracted with PyMuPDF; see the hazards below.
  4. Filtering and deduplication — see below.

Parsing hazards handled

These silently corrupt naive extraction, so they are documented here:

  • Option markers live in the EUDC Private Use Area (U+E18CU+E190 = A–E) rather than as literal letters; some older layouts use A. or (A) instead.
  • Text mixes CJK Compatibility Ideographs. Normalised with NFCnot NFKC, which rewrites 「,」 to an ASCII comma.
  • Answer-key PDFs are grids whose text layer comes out shuffled: question labels and answer letters arrive in separate runs, sometimes out of order. Pairing by reading order misaligns the entire paper, so cells are paired by page coordinates instead, with the column tolerance derived from the grid pitch.
  • The first answer cell of a row is often glued to the row label in the text layer (答案C). Left unhandled, that cell goes missing and every label in the row pairs with its right-hand neighbour — shifting the whole paper by one.
  • Question numbers must run 1..N monotonically: a bare number inside a stem (frequent in quantitative papers) would otherwise start a phantom question.
  • Answer letters may be full-width () and marks a voided question.
  • Papers mix single-select and multi-select sections; multi-select keys are multi-letter tokens (ABDE).

Every paper is cross-checked against the question count its own answer sheet declares (單選題數/複選題數/題數); a mismatch rejects the paper rather than importing a silently shifted key.

Excluded

Excluded Count
Multi-select items 0
Voided items (一律給分) 14
English-language items 0
Items referring to a figure or table 989
Follow-up items in a 題組 (「承上題」) 11
Items whose last option swallowed following text 47
Items not in 4-choice form 79
Items whose stem was displaced by table debris 1
Items whose duplicate keys disagreed 0
Items already in tw-legal-benchmark-v2 0
Papers rejected by the answer-count check 0
Papers rejected as incompletely parsed 10

Questions already published in lianghsun/tw-legal-benchmark-v2 are removed item by item, not by dropping whole domains: several 法規 subjects (營建法規, 海巡法規, 郵政法規, 稅務法規) are examined inside otherwise non-legal categories, so excluding the category would discard its non-legal questions too.

English items are detected from the stem, not by question number: the boundary of the English section moves between years. Judging the options too would discard the many Chinese questions that are answered in English terminology — 「下列何者可 以抑制 ribonucleotide reductase 的活性?」 with options like dATP is a Chinese question about Taiwan-examined knowledge, and a zh-TW model is expected to answer it.

Items that point at a figure, table or reading passage printed on the paper are removed — they are unanswerable from the text alone, and keeping them would make every model look worse for the same reason. So are the follow-up questions of a 題組, which open with 「承上題」 and refer to a scenario set up by the previous question: the setup question is self-contained and stays, the follow-ups cannot be answered by anyone once lifted out of the paper.

The last option on a paper has no following marker for the parser to stop at, so table debris or the next question's text can run into it. Option texts are short — the 99.9th percentile is 95 characters — so an option far outside that and several times longer than its siblings is a parse failure, and the item is dropped rather than shipped broken.

Deduplication

The same paper is republished under several examination categories, so the same item recurs verbatim. Items are fingerprinted on their stem plus their sorted option set; 179 duplicate groups were collapsed, of which 0 carried disagreeing answer keys and were dropped entirely rather than guessed. n_source_papers records the multiplicity — 179 of the kept items were published more than once.

A benchmark built from this source without deduplication is inflated, and its accuracy is skewed toward whichever subset happens to be republished most.

Known Properties

  • Answer-position distribution: A=186, B=231, C=209, D=177. Shuffle options when evaluating (shuffle_options: true is the Twinkle Eval default).
  • Contamination risk: these are public past papers, widely discussed online and very likely present in pretraining corpora. Absolute scores should be treated with caution; the benchmark is most useful for relative comparison between models.
  • Answer extraction dominates low scores. If a model scores near zero, check the unparsed rate before believing the number — a model answering 「最終答案:C」 scores very differently under box and pattern extraction. Match the extraction method to the model.
  • Item difficulty is set by the examination committee, not by us.

Licensing

Questions and answer keys are official publications of the Ministry of Examination, Republic of China (Taiwan), released as open data. The packaging, parsing, deduplication and metadata in this repository are provided under Apache-2.0. Users intending redistribution should confirm the current terms published by 考選部.

Citation

@misc{opentwbench_basic_electricity,
  title  = {Basic Electricity Benchmark (Taiwan)},
  author = {Huang, Liang-Hsun},
  year   = {2026},
  url    = {https://huggingface.co/datasets/OpenTWBench/tw-basic-electricity-bench}
}