Navigation
๐Ÿ’พ Data & Storageยท 8 min read

Data Flywheel

Using production model outputs to improve training data โ€” feedback loops, human-in-the-loop annotation, and continuous data improvement.

data-flywheelfeedback-loopannotationhitlcontinuous-improvement

The data flywheel turns production usage into training data โ€” model outputs, user corrections, and human feedback loop back to improve the next model version.


1. The Flywheel Concept

Data Flywheel

Train model v1 โ†’ Deploy โ†’ Users interact
  โ†“                              โ†“
Collect: queries, outputs, feedback, corrections
  โ†“
Filter: quality checks, dedup, privacy
  โ†“
Label: human review, automated scoring
  โ†“
Add to training data
  โ†“
Train model v2 (better!) โ†’ Deploy โ†’ ...

Each iteration: Model gets better โ†’ attracts more users โ†’ generates more data โ†’ next model is even better.


2. Data Sources from Production

SourceWhat you collectValue
User queriesReal input distributionBetter than synthetic prompts
Chosen responsesWhich generation users acceptedPreference signal
CorrectionsWhen users edit/regenerateDirect quality signal
Thumbs up/downExplicit feedbackReward model training
Tool usage logsWhich tools called, resultsAgent training data
Session patternsMulti-turn conversationsConversation quality signal

Privacy Considerations

  • Anonymize: Remove PII before storing
  • Consent: Terms of service must allow data collection for improvement
  • Opt-out: Provide mechanism to exclude data
  • Retention: Delete raw data after processing (keep only derived training data)

3. Human-in-the-Loop Annotation

Not all production data is labeled. Human annotators add quality:

TaskAnnotator actionScale
Preference rankingRank 2-4 model outputs by quality1K-10K/day per annotator
Quality scoringRate response 1-52K-20K/day
Error correctionFix factual errors, formatting500-2K/day
Safety labelingFlag harmful/unsafe content5K-50K/day
Domain expertiseVerify medical/legal/technical accuracy100-500/day

Annotation Platform Requirements

RequirementWhy
CalibrationAnnotators must agree (inter-annotator agreement > 0.8)
Quality controlHidden test questions to detect sloppy annotators
Throughput trackingMonitor annotation speed and quality over time
Versioned guidelinesTrack which instructions annotators followed

4. Closing the Loop

# Automated flywheel pipeline
def daily_flywheel():
    # 1. Collect yesterday's production data
    raw_data = collect_production_logs(yesterday)
    
    # 2. Filter and anonymize
    clean_data = anonymize(quality_filter(raw_data))
    
    # 3. Auto-label with reward model
    scored_data = reward_model.score(clean_data)
    
    # 4. Select high-quality examples
    good_examples = scored_data[scored_data.score > 0.8]
    
    # 5. Add to SFT/RLHF training pool
    training_pool.add(good_examples)
    
    # 6. Queue difficult examples for human review
    hard_examples = scored_data[scored_data.score.between(0.4, 0.6)]
    annotation_queue.add(hard_examples)

5. Anti-Patterns

Anti-patternRiskFix
Training on all production dataAmplifies model biasesFilter + score + human review
No diversity controlPopular queries dominateStratified sampling across categories
Feedback loop without monitoringQuality degrades silentlyTrack data quality metrics each cycle
Ignoring negative feedbackModel repeats same mistakesPrioritize corrections and thumbs-down

For data quality monitoring that keeps the flywheel healthy, see Data Quality Monitoring.


Self-Check

  • Draw the data flywheel (deploy โ†’ collect โ†’ filter โ†’ label โ†’ train โ†’ deploy)
  • List production data sources and their value for training
  • Design an annotation pipeline with quality control
  • Implement an automated daily flywheel pipeline
  • Identify anti-patterns that can corrupt the flywheel

References