Skip to content
Cette page n'est pas encore disponible dans votre langue. La version anglaise est affichée.

Pairwise Comparison

प्राथमिकता और गुणवत्ता मूल्यांकन के लिए आइटम जोड़ों की तुलना करें।

Pairwise Comparison

Pairwise comparison एनोटेटर्स को दो आइटम साइड-बाय-साइड तुलना करने और अपनी प्राथमिकता बताने की अनुमति देता है। यह दो मोड का समर्थन करता है:

  1. Binary Mode (डिफ़ॉल्ट): पसंदीदा टाइल (A या B) पर क्लिक करें, वैकल्पिक tie बटन के साथ
  2. Scale Mode: यह रेट करने के लिए slider का उपयोग करें कि एक विकल्प दूसरे से कितना बेहतर है

सामान्य उपयोग के मामलों में मॉडल आउटपुट की तुलना, RLHF के लिए preference learning, अनुवाद या सारांश की गुणवत्ता तुलना, और A/B परीक्षण शामिल हैं।

Binary Mode

Binary mode दो क्लिक करने योग्य टाइल प्रदर्शित करता है। एनोटेटर अपने पसंदीदा विकल्प पर क्लिक करते हैं।

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

Scale Mode

Scale mode दो आइटम के बीच एक slider प्रदर्शित करता है, जो एनोटेटर्स को प्राथमिकता की डिग्री बताने की अनुमति देता है।

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

डेटा फॉर्मेट

स्कीमा तुलना करने के लिए आइटम्स की सूची के साथ instance डेटा की अपेक्षा करता है:

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 के साथ binary mode में:

कुंजीक्रिया
1विकल्प A चुनें
2विकल्प B चुनें
0Tie/कोई प्राथमिकता नहीं चुनें (यदि allow_tie: true)

Scale mode slider इंटरैक्शन का उपयोग करता है।

आउटपुट फॉर्मेट

Binary Mode

json
{
  "preference": {
    "selection": "A"
  }
}

Tie के साथ:

json
{
  "preference": {
    "selection": "tie"
  }
}

Scale Mode

नकारात्मक मान A के लिए प्राथमिकता, सकारात्मक B के लिए, शून्य बराबर के लिए:

json
{
  "preference_scale": {
    "scale_value": "-2"
  }
}

उदाहरण

बुनियादी Binary Comparison

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

कस्टम रेंज के साथ Preference Scale

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 Preference Collection

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

Styling

Pairwise एनोटेशन थीम सिस्टम से CSS variables का उपयोग करता है। टाइल कस्टमाइज़ेशन के लिए कस्टम 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);
}

सर्वोत्तम प्रथाएँ

  1. स्पष्ट, विशिष्ट लेबल का उपयोग करें - एनोटेटर्स को तुरंत विकल्प समझने चाहिए
  2. Tie विकल्पों पर सावधानी से विचार करें - कभी-कभी चुनाव को मजबूर करना उचित होता है
  3. कीबोर्ड शॉर्टकट का उपयोग करें - एनोटेशन को काफी तेज़ करता है
  4. औचित्य फ़ील्ड जोड़ें - तर्क समझने और डेटा गुणवत्ता सुधारने में मदद करता है
  5. अपने डेटा के साथ परीक्षण करें - सुनिश्चित करें कि प्रदर्शन आपकी सामग्री लंबाई के साथ अच्छी तरह काम करता है

अधिक पढ़ें

कार्यान्वयन विवरण के लिए, स्रोत दस्तावेज़ीकरण देखें।