ペアワイズ比較
好みと品質評価のためのアイテムペアの比較。
ペアワイズ比較
ペアワイズ比較により、アノテーターは2つのアイテムを並べて比較し、好みを示すことができます。2つのモードをサポートしています:
- バイナリモード(デフォルト):好みのタイル(AまたはB)をクリック、オプションで引き分けボタン付き
- スケールモード:スライダーを使用して一方のオプションがもう一方よりどの程度好ましいかを評価
一般的なユースケースには、モデル出力の比較、RLHFのための選好学習、翻訳や要約の品質比較、A/Bテストが含まれます。
バイナリモード
バイナリモードは2つのクリック可能なタイルを表示します。アノテーターは好みのオプションをクリックします。
yaml
annotation_schemes:
- annotation_type: pairwise
name: preference
description: "Which response is better?"
mode: binary
# Data source - key in instance data containing items to compare
items_key: "responses"
# Display options
show_labels: true
labels:
- "Response A"
- "Response B"
# Tie option
allow_tie: true
tie_label: "No preference"
# Keyboard shortcuts
sequential_key_binding: true
# Validation
label_requirement:
required: trueスケールモード
スケールモードは2つのアイテム間にスライダーを表示し、アノテーターが好みの程度を示すことができます。
yaml
annotation_schemes:
- annotation_type: pairwise
name: preference_scale
description: "Rate how much better A is than B"
mode: scale
items_key: "responses"
labels:
- "Response A"
- "Response B"
# Scale configuration
scale:
min: -3 # Negative = prefer left item (A)
max: 3 # Positive = prefer right item (B)
step: 1
default: 0
# Endpoint labels
labels:
min: "A is much better"
max: "B is much better"
center: "Equal"
label_requirement:
required: trueデータ形式
スキーマは比較するアイテムのリストを含むインスタンスデータを期待します:
json
{"id": "1", "responses": ["Response A text", "Response B text"]}
{"id": "2", "responses": ["First option here", "Second option here"]}items_key設定は比較するアイテムを含むフィールドを指定します。フィールドには少なくとも2つのアイテムを含むリストが必要です。
キーボードショートカット
sequential_key_binding: trueのバイナリモード:
| キー | アクション |
|---|---|
1 | オプションAを選択 |
2 | オプションBを選択 |
0 | 引き分け/好みなしを選択(allow_tie: trueの場合) |
スケールモードはスライダー操作を使用します。
出力形式
バイナリモード
json
{
"preference": {
"selection": "A"
}
}引き分けの場合:
json
{
"preference": {
"selection": "tie"
}
}スケールモード
負の値はAの選好、正の値はBの選好、ゼロは同等を示します:
json
{
"preference_scale": {
"scale_value": "-2"
}
}例
基本的なバイナリ比較
yaml
annotation_schemes:
- annotation_type: pairwise
name: quality
description: "Which text is higher quality?"
labels: ["Text A", "Text B"]
allow_tie: true多側面比較
複数の次元で比較:
yaml
annotation_schemes:
- annotation_type: pairwise
name: fluency
description: "Which response is more fluent?"
labels: ["Response A", "Response B"]
- annotation_type: pairwise
name: relevance
description: "Which response is more relevant?"
labels: ["Response A", "Response B"]
- annotation_type: pairwise
name: overall
description: "Which response is better overall?"
labels: ["Response A", "Response B"]
allow_tie: trueカスタム範囲の選好スケール
yaml
annotation_schemes:
- annotation_type: pairwise
name: sentiment_comparison
description: "Compare the sentiment of these two statements"
mode: scale
labels: ["Statement A", "Statement B"]
scale:
min: -5
max: 5
step: 1
labels:
min: "A is much more positive"
max: "B is much more positive"
center: "Equal sentiment"RLHF選好収集
yaml
annotation_schemes:
- annotation_type: pairwise
name: overall
description: "Overall, which response is better?"
labels: ["Response A", "Response B"]
allow_tie: true
sequential_key_binding: true
- annotation_type: multiselect
name: criteria
description: "What factors influenced your decision?"
labels:
- Accuracy
- Helpfulness
- Clarity
- Safety
- Completeness
- annotation_type: text
name: notes
description: "Additional notes (optional)"
textarea: true
required: falseスタイリング
ペアワイズアノテーションはテーマシステムのCSS変数を使用します。タイルのカスタマイズにはカスタムCSSを追加します:
css
/* Make tiles taller */
.pairwise-tile {
min-height: 200px;
}
/* Change selected tile highlight */
.pairwise-tile.selected {
border-color: #10b981;
background-color: rgba(16, 185, 129, 0.1);
}ベストプラクティス
- 明確で区別しやすいラベルを使用 - アノテーターがすぐにオプションを理解できるようにする
- 引き分けオプションを慎重に検討 - 選択を強制することが適切な場合もある
- キーボードショートカットを使用 - アノテーション速度を大幅に向上
- 根拠フィールドを追加 - 推論の理解とデータ品質の向上に役立つ
- データでテスト - コンテンツの長さに合わせて表示が適切に機能するか確認
関連資料
実装の詳細については、ソースドキュメントを参照してください。