Marketplace Feed Governance Design: Attributes and Freshness
Overview
Marketplace feed governance ensures the feed (e.g., homepage listings, search results, recommendations) delivers high-quality, trustworthy, and timely content to users. This design focuses on two pillars: Attributes (data quality, completeness, and standardization) and Freshness (timeliness and relevance).
The system enforces rules via a governance pipeline integrating validation, scoring, quarantine, and remediation. Goals:
- User trust: Accurate, complete listings.
- Performance: <1% error rate, 99.9% freshness SLA.
- Scalability: Handle 1M+ items/hour.
Key components:
- Ingestion Layer: Sources (seller uploads, APIs, crawlers).
- Governance Engine: Rules, ML models, schedulers.
- Storage: Feed index (e.g., Elasticsearch), quarantine DB.
- Monitoring: Dashboards (Prometheus/Grafana), alerts.
1. Attributes Governance
Attributes are core metadata for each feed item (listing). Governance validates, standardizes, and enriches them to prevent spam, errors, or incomplete data.
Core Attributes and Rules
| Attribute | Type | Required | Validation Rules | Standardization | Enrichment |
|---|
| ID | String | Yes | Unique UUID | Canonical format | Auto-gen if missing |
| Title | String | Yes | 5-100 chars, no spam keywords | Keyword normalization (e.g., "iPhone" → "Apple iPhone 15") | ML-suggested improvements |
| Price | Decimal | Yes | >0, <1M, valid currency | ISO 4217 (USD, EUR) | Dynamic pricing signals (e.g., competitor avg) |
| Images | Array | Yes (≥1) | URLs valid, <10MB, no adult/illegal | Resize to 800x800, watermark | Auto-crop, quality score (>0.8) |
| Description | String | No | <5000 chars | HTML sanitize | NLP summary (key features) |
| Category | String | Yes | From taxonomy | Hierarchical (e.g., Electronics > Phones) | Auto-classify via BERT |
| Seller ID | String | Yes | Verified seller | Link to profile | Reputation score (1-5 stars) |
| Condition | Enum | Yes | New/Used/Refurb | Standardized labels | - |
| Location | GeoJSON | No | Valid lat/lng | Normalize timezone | Shipping estimates |
| Tags | Array | No | ≤10, from vocab | Dedupe, lowercase | Trend-based suggestions |
| Stock Qty | Integer | No | ≥0 | - | Low-stock flag (<10) |
Enforcement Pipeline
- Pre-Ingestion Validation (Sync): Block invalid items (e.g., missing title → reject).
- Scoring (Async): ML model assigns quality score (0-1):
- Formula:
0.4*completeness + 0.3*accuracy + 0.2*relevance + 0.1*spam_score.
- Threshold: <0.7 → Quarantine (notify seller, auto-fix if possible).
- Enrichment: Auto-fill gaps (e.g., OCR images for title).
- Post-Processing Audit: Sample 5% for human review; retrain ML on feedback.
- Penalties: Repeated violations → Seller throttling (e.g., -50% feed priority).
Metrics: Completeness >95%, Score >0.85 avg.
2. Freshness Governance
Freshness ensures items reflect real-time state (e.g., sold-out, price changes). Defined as age since last meaningful update (e.g., price change, stock update).
Freshness Tiers and SLAs
| Tier | Max Age | Examples | Refresh Cadence |
|---|
| Hot | 5 min | Auctions, flash sales | Real-time push |
| Warm | 1 hr | Active listings | 15-min pull |
| Cold | 24 hrs | Stable inventory | Daily batch |
| Stale | >7 days | Expired/inactive | Auto-archive |
Detection and Refresh Mechanisms
- TTL (Time-to-Live): Per-item expiry based on tier.
- Event-driven: Seller updates → Immediate refresh.
- Heartbeat: Ping seller API every
cadence * 0.8.
- Staleness Signals:
| Signal | Weight | Action |
|---|
| No seller ping | High | Demote priority |
| Stock=0 | High | Hide from feed |
| Price unchanged >TTL | Med | Flag for refresh |
| Views/clicks=0 >3d | Low | Archive |
- Refresh Strategies:
- Push: Seller webhooks (preferred, 90% coverage).
- Pull: Cron jobs (e.g., Kafka streams).
- Fallback: ML-predicted updates (e.g., price decay model).
- Graceful Degradation:
- Partial staleness: Show "Last updated X ago" badge.
- Bulk refresh: Nightly full-scan for cold tier.
Pipeline Flow:
Ingestion → Attribute Validate → Freshness Check → Score & Rank → Feed Index → Serve
↓ (if fail) ↓ (if stale)
Quarantine/Retry Refresh/Archive
Metrics: 99% items < max age, Refresh latency <30s p95.
Integration and Architecture
┌─────────────────┐ ┌──────────────────┐ ┌─────────────────┐
│ Sellers/APIs │───▶│ Ingestion Gate │───▶│ Governance Eng. │
│ (Push/Pull) │ │ (Kafka) │ │ (Spark/MLflow) │
└─────────────────┘ └──────────────────┘ └──────────┬─────┘
│
┌───────────▼─────┐
│ Feed Index │ ← Monitoring/Alerts
│ (Elasticsearch) │
└──────────────────┘
- Tech Stack: Kafka (events), Spark (batch), scikit-learn/TensorFlow (ML), Redis (caches).
- Scalability: Horizontal pods, sharding by category/seller.
- Security: Rate limiting, anomaly detection (e.g., sudden bulk updates → fraud check).
Monitoring and Evolution
- Dashboards: Attribute completeness heatmap, freshness histogram, violation trends.
- Alerts: Slack/ PagerDuty for SLA breaches (>1% stale).
- Iteration: A/B test rules, quarterly taxonomy updates.
This design balances strict governance with seller flexibility, boosting conversion by 15-20% via trusted feeds. Implementation timeline: 4-6 weeks MVP. Feedback welcome!