freddy4212's picture
Upload README.md with huggingface_hub
4258c09 verified
|
Raw
History Blame Contribute Delete
7.21 kB
---
dataset_info:
- config_name: full_consensus
features:
- name: id
dtype: string
- name: text
dtype: string
- name: score_gemma
dtype: int8
- name: score_glm
dtype: int8
- name: score_qwen
dtype: int8
- name: score
dtype: int8
- name: label_group
dtype: int8
splits:
- name: train
num_bytes: 1214754817
num_examples: 88060
- name: validation
num_bytes: 151851249
num_examples: 11008
- name: test
num_bytes: 151809865
num_examples: 11005
download_size: 788121587
dataset_size: 1518415931
- config_name: no_consensus
features:
- name: id
dtype: string
- name: text
dtype: string
- name: score_gemma
dtype: int8
- name: score_glm
dtype: int8
- name: score_qwen
dtype: int8
splits:
- name: train
num_bytes: 179509583
num_examples: 3722
- name: validation
num_bytes: 22426640
num_examples: 465
- name: test
num_bytes: 22426640
num_examples: 465
download_size: 111215020
dataset_size: 224362863
- config_name: partial_consensus
features:
- name: id
dtype: string
- name: text
dtype: string
- name: score_gemma
dtype: int8
- name: score_glm
dtype: int8
- name: score_qwen
dtype: int8
- name: score
dtype: int8
- name: label_group
dtype: int8
splits:
- name: train
num_bytes: 1110140808
num_examples: 57813
- name: validation
num_bytes: 138755599
num_examples: 7226
- name: test
num_bytes: 138755599
num_examples: 7226
download_size: 711975306
dataset_size: 1387652006
configs:
- config_name: full_consensus
data_files:
- split: train
path: full_consensus/train-*
- split: validation
path: full_consensus/validation-*
- split: test
path: full_consensus/test-*
- config_name: no_consensus
data_files:
- split: train
path: no_consensus/train-*
- split: validation
path: no_consensus/validation-*
- split: test
path: no_consensus/test-*
- config_name: partial_consensus
data_files:
- split: train
path: partial_consensus/train-*
- split: validation
path: partial_consensus/validation-*
- split: test
path: partial_consensus/test-*
task_categories:
- text-classification
tags:
- text-classification
- quality-scoring
- chinese
- zh-tw
language:
- zh
---
# 文章教育品質分類資料集(zh-TW)
繁體中文文章的**教育品質**分類資料集,每篇文章由三個大型語言模型(LLM)依 1–5 分的教育價值標準獨立評分。資料依「模型共識程度」拆成三個 subset,供訓練品質分類器(quality classifier)使用。
> 建立目的:在 embedding model 之上訓練一個 classifier head,把文章依教育品質分為 A/B/C 三組。
---
## Subsets(共識程度)
| Subset | 定義 | 筆數 | 是否含 `score` / `label_group` |
|---|---|---|---|
| `full_consensus` | 三顆模型**完全同分** | 110,073 | ✅ |
| `partial_consensus` | **剛好兩顆**同分(取眾數;平手取高分) | 72,265 | ✅ |
| `no_consensus` | 三顆**全異**,無共識分數 | 4,652 | ❌(僅保留三個模型各自分數) |
每個 subset 皆再切為 `train` / `validation` / `test`(見下方「資料切分」)。
## 欄位
| 欄位 | 型別 | 說明 |
|---|---|---|
| `id` | string | 原始文章 id(對應來源資料集) |
| `text` | string | 原始文本 |
| `score_gemma` | int8 | gemma 評分(1–5) |
| `score_glm` | int8 | glm 評分(1–5) |
| `score_qwen` | int8 | qwen 評分(1–5) |
| `score` | int8 | 共識分數(1–5)。*僅 full / partial* |
| `label_group` | int8 | 分組標籤(見下)。*僅 full / partial* |
### ABC 分組(`label_group`)
| label_group | 組別 | 對應分數 | full_consensus 筆數 |
|---|---|---|---|
| `0` | A | 1–2 分(低教育價值) | 101,008 |
| `1` | B | 3 分(中) | 3,401 |
| `2` | C | 4–5 分(高教育價值) | 5,664 |
`partial_consensus` 亦以相同規則分組;`no_consensus` 不分組。
### 類別不平衡與 class weights
full_consensus 三組極度不平衡(A 約 92%)。以 balanced inverse-frequency `n / (k · n_c)` 計算的權重約為:
| 組別 | class weight |
|---|---|
| A (1-2) | 0.36 |
| B (3) | 10.78 |
| C (4-5) | 6.47 |
> ⚠️ 由於不平衡,評估請看 **macro-F1 / per-class recall / 混淆矩陣**,不要看 accuracy(全猜 A 即約 92%)。
## 資料切分
- 比例 `train / validation / test = 80 / 10 / 10`。
- **分層(stratified)**:以 `(consensus, score)` 為分層鍵,於每一層內切分,保證各 subset、各分數層的三份比例一致。
- **固定亂數種子(seed=42)**,完全可重現;切分為 HF 原生 split,不能以 test 調參。
## 使用
```python
from datasets import load_dataset
# 完全共識、訓練集
ds = load_dataset("freddy4212/finepdfs-classifier-raw", "full_consensus", split="train")
# 各原生 split
val = load_dataset("freddy4212/finepdfs-classifier-raw", "full_consensus", split="validation")
test = load_dataset("freddy4212/finepdfs-classifier-raw", "full_consensus", split="test")
# 之後若要擴充資料,可再併入部分共識
partial = load_dataset("freddy4212/finepdfs-classifier-raw", "partial_consensus", split="train")
```
---
## 評分方法(Judge)
每篇文本送入**三個獨立的 LLM 評審**評分,各自輸出 1–5 分:
- **Prompt 版本**:v1(教育價值評分,對象設定為「中學到博士級」教學環境)。
- **設定**:`temperature=0`、強制 JSON 輸出(`{"reason", "score"}`)、關閉 thinking、送入文本截斷至前 20,000 字元。
- **共識**:三顆同分 → full;剛好兩顆同分 → partial(取眾數,平手取高分);三顆全異 → none。
### 評分標準(1–5,加分制、漸進包含)
1. **1 分**:僅零星孤立事實、大量非教育內容(純廣告、生活瑣事、商業宣傳、坊間傳聞等),不構成有效學習材料。
2. **2 分**:含教育訊息但碎片化、混雜較多非教育成分(操作指引、產品說明、單一個案/訪談、觀點多於論證等),需教師大量引導。
3. **3 分**:圍繞明確基礎學科、有定義與基礎概念,適合入門但深度有限;為「具學術原理探討的文學/藝術/社會等單一個案」所能得的最高分。
4. **4 分**:教育性佔比高、非教育成分極少,對齊公認學術領域與課程目標,可作課程主幹或深入學習案例。
5. **5 分**:幾乎全為學術原理/學科知識,提供理論、模型、複雜或跨學科解析,可作核心教材(如教科書、教學網站)。
> 分數為 **LLM 評審**產生,非人工標註;反映模型對「教育價值」的判斷,可能帶有模型偏好。`full_consensus`(三方一致)訊號最強、雜訊最低,建議優先作為訓練與評估主體。
## 限制與注意事項
- 文本已於評分階段截斷至前 20,000 字元;超長文件的後段未參與評分。
- 標籤來自 LLM 而非人工,B(3 分)為模糊中間帶,類別間邊界可能不銳利。
- 極度不平衡,務必搭配 class weights / 重採樣 / 閾值調整,並以 macro 指標評估。