File size: 5,166 Bytes
bbf0a79
 
 
 
0f0914f
bbf0a79
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
067623d
 
 
a7c7fcf
067623d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
f45ca09
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
---
language:
- ja
- en
license: mit
tags:
- evaluation
- llm-evaluation
- emotional-intelligence
- eq-bench
- teeneemo
pretty_name: EQ-Bench3 日本語化パッチ (TeenEmo)
size_categories:
- n<1K
task_categories:
- text-generation
annotations_creators:
- machine-generated
language_creators:
- machine-generated
source_datasets:
- EQ-bench/eqbench3
---

# EQ-Bench3 日本語化パッチ (teememo-eq-bench-ja)

[EQ-Bench3](https://github.com/EQ-bench/eqbench3) を日本語で評価するための翻訳データと差分パッチのセットです。  


---

## リポジトリ構成

```
teememo-eq-bench-ja/
├── apply_patch.sh           # ← パッチ適用スクリプト(これを実行するだけ)
└── data/
    ├── benchmark.patch      # core/benchmark.py 差分 (Fix-B1)
    ├── conversation.patch   # core/conversation.py 差分 (Fix-C1)

    ├── scenario_prompts_ja.txt                    # シナリオプロンプト (日本語)
    ├── scenario_prompts_en.txt                    # シナリオプロンプト (英語・参照用)
    ├── scenario_notes_ja.txt
    ├── scenario_notes_en.txt
    ├── scenario_master_prompt_ja.txt
    ├── scenario_master_prompt_en.txt
    ├── scenario_master_prompt_message_drafting_ja.txt
    ├── scenario_master_prompt_message_drafting_en.txt
    ├── scenario_master_prompt_analysis_ja.txt
    ├── scenario_master_prompt_analysis_en.txt
    ├── rubric_scoring_prompt_ja.txt
    ├── rubric_scoring_prompt_en.txt
    ├── rubric_scoring_prompt_analysis_ja.txt
    ├── rubric_scoring_prompt_analysis_en.txt
    ├── rubric_scoring_criteria_ja.txt             # ※ファイル内は英語キーのまま
    ├── rubric_scoring_criteria_en.txt
    ├── rubric_scoring_criteria_analysis_ja.txt
    ├── rubric_scoring_criteria_analysis_en.txt
    ├── pairwise_prompt_eqbench3_ja.txt
    ├── pairwise_prompt_eqbench3_en.txt
    ├── pairwise_prompt_eqbench3_analysis_ja.txt
    ├── pairwise_prompt_eqbench3_analysis_en.txt
    ├── debrief_prompt_ja.txt
    └── debrief_prompt_en.txt
```

---

## クイックスタート

```bash
# 1. EQ-Bench3 本体をクローン
git clone --depth=1 https://github.com/EQ-bench/eqbench3.git
cd eqbench3

# 2. このリポジトリをクローン
git clone https://huggingface.co/datasets/YUGOROU/teememo-eq-bench-ja ../teememo-eq-bench-ja

# 3. パッチを一括適用
bash ../teememo-eq-bench-ja/apply_patch.sh

# 4. 評価実行
python eqbench3.py \
  --test-model <your_model> \
  --judge-model openai/gpt-oss-120b \
  --no-elo \
  --save-interval 1
```

---

## 変更内容の詳細

### [Fix-D1] 日本語テキストファイルの配置

`data/*_ja.txt` を EQ-Bench3 の `data/` 配下の対応するベースファイル名へコピーします。  
元の英語ファイルは `.en.bak` として自動バックアップされます。

| コピー元 (`data/`) | コピー先 (`eqbench3/data/`) |
|---|---|
| `scenario_prompts_ja.txt` | `scenario_prompts.txt` |
| `rubric_scoring_prompt_ja.txt` | `rubric_scoring_prompt.txt` |
| `pairwise_prompt_eqbench3_ja.txt` | `pairwise_prompt_eqbench3.txt` |
| … (全12ファイル) | … |

> **注意**: `rubric_scoring_criteria_ja.txt` の**キー名は英語のまま**です (`demonstrated_empathy` など)。  
> スコアリングロジックが英語キーで照合するため、値の説明文のみ日本語化しています。

### [Fix-B1] `core/benchmark.py` — 動的 criteria 読み込み

`STANDARD_ALLOWED_RUBRIC_CRITERIA` のハードコードを除去し、`STANDARD_RUBRIC_CRITERIA_FILE` から動的に読み込むよう変更します。  
日本語版でも英語キーが一致するため、スコアが正しく集計されます。  
差分: [`data/benchmark.patch`](data/benchmark.patch)

### [Fix-C1] `core/conversation.py` — 日本語セクションヘッダー対応

モデルが日本語でセクションヘッダーを返した場合のフォールバック正規表現を追加します。  
英語ヘッダー (`# My response` 等) が第一優先で、`master_prompt_ja.txt` も英語見出しを使用しています。  
差分: [`data/conversation.patch`](data/conversation.patch)

---

## 翻訳方針

- **シナリオプロンプト**: 文化的文脈を日本の高校生・大学生向けに自然に翻訳
- **プレースホルダー** (`{scenario_prompt}` 等): 変更なし
- **評価基準キー**: 英語キーを維持(スコアリングロジックとの互換性のため)
- **評価基準の説明文**: 日本語に翻訳

---

## 動作確認環境

- EQ-Bench3 `HEAD` (2025年5月時点)
- Judge model: `openai/gpt-oss-120b` (novita プロバイダー経由)
- Test model: `YUGOROU/TeenEmo-LFM2.5-1.2B-DPO` (LoRA adapter)
- GPU: NVIDIA RTX 4090 on Vast.ai

---

## ライセンス

翻訳データは [EQ-Bench3](https://github.com/EQ-bench/eqbench3) のライセンスに準拠します。  
TeenEmo プロジェクト固有の追加コードは MIT ライセンスで提供します。