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 |
|---|---|---|
click | Elements पर Mouse clicks | label:positive, nav:next |
focus_in | Element focus प्राप्त करता है | textbox:explanation |
focus_out | Element focus खोता है | label:negative |
keypress | Keyboard shortcuts | key:1, nav:ArrowRight |
navigation | Instance navigation | next, prev, instance_load |
save | Annotation save events | instance:123 |
annotation_change | Label modifications | schema:sentiment |
AI Assistance उपयोग
AI-assisted annotation के लिए पूर्ण lifecycle tracking:
{
"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 के लिए विस्तृत परिवर्तन इतिहास:
{
"timestamp": 1706500002.5,
"schema_name": "sentiment",
"label_name": "positive",
"action": "select",
"old_value": null,
"new_value": true,
"source": "user"
}Source types:
user- प्रत्यक्ष user interactionai_accept- User ने AI suggestion स्वीकार कियाkeyboard- Keyboard shortcut का उपयोग कियाprefill- कॉन्फ़िगरेशन से Pre-filled
Data Format
प्रत्येक annotation instance में एक behavioral_data object शामिल है:
{
"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 सक्षम करने के लिए:
// In browser console
window.interactionTracker.setDebugMode(true);विश्लेषण उदाहरण
Behavioral Data लोड करना
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 dataAnnotation समय का विश्लेषण
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संदिग्ध व्यवहार का पता लगाना
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 suspiciousAdmin Dashboard एकीकरण
Admin Dashboard में Behavioral Analytics tab शामिल है:
- User Interaction Heatmap: Interaction patterns का visual representation
- AI Assistance Metrics: Accept/reject rates, decision times
- Timing Distribution: Annotation times का histogram
- Suspicious Activity Alerts: Review की आवश्यकता वाले flagged annotators
API Endpoints
Interactions ट्रैक करें
POST /api/track_interactions
Content-Type: application/json
{
"instance_id": "instance_123",
"events": [...],
"focus_time": {"element": ms},
"scroll_depth": 75.5
}Behavioral Data प्राप्त करें
GET /api/behavioral_data/<instance_id>किसी instance के लिए पूर्ण behavioral data लौटाता है।
सर्वोत्तम प्रथाएँ
शोधकर्ताओं के लिए
- Baseline स्थापना: Baseline स्थापित करने के लिए ज्ञात-अच्छे annotators से behavioral data एकत्र करें
- गुणवत्ता मेट्रिक्स: गुणवत्ता मूल्यांकन के लिए annotation agreement के साथ behavioral data का उपयोग करें
- Training मूल्यांकन: Pre- और post-training behavioral patterns की तुलना करें
- AI Impact विश्लेषण: मापें कि AI assistance annotation गुणवत्ता और गति को कैसे प्रभावित करता है
Annotation Projects के लिए
- वास्तविक समय में निगरानी करें: समस्याओं को जल्दी पकड़ने के लिए admin dashboard का उपयोग करें
- Thresholds निर्धारित करें: Timing और interaction metrics के लिए स्वीकार्य ranges परिभाषित करें
- Feedback प्रदान करें: Targeted annotator feedback देने के लिए behavioral insights का उपयोग करें
समस्या निवारण
कोई Behavioral Data एकत्र नहीं हो रहा
- सत्यापित करें कि
interaction_tracker.jsलोड है (browser Network tab जांचें) - Browser console में JavaScript errors जांचें
- सत्यापित करें कि API endpoints accessible हैं (
/api/track_interactions)
Data Persist नहीं हो रहा
- जांचें कि user state सहेजा जा रहा है (
user_state.jsonदेखें) - सुनिश्चित करें कि annotation output directory writable है
आगे पढ़ें
- Admin Dashboard - वास्तविक समय निगरानी
- Annotation History - विस्तृत change tracking
- Quality Control - स्वचालित गुणवत्ता जांच
कार्यान्वयन विवरण के लिए, source documentation देखें।