Data Contextualization Discipline
Annotate anomalies daily so AI learns from corrected commercial reality
- Difficulty
- Moderate
- Time to result
- ~ongoing to results
- Steps
- 5
- Confidence
- 98%
Data Contextualization Discipline converts raw retail history into decision-ready data by recording the commercial circumstances behind unusual sales. Each day, the team reviews the previous day's product results, isolates anomalies such as stockouts, promotions, competitor shortages, price changes, listing suspensions, or influencer campaigns, and annotates their causes. Where possible, the observed sales figure is adjusted to estimate what demand would have been without the anomaly. The corrected value supports forecasting, while the annotation preserves the real event for future analysis. Repeating this process creates a historical dataset that distinguishes underlying demand from operational distortion. That distinction improves conventional forecasts today and gives future AI systems richer inputs from which to infer demand, inventory requirements, and commercial opportunities.
Origin
Fabricio Miranda presented the discipline as a practical way for ecommerce brands to prepare their retail data for forecasting and the emerging AI-driven economy. Extracted from Ecommerce Coffee Break.
Core principles
- 01Raw retail data does not explain why sales changed
- 02Commercial events must be separated from genuine demand
- 03Daily annotation prevents valuable context from being forgotten
- 04AI produces stronger decisions when supplied with contextualized history
How to run it
- 1
Review Yesterday's Results
Inspect the previous day's sales at product level rather than waiting for a monthly planning cycle. Focus attention on products whose results differ materially from expectations.
Pro tip Use automated thresholds to produce a short exception list instead of reviewing every SKU manually.
Watch out Do not assume every sales spike or decline represents a lasting demand change.
- 2
Identify the Anomaly
Determine whether each unusual result came from a stockout, promotion, price change, competitor shortage, listing suspension, influencer campaign, or another exceptional event.
Pro tip Ask commercial, marketing, and operations teams for context while the event is still fresh.
Watch out An unexplained anomaly should remain flagged rather than being assigned a speculative cause.
- 3
Annotate the Cause
Attach a concise description of what happened, when it happened, and which products or channels were affected. Preserve this context beside the underlying observation.
Pro tip Use standardized event labels so similar anomalies can be analyzed together later.
Watch out Free-form notes alone can become inconsistent and difficult to process at scale.
- 4
Estimate Normal Demand
Estimate what sales would probably have been without the anomaly and store that normalized value separately from the actual result. Use comparable periods and unaffected products where possible.
Pro tip Retain both actual and normalized values so the original record is never lost.
Watch out Avoid false precision when evidence for the counterfactual estimate is weak.
- 5
Feed Context into Planning
Use normalized observations for baseline forecasting while retaining event annotations for scenario planning and AI analysis. Continue the process daily to build a durable contextual history.
Pro tip Periodically compare forecasts based on raw and contextualized data to quantify the benefit.
Watch out A one-time cleanup will deteriorate unless the annotation discipline becomes routine.
In the wild
A skincare brand normally sells 80 units of a serum each day but sells 420 after an influencer post. The team labels the date as an influencer campaign, retains the actual 420-unit result, and records an estimated baseline of 85 units for forecasting. Future models can distinguish campaign-driven demand from organic demand while still learning how that influencer affected sales.
→ The next replenishment plan avoids treating a one-day campaign spike as permanent baseline growth.
A supplement sells zero units for three days because inventory is unavailable. The team flags those dates as stockouts and estimates unconstrained demand from nearby in-stock periods. Forecasting uses the corrected demand rather than interpreting the zeros as lost customer interest.
→ The brand avoids creating a self-reinforcing cycle of low forecasts and repeated stockouts.
Common mistakes
Treating Raw Sales as True Demand
Observed sales are constrained by availability and affected by commercial events. Feeding them directly into forecasts can teach the system patterns that never existed in underlying demand.
Annotating Events Too Late
Teams lose important context when they attempt to reconstruct anomalies weeks or months later. Daily review captures causes while evidence and organizational memory remain available.
Overwriting the Original Record
Replacing actual observations without preserving them destroys evidence about what really happened. Store actual sales, normalized demand, and event context as distinct fields.
Is it for you?
Best for
It is best for ecommerce brands that want reliable forecasting from noisy product-level sales histories.
Not ideal for
It is less useful when a business has too little sales history or cannot identify why abnormal results occurred.
From the transcript
“The way that I would do it is every single day, go to yesterday, And start annotating what happened to each one of the products…”
“So all of those things, I call it data contextualization.”
“Create a process where you change the sales for what would have been the sale if you're not out of stock or if you didn't…”
From the episode
Never Run Out of Stock Again: The AI Secret of Successful Ecommerce — Fabricio Miranda
Fabricio Miranda