Skip to content

مرحلة التدريب

تدريب المعلّقين وتأهيلهم بأسئلة تدريبية قبل المهمة الرئيسية.

مرحلة التدريب

يتضمن Potato 2.0 مرحلة تدريب اختيارية تساعد في تأهيل المعلّقين قبل أن يبدأوا مهمة التعليق التوضيحي الرئيسية. يجيب المعلّقون على أسئلة تدريبية ذات إجابات صحيحة معروفة ويتلقون تغذية راجعة حول أدائهم.

حالات الاستخدام

  • التأكد من فهم المعلّقين للمهمة
  • تصفية المعلّقين ذوي الجودة المنخفضة
  • توفير تدريب عملي موجّه قبل التعليقات التوضيحية الحقيقية
  • جمع مقاييس جودة أساسية
  • تعليم إرشادات التعليق التوضيحي من خلال الأمثلة

كيف يعمل

  1. يكمل المعلّقون مجموعة من أسئلة التدريب
  2. يتلقون تغذية راجعة فورية على كل إجابة
  3. يُتتبع التقدم مقابل معايير النجاح
  4. فقط المعلّقون الذين ينجحون يمكنهم المتابعة إلى المهمة الرئيسية

التهيئة

الإعداد الأساسي

yaml
phases:
  training:
    enabled: true
    data_file: "data/training_data.json"
    schema_name: sentiment  # Which annotation scheme to train
 
    # Passing criteria
    passing_criteria:
      min_correct: 8  # Must get at least 8 correct
      total_questions: 10

التهيئة الكاملة

yaml
phases:
  training:
    enabled: true
    data_file: "data/training_data.json"
    schema_name: sentiment
 
    passing_criteria:
      # Different criteria options (choose one or combine)
      min_correct: 8
      require_all_correct: false
      max_mistakes: 3
      max_mistakes_per_question: 2
 
    # Allow retries
    retries:
      enabled: true
      max_retries: 3
 
    # Show explanations for incorrect answers
    show_explanations: true
 
    # Randomize question order
    randomize: true

معايير النجاح

يمكنك تحديد معايير مختلفة للنجاح في مرحلة التدريب:

الحد الأدنى من الإجابات الصحيحة

yaml
passing_criteria:
  min_correct: 8
  total_questions: 10

يجب أن يجيب المعلّق على 8 من أصل 10 أسئلة بشكل صحيح على الأقل.

إجابة صحيحة لجميع الأسئلة

yaml
passing_criteria:
  require_all_correct: true

يجب أن يجيب المعلّق على كل سؤال بشكل صحيح للنجاح.

الحد الأقصى من الأخطاء

yaml
passing_criteria:
  max_mistakes: 3

يُستبعد المعلّق بعد 3 أخطاء إجمالية.

الحد الأقصى من الأخطاء لكل سؤال

yaml
passing_criteria:
  max_mistakes_per_question: 2

يُستبعد المعلّق بعد خطأين في أي سؤال واحد.

معايير مجمّعة

yaml
passing_criteria:
  min_correct: 8
  max_mistakes_per_question: 3

يجب الإجابة على 8 أسئلة بشكل صحيح وعدم الفشل في أي سؤال أكثر من 3 مرات.

تنسيق بيانات التدريب

يجب أن تتضمن بيانات التدريب الإجابات الصحيحة والتفسيرات الاختيارية:

json
[
  {
    "id": "train_1",
    "text": "I absolutely love this product! Best purchase ever!",
    "correct_answers": {
      "sentiment": "Positive"
    },
    "explanation": "This text expresses strong positive sentiment with words like 'love' and 'best'."
  },
  {
    "id": "train_2",
    "text": "This is the worst service I've ever experienced.",
    "correct_answers": {
      "sentiment": "Negative"
    },
    "explanation": "The words 'worst' and the overall complaint indicate negative sentiment."
  },
  {
    "id": "train_3",
    "text": "The package arrived on time.",
    "correct_answers": {
      "sentiment": "Neutral"
    },
    "explanation": "This is a factual statement without emotional indicators."
  }
]

التدريب على مخططات متعددة

للمهام التي تحتوي على مخططات تعليق توضيحي متعددة:

json
{
  "id": "train_1",
  "text": "Apple announced new iPhone features yesterday.",
  "correct_answers": {
    "sentiment": "Neutral",
    "topic": "Technology"
  },
  "explanation": {
    "sentiment": "This is a factual news statement.",
    "topic": "The text discusses Apple and iPhone, which are tech topics."
  }
}

تجربة المستخدم

تدفق التدريب

  1. يرى المستخدم مؤشر "مرحلة التدريب"
  2. يُعرض السؤال مع نموذج التعليق التوضيحي
  3. يقدم المستخدم إجابته
  4. تُعرض التغذية الراجعة فوراً:
    • صحيح: علامة خضراء، الانتقال إلى التالي
    • خطأ: علامة X حمراء، عرض التفسير، خيار إعادة المحاولة

عرض التغذية الراجعة

عندما يجيب المعلّق بشكل خاطئ:

  • تُبرز الإجابة الصحيحة
  • يُعرض التفسير المقدم
  • يظهر زر إعادة المحاولة (إذا كانت إعادة المحاولة مفعّلة)
  • يُعرض التقدم نحو معايير النجاح

مراقبة المشرف

تتبع أداء التدريب في لوحة تحكم المشرف:

  • معدلات الإكمال
  • متوسط الإجابات الصحيحة
  • معدلات النجاح/الفشل
  • الوقت المستغرق في التدريب
  • الدقة لكل سؤال

الوصول عبر نقاط نهاية /admin:

text
GET /api/admin/training/stats
GET /api/admin/training/user/{user_id}

مثال: تدريب تحليل المشاعر

yaml
task_name: "Sentiment Analysis"
task_dir: "."
port: 8000
 
# Main annotation data
data_files:
  - "data/reviews.json"
 
item_properties:
  id_key: id
  text_key: text
 
annotation_schemes:
  - annotation_type: radio
    name: sentiment
    description: "What is the sentiment of this review?"
    labels:
      - Positive
      - Negative
      - Neutral
 
# Training phase configuration
phases:
  training:
    enabled: true
    data_file: "data/training_questions.json"
    schema_name: sentiment
 
    passing_criteria:
      min_correct: 8
      total_questions: 10
      max_mistakes_per_question: 2
 
    retries:
      enabled: true
      max_retries: 3
 
    show_explanations: true
    randomize: true
 
output_annotation_dir: "output/"
output_annotation_format: "json"
allow_all_users: true

مثال: تدريب التعرف على الكيانات المسماة

yaml
annotation_schemes:
  - annotation_type: span
    name: entities
    description: "Highlight named entities"
    labels:
      - Person
      - Organization
      - Location
      - Date
 
phases:
  training:
    enabled: true
    data_file: "data/ner_training.json"
    schema_name: entities
 
    passing_criteria:
      min_correct: 7
      total_questions: 10
 
    show_explanations: true

بيانات التدريب للتعليق التوضيحي على النطاقات:

json
{
  "id": "train_1",
  "text": "Tim Cook announced that Apple will open a new store in New York on March 15.",
  "correct_answers": {
    "entities": [
      {"start": 0, "end": 8, "label": "Person"},
      {"start": 24, "end": 29, "label": "Organization"},
      {"start": 54, "end": 62, "label": "Location"},
      {"start": 66, "end": 74, "label": "Date"}
    ]
  },
  "explanation": "Tim Cook is a Person, Apple is an Organization, New York is a Location, and March 15 is a Date."
}

أفضل الممارسات

1. ابدأ ببساطة

ابدأ بأمثلة مباشرة قبل تقديم الحالات الحدّية:

json
[
  {"text": "I love this!", "correct_answers": {"sentiment": "Positive"}},
  {"text": "I hate this!", "correct_answers": {"sentiment": "Negative"}},
  {"text": "It arrived yesterday.", "correct_answers": {"sentiment": "Neutral"}}
]

2. غطِّ جميع التسميات

تأكد من أن التدريب يتضمن أمثلة لكل تسمية ممكنة:

json
[
  {"correct_answers": {"sentiment": "Positive"}},
  {"correct_answers": {"sentiment": "Negative"}},
  {"correct_answers": {"sentiment": "Neutral"}}
]

3. اكتب تفسيرات واضحة

يجب أن تعلّم التفسيرات إرشادات التعليق التوضيحي:

json
{
  "explanation": "While this text mentions a problem, the overall tone is constructive and the reviewer expresses satisfaction with the resolution. This makes it Positive rather than Negative."
}

4. حدد معايير معقولة

لا تشترط الكمال دون ضرورة:

yaml
# Too strict - may lose good annotators
passing_criteria:
  require_all_correct: true
 
# Better - allows for learning
passing_criteria:
  min_correct: 8
  total_questions: 10

5. أدرج الحالات الحدّية

أضف أمثلة صعبة لإعداد المعلّقين:

json
{
  "text": "Not bad at all, I guess it could be worse.",
  "correct_answers": {"sentiment": "Neutral"},
  "explanation": "Despite negative words like 'not bad' and 'worse', this is actually a lukewarm endorsement - neutral rather than positive or negative."
}

التكامل مع سير العمل

يتكامل التدريب مع سير العمل متعدد المراحل:

yaml
phases:
  consent:
    enabled: true
    data_file: "data/consent.json"
 
  prestudy:
    enabled: true
    data_file: "data/demographics.json"
 
  instructions:
    enabled: true
    content: "data/instructions.html"
 
  training:
    enabled: true
    data_file: "data/training.json"
    schema_name: sentiment
    passing_criteria:
      min_correct: 8
 
  annotation:
    # Main task - always enabled
    enabled: true
 
  poststudy:
    enabled: true
    data_file: "data/feedback.json"

اعتبارات الأداء

  • تُحمّل بيانات التدريب عند بدء التشغيل
  • يُخزّن التقدم في الذاكرة لكل جلسة
  • تأثير ضئيل على أداء التعليق التوضيحي الرئيسي
  • فكّر في فصل التدريب المعقد إلى مراحل متعددة

قراءات إضافية

للاطلاع على تفاصيل التنفيذ، راجع الوثائق المصدرية.