TW-LegalBench-test2 / README.md
feiyuehchen's picture
Keep metadata nested; only drop 100%-empty columns
1fa865d verified
---
language:
- zh
- en
language_bcp47:
- zh-Hant
- zh-Hans
- en
license: mit
pretty_name: TW-LegalBench
size_categories:
- 10K<n<100K
task_categories:
- multiple-choice
- text-generation
- question-answering
tags:
- legal
- taiwan
- benchmark
- icail-2026
configs:
- config_name: close_exam_tc
data_files:
- split: test
path: close_exam/tc/test.parquet
- config_name: close_exam_sc
data_files:
- split: test
path: close_exam/sc/test.parquet
- config_name: close_exam_en
data_files:
- split: test
path: close_exam/en/test.parquet
- config_name: open_exam
data_files:
- split: test
path: open_exam/test.parquet
- config_name: verdict_prediction
data_files:
- split: train
path: verdict_prediction/train.parquet
- split: test
path: verdict_prediction/test.parquet
---
\
# TW-LegalBench
Taiwan legal reasoning benchmark for large language models. Accepted to
**ICAIL 2026**.
## Configs
| Config | Split | Rows | Description |
| --- | --- | ---: | --- |
| `close_exam_tc` | test | 16643 | Multiple-choice questions from Taiwan legal exams (2020–2024), Traditional Chinese |
| `close_exam_sc` | test | 16643 | Same questions, Simplified Chinese translation |
| `close_exam_en` | test | 16643 | Same questions, English translation |
| `open_exam` | test | 117 | Bar-exam essay questions with official scoring rubrics |
| `verdict_prediction` | train / test | 13790 / 535 | Predict a Taiwan criminal verdict main text (主文) from case facts |
## Load
```python
from datasets import load_dataset
# MCQ (Traditional Chinese)
mcq = load_dataset("feiyuehchen/TW-LegalBench", "close_exam_tc", split="test")
# Essay
essay = load_dataset("feiyuehchen/TW-LegalBench", "open_exam", split="test")
# Verdict prediction
verdict = load_dataset("feiyuehchen/TW-LegalBench", "verdict_prediction")
# → DatasetDict({"train": ..., "test": ...})
```
## Metrics reported in the paper
- **Close Exam** — accuracy over 4 options (A–D).
- **Open Exam** — LLM-as-Judge coverage of the official scoring points,
graded on a 3-point scale (yes / partial / no).
- **Verdict Prediction** — ROUGE-1/2/L (jieba tokenization) +
multilingual sentence-transformers similarity + legal-validity heuristics
(defendant / crime / sentence / law-article presence, hallucinated-law
detection).
See the paper for full methodology and reported numbers.
## Fields
### `close_exam_*`
Top-level: `question_id`, `question`, `options` (list, A–D), `correct_answer`
(string A–D), and a nested `metadata` struct:
```
metadata:
year, exam_id, exam_category, professional_level, profession, subject,
full_name, primary_key, source,
is_law_related, jurisdiction,
related_internal_law, related_international_law,
laws_tc, laws_en
```
Some metadata fields are sparse by design — e.g. `related_international_law`
is only populated when a hand-annotator flagged a question as citing an
international instrument (~125 rows).
### `open_exam`
Top-level: `question_id`, `year`, `subject`, `subject_code`,
`question_number`, `question_text`, `question_text_with_points`, `points`,
`reference_law_names`, `scoring_points` (list of struct with `point_id` /
`description` / `max_score`), plus a nested `metadata` struct with
`exam_name` / `exam_type` / `question_type` and derived flags.
Dropped: `sub_questions`, `sub_questions_with_points`, `reference_laws`
(all 100% null in the source).
### `verdict_prediction`
All 28 non-null upstream columns preserved. Paper task uses `fact` → `main_result`.
Dropped: 10 all-NaN pipeline leftovers (`law_used`, `history_trial`,
`history_res`, `link`, `warn_lawyer`, `per_result`, `is_murder`,
`puni_murder`, `main_crime`, `indictment`) plus the pandas `Unnamed: 0`
row-number artifact.
## License
MIT for the code and annotation effort. The underlying exam questions are
released under the respective copyright terms of the Taiwan Ministry of
Examination; the verdict texts are public judicial records from the
Judicial Yuan. Cite the paper if you use this benchmark.