Skip to content
Diese Seite ist in Ihrer Sprache noch nicht verfügbar. Englische Version wird angezeigt.

Behavioral Tracking

गुणवत्ता विश्लेषण और शोध के लिए विस्तृत interaction data capture करें।

Behavioral Tracking

Potato की behavioral tracking system annotation sessions के दौरान विस्तृत interaction data capture करती है, जिससे शोधकर्ताओं को annotator व्यवहार, timing patterns, AI assistance उपयोग, और निर्णय-लेने की प्रक्रियाओं का विश्लेषण करने में सक्षम बनाती है।

अवलोकन

Behavioral tracking system capture करती है:

  • प्रत्येक annotation क्रिया: Label selections, span annotations, text inputs
  • सटीक timestamps: Server और client-side timestamps
  • AI assistance उपयोग: कब suggestions दिखाए गए और क्या वे स्वीकार किए गए
  • Focus और timing data: प्रत्येक element पर बिताया समय, scroll depth
  • Navigation इतिहास: Instances के माध्यम से पूर्ण मार्ग

क्या ट्रैक होता है

Interaction Events

Annotation interface के साथ प्रत्येक user interaction capture किया जाता है:

Event Typeविवरणउदाहरण Target
clickElements पर Mouse clickslabel:positive, nav:next
focus_inElement focus प्राप्त करता हैtextbox:explanation
focus_outElement focus खोता हैlabel:negative
keypressKeyboard shortcutskey:1, nav:ArrowRight
navigationInstance navigationnext, prev, instance_load
saveAnnotation save eventsinstance:123
annotation_changeLabel modificationsschema:sentiment

AI Assistance उपयोग

AI-assisted annotation के लिए पूर्ण lifecycle tracking:

json
{
  "request_timestamp": 1706500010.0,
  "response_timestamp": 1706500012.5,
  "schema_name": "sentiment",
  "suggestions_shown": ["positive", "neutral"],
  "suggestion_accepted": "positive",
  "time_to_decision_ms": 3500
}

Annotation परिवर्तन

सभी annotations के लिए विस्तृत परिवर्तन इतिहास:

json
{
  "timestamp": 1706500002.5,
  "schema_name": "sentiment",
  "label_name": "positive",
  "action": "select",
  "old_value": null,
  "new_value": true,
  "source": "user"
}

Source types:

  • user - प्रत्यक्ष user interaction
  • ai_accept - User ने AI suggestion स्वीकार किया
  • keyboard - Keyboard shortcut का उपयोग किया
  • prefill - कॉन्फ़िगरेशन से Pre-filled

Data Format

प्रत्येक annotation instance में एक behavioral_data object शामिल है:

json
{
  "id": "instance_123",
  "annotations": {
    "sentiment": {"positive": true}
  },
  "behavioral_data": {
    "instance_id": "instance_123",
    "session_start": 1706500000.0,
    "session_end": 1706500045.0,
    "total_time_ms": 45000,
    "interactions": [...],
    "ai_usage": [...],
    "annotation_changes": [...],
    "navigation_history": [...],
    "focus_time_by_element": {
      "label:positive": 2500,
      "textbox:explanation": 8000
    },
    "scroll_depth_max": 75.5
  }
}

कॉन्फ़िगरेशन

Behavioral tracking default रूप से सक्षम है। कोई अतिरिक्त कॉन्फ़िगरेशन आवश्यक नहीं।

Frontend Debug Mode

Interaction tracker के लिए debug logging सक्षम करने के लिए:

javascript
// In browser console
window.interactionTracker.setDebugMode(true);

विश्लेषण उदाहरण

Behavioral Data लोड करना

python
import json
from pathlib import Path
 
def load_behavioral_data(annotation_dir: str) -> dict:
    data = {}
    for user_dir in Path(annotation_dir).iterdir():
        if not user_dir.is_dir():
            continue
        state_file = user_dir / 'user_state.json'
        if state_file.exists():
            with open(state_file) as f:
                user_state = json.load(f)
            user_id = user_state.get('user_id')
            behavioral = user_state.get('instance_id_to_behavioral_data', {})
            data[user_id] = behavioral
    return data

Annotation समय का विश्लेषण

python
def analyze_annotation_time(behavioral_data: dict) -> dict:
    stats = {}
    for user_id, instances in behavioral_data.items():
        times = []
        for instance_id, bd in instances.items():
            if 'total_time_ms' in bd:
                times.append(bd['total_time_ms'] / 1000)
        if times:
            stats[user_id] = {
                'mean_time': sum(times) / len(times),
                'min_time': min(times),
                'max_time': max(times),
                'total_instances': len(times)
            }
    return stats

संदिग्ध व्यवहार का पता लगाना

python
def detect_suspicious_annotators(behavioral_data: dict,
                                  min_time_threshold: float = 2.0) -> list:
    suspicious = []
    for user_id, instances in behavioral_data.items():
        fast_count = 0
        for instance_id, bd in instances.items():
            time_sec = bd.get('total_time_ms', 0) / 1000
            if time_sec < min_time_threshold:
                fast_count += 1
 
        total = len(instances)
        if total > 0:
            fast_rate = fast_count / total
            if fast_rate > 0.5:
                suspicious.append({
                    'user_id': user_id,
                    'fast_rate': fast_rate,
                    'total_instances': total
                })
    return suspicious

Admin Dashboard एकीकरण

Admin Dashboard में Behavioral Analytics tab शामिल है:

  1. User Interaction Heatmap: Interaction patterns का visual representation
  2. AI Assistance Metrics: Accept/reject rates, decision times
  3. Timing Distribution: Annotation times का histogram
  4. Suspicious Activity Alerts: Review की आवश्यकता वाले flagged annotators

API Endpoints

Interactions ट्रैक करें

http
POST /api/track_interactions
Content-Type: application/json
 
{
  "instance_id": "instance_123",
  "events": [...],
  "focus_time": {"element": ms},
  "scroll_depth": 75.5
}

Behavioral Data प्राप्त करें

http
GET /api/behavioral_data/<instance_id>

किसी instance के लिए पूर्ण behavioral data लौटाता है।

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

शोधकर्ताओं के लिए

  1. Baseline स्थापना: Baseline स्थापित करने के लिए ज्ञात-अच्छे annotators से behavioral data एकत्र करें
  2. गुणवत्ता मेट्रिक्स: गुणवत्ता मूल्यांकन के लिए annotation agreement के साथ behavioral data का उपयोग करें
  3. Training मूल्यांकन: Pre- और post-training behavioral patterns की तुलना करें
  4. AI Impact विश्लेषण: मापें कि AI assistance annotation गुणवत्ता और गति को कैसे प्रभावित करता है

Annotation Projects के लिए

  1. वास्तविक समय में निगरानी करें: समस्याओं को जल्दी पकड़ने के लिए admin dashboard का उपयोग करें
  2. Thresholds निर्धारित करें: Timing और interaction metrics के लिए स्वीकार्य ranges परिभाषित करें
  3. Feedback प्रदान करें: Targeted annotator feedback देने के लिए behavioral insights का उपयोग करें

समस्या निवारण

कोई Behavioral Data एकत्र नहीं हो रहा

  1. सत्यापित करें कि interaction_tracker.js लोड है (browser Network tab जांचें)
  2. Browser console में JavaScript errors जांचें
  3. सत्यापित करें कि API endpoints accessible हैं (/api/track_interactions)

Data Persist नहीं हो रहा

  1. जांचें कि user state सहेजा जा रहा है (user_state.json देखें)
  2. सुनिश्चित करें कि annotation output directory writable है

आगे पढ़ें

कार्यान्वयन विवरण के लिए, source documentation देखें।