Skip to main content
POST
/
retraining
/
runs
{
  "run_id": "<string>",
  "judge_id": "<string>",
  "status": "<string>",
  "trigger_source": "<string>",
  "feedback_summary": {
    "total_feedback_count": 123,
    "approved_count": 123,
    "rejected_count": 123,
    "correction_count": 123,
    "date_range": {
      "earliest": {},
      "latest": {}
    }
  },
  "estimated_duration": 123,
  "progress_tracking": {
    "progress_url": "<string>",
    "webhook_configured": true,
    "expected_milestones": [
      {}
    ]
  },
  "created_at": {},
  "created_by": "<string>"
}

Overview

Initiates an automated retraining run for a judge based on accumulated feedback. This endpoint triggers the complete retraining pipeline, including feedback analysis, proposal generation, validation, and model updates.

Request Body

judge_id
string
required
ID of the judge to retrain
trigger_source
string
required
Source that triggered this retraining
  • manual - Manually triggered by user
  • scheduled - Triggered by scheduled automation
  • feedback_threshold - Triggered by feedback threshold
  • performance_degradation - Triggered by performance monitoring
since_timestamp
datetime
Only process feedback since this timestamp (ISO 8601)
config_overrides
object
Override default retraining configuration
notification_preferences
object
Notification settings for the retraining run

Response

run_id
string
required
Unique identifier for the retraining run
judge_id
string
required
ID of the judge being retrained
status
string
required
Initial run status
  • started - Run initiated successfully
  • analyzing_feedback - Analyzing feedback data
  • generating_proposals - Creating improvement proposals
  • validating - Validating proposed changes
  • applying_changes - Applying approved changes
  • completed - Retraining completed
  • failed - Retraining failed
trigger_source
string
required
Source that triggered this retraining
feedback_summary
object
required
Summary of feedback data being processed
estimated_duration
integer
Estimated duration in minutes for completion
progress_tracking
object
required
Information for tracking progress
created_at
datetime
required
Run creation timestamp
created_by
string
required
User ID who initiated the run

Examples

curl -X POST https://api.judge.example.com/retraining/runs \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "judge_id": "jdg_xyz789",
    "trigger_source": "manual",
    "since_timestamp": "2024-01-01T00:00:00Z",
    "config_overrides": {
      "min_feedback_threshold": 15,
      "approval_threshold": 0.75,
      "auto_apply_approved": true
    },
    "notification_preferences": {
      "email_notifications": true,
      "webhook_url": "https://your-app.com/webhooks/retraining",
      "notification_levels": ["start", "proposals_ready", "complete", "error"]
    }
  }'
curl -X POST https://api.judge.example.com/retraining/runs \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "judge_id": "jdg_abc456",
    "trigger_source": "feedback_threshold",
    "config_overrides": {
      "validation_strictness": "strict"
    }
  }'
curl -X POST https://api.judge.example.com/retraining/runs \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "judge_id": "jdg_new001",
    "trigger_source": "manual"
  }'
curl -X POST https://api.judge.example.com/retraining/runs \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "judge_id": "jdg_xyz789",
    "trigger_source": "manual"
  }'