File size: 7,004 Bytes
a2c11fe 62dfebc 2dd6ecd ceb9fbf a2c11fe 8936a9e a2c11fe 62dfebc a2c11fe 55d723f 609959b 2c87331 ceb9fbf d6029bb 4bf0072 a412524 3b63af9 a412524 ceb9fbf 55d723f a2c11fe ceb9fbf a2c11fe 18d1dac ceb9fbf 62dfebc 452352b ceb9fbf 62dfebc ceb9fbf 62dfebc ceb9fbf a2c11fe cebd12d fac91f3 a2c11fe ceb9fbf a2c11fe ceb9fbf a2c11fe 8936a9e 62dfebc ceb9fbf 8936a9e b442b7b ceb9fbf 62dfebc a2c11fe d6029bb ceb9fbf d6029bb 8731413 ceb9fbf 62dfebc ceb9fbf 62dfebc ceb9fbf 62dfebc ceb9fbf d6029bb 8731413 409694a 2bcdab6 8731413 1b4bbb2 8731413 17e3ef5 818db54 8731413 d6029bb 8731413 ceb9fbf d6029bb 818db54 1b4bbb2 7396151 1b4bbb2 7396151 1b4bbb2 007bbde a2c11fe 62dfebc ceb9fbf 62dfebc ceb9fbf a2c11fe 62dfebc |
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 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 |
# Dataset Card for JamC-QA
[英語](https://huggingface.co/datasets/sbintuitions/JamC-QA)/日本語
## Dataset Summary
このベンチマークは、日本の文化や風習といった日本固有の知識を問う多肢選択式の質問応答ベンチマークです。
文化(culture)、風習(custom)、風土(regional_identity)、地理(geography)、日本史(history)、行政(government)、法律(law)、医療(healthcare)の 8つのカテゴリの問題を含みます。
このベンチマークで高いスコアを達成するには、日本に関する幅広い知識を獲得している必要があります。
## Leaderboard
### Evaluation Metric
本評価では選択肢に付与されたラベル(0-3)でなく、LLM に選択肢文字列そのものを出力させています。
以下のスコアは LLM の出力した文字列が正解選択肢の文字列と完全一致した問題数の割合です。
| モデル | All | 文化 | 風習 | 風土 | 地理 | 日本史 | 行政 | 法律 | 医療 |
|:---|----|---:|---:|---:|---:|---:|---:|---:|---:|
| [sarashina2-8x70b](https://huggingface.co/sbintuitions/sarashina2-8x70b) | **0.725** | 0.714 | **0.775** | **0.761** | 0.654 | **0.784** | 0.736 | 0.632 | **0.917** |
| [sarashina2-70b](https://huggingface.co/sbintuitions/sarashina2-70b) | **0.725** | **0.719** | 0.745 | 0.736 | **0.673** | 0.764 | 0.764 | 0.666 | **0.917** |
| [Llama-3.3-Swallow-70B-v0.4](https://huggingface.co/tokyotech-llm/Llama-3.3-Swallow-70B-v0.4) | 0.697 | 0.689 | **0.775** | 0.589 | 0.566 | 0.776 | **0.773** | **0.783** | 0.854 |
| [RakutenAI-2.0-8x7B](https://huggingface.co/Rakuten/RakutenAI-2.0-8x7B) | 0.633 | 0.622 | 0.725 | 0.617 | 0.511 | 0.714 | 0.709 | 0.575 | 0.813 |
| [plamo-100b](https://huggingface.co/pfnet/plamo-100b) | 0.603 | 0.602 | 0.650 | 0.637 | 0.504 | 0.682 | 0.609 | 0.515 | 0.688 |
| [Mixtral-8x7B-v0.1-japanese](https://huggingface.co/abeja/Mixtral-8x7B-v0.1-japanese) | 0.593 | 0.602 | 0.670 | 0.579 | 0.493 | 0.612 | 0.736 | 0.545 | 0.667 |
| [Meta-Llama-3.1-405B](https://huggingface.co/meta-llama/Llama-3.1-405B) | 0.571 | 0.558 | 0.545 | 0.484 | 0.500 | 0.679 | 0.646 | 0.629 | 0.688 |
| [llm-jp-3.1-8x13b](https://huggingface.co/llm-jp/llm-jp-3-8x13b) | 0.568 | 0.595 | 0.635 | 0.582 | 0.449 | 0.589 | 0.627 | 0.502 | 0.625 |
| [Nemotron-4-340B-Base](https://huggingface.co/mgoin/Nemotron-4-340B-Base-hf) | 0.567 | 0.573 | 0.615 | 0.511 | 0.467 | 0.595 | 0.727 | 0.582 | 0.667 |
| [Qwen2.5-72B](https://huggingface.co/Qwen/Qwen2.5-72B) | 0.527 | 0.522 | 0.595 | 0.426 | 0.438 | 0.606 | 0.609 | 0.562 | 0.688 |
## Language
日本語
## Dataset Structure
### Data Instances
文化カテゴリの問題例は以下の通り:
```
{
"qid": "jamcqa-test-culture-00001",
"category": "culture",
"question": "「狂った世で気が狂うなら気は確かだ」の名言を残した映画はどれ?",
"choice0": "影武者",
"choice1": "羅生門",
"choice2": "隠し砦の三悪人",
"choice3": "乱",
"answer_index": 3,
}
```
## Data Fields
- `qid (str)`: 質問を一意識別するための ID
- `category (str)`: 質問カテゴリ 全8種
- 文化(culture)、風習(custom)、風土(regional_identity)、地理(geography)、日本史(history)、行政(government)、法律(law)、医療(healthcare)
- `question (str)`: 質問文
- カタカナを除き、全角→半角統一済み
- 内部に改行 `\n` を含まない
- 文字列前後の空白は除去済み
- `choice{0..3} (str)`: 選択肢(choice0〜choice3 の 4つ)
- カタカナを除き、全角→半角統一済み
- 内部に改行 `\n` を含まない
- 文字列前後の空白は除去済み
- `answer_index (int)`: `choice0` 〜`choice3` に対応した正解選択肢のインデックス(0-3)
## Data Splits
- `dev`: カテゴリごとに 4-shot 学習用の 4問を設けています。
- `test`: 全 2,309問。
内訳は以下の通り:
| カテゴリ | dev | test |
| --- | ---: | ---: |
| 文化(culture) | 4 | 640 |
| 風習(custom) | 4 | 200 |
| 風土(regional_identity) | 4 | 397 |
| 地理(geography) | 4 | 272 |
| 日本史(history) | 4 | 343 |
| 行政(government) | 4 | 110 |
| 法律(law) | 4 | 299 |
| 医療(healthcare) | 4 | 48 |
| 合計 | 32 | 2,309 |
# Licensing Information
- [CC-BY-SA-4.0](https://creativecommons.org/licenses/by-sa/4.0/)
# Usage
## Dataset Loading
```python
$ python
>>> import datasets
>>> jamcqa = datasets.load_dataset('sbintuitions/JamC-QA', 'v1.0')
>>> print(jamcqa)
DatasetDict({
test: Dataset({
features: ['qid', 'category', 'question', 'choice0', 'choice1', 'choice2', 'choice3', 'answer_index'],
num_rows: 2309
})
dev: Dataset({
features: ['qid', 'category', 'question', 'choice0', 'choice1', 'choice2', 'choice3', 'answer_index'],
num_rows: 32
})
})
>>> jamcqa_test = jamcqa['test']
>>> print(jamcqa_test)
Dataset({
features: ['qid', 'category', 'question', 'choice0', 'choice1', 'choice2', 'choice3', 'answer_index'],
num_rows: 2309
})
>>> print(jamcqa_test[0])
{'qid': 'jamcqa-test-culture-00001', 'category': 'culture', 'question': '「狂った世で気が狂うなら気は確かだ」の名言を残した映画はどれ?', 'choice0': '影武者', 'choice1': '羅生門', 'choice2': '隠し砦の三悪人', 'choice3': '乱', 'answer_index': 3}
>>>
```
## Evaluation with FlexEval
評価用ツール [FlexEval](https://github.com/sbintuitions/flexeval) (>=0.13.3) を使うと、
[こちらのクイックスタート](https://github.com/sbintuitions/flexeval/blob/main/README_ja.md#%E3%82%AF%E3%82%A4%E3%83%83%E3%82%AF%E3%82%B9%E3%82%BF%E3%83%BC%E3%83%88)の
`aio` を `jamcqa` に置き換えるだけで簡単に JamC-QA のスコア評価を実行できます。
### Run Command
```python
flexeval_lm \
--language_model HuggingFaceLM \
--language_model.model "sbintuitions/sarashina2.2-0.5b" \
--language_model.default_gen_kwargs "{ do_sample: false }" \
--eval_setup "jamcqa" \
--save_dir "results/jamcqa"
```
`--language_model.default_gen_kwargs "{ do_sample: false }"` はサンプリングを使わず
[greedy search](https://huggingface.co/docs/transformers/ja/generation_strategies#greedy-search)
を行うオプションです。
### Output
```
...
2025-09-03 15:48:24.633 | INFO | flexeval.core.evaluate_generation:evaluate_generation:92 - {'exact_match': 0.2368990905153746, 'finish_reason_ratio-stop': 1.0, 'avg_output_length': 6.94283239497618, 'max_output_length': 93, 'min_output_length': 2}
...
```
# Citation Information
```
@inproceedings{Oka2025,
author={岡 照晃, 柴田 知秀, 吉田 奈央},
title={JamC-QA: 日本固有の知識を問う多肢選択式質問応答ベンチマークの構築},
year={2025},
month={March},
booktitle={言語処理学会第31回年次大会(NLP2025)},
pages={839--844},
}
```
|