Original practice scenario: A fictional food manufacturer changes an ingredient supplier while packaged inventory from the earlier recipe remains available. How should label data be versioned?
Read model answer +
Tie each manufactured lot to the recipe and label versions actually used. A current product description cannot safely replace historical composition for units already produced.
Work through it
Give ingredient specifications, supplier lots, recipes and packaging labels immutable versions with explicit effective intervals and approval status.
Record manufacturing-lot relationships and validate that the selected label corresponds to the applicable recipe rather than merely the product name.
Test overlapping revisions, reworked material, supplier corrections and remaining old inventory; provide traceable impact searches and reviewable exceptions.
Tradeoffs to discuss
Versioned graphs increase operational complexity but support accurate historical lookup and targeted investigation.
Common pitfalls
Do not overwrite historical lot composition when a catalog changes.
This synthetic data exercise does not establish food-label compliance or product safety.
Original practice scenario: A hypothetical food retailer promotes products during holidays. How would you estimate whether a promotion increased demand rather than merely coinciding with it?
Read model answer +
Holiday timing, placement and availability can confound apparent uplift. Define the decision and comparison population before estimating an effect, and distinguish causal claims from predictive usefulness.
Work through it
Prefer randomized store or customer assignment where feasible, choosing units that limit spillover and recording assignment before outcomes.
Track baseline demand, stockouts, prices and concurrent promotions; analyze intention-to-treat effects with uncertainty at the assignment-unit level.
If only observational data exist, state assumptions, assess comparable controls and pre-trends, and test sensitivity to unmeasured confounding.
Tradeoffs to discuss
Cluster randomization reduces spillover but needs enough independent clusters; observational estimates cover more history with weaker identification.
Common pitfalls
Do not compare holiday promotion weeks only with ordinary weeks.
Check substitution across products rather than declaring gross item growth to be total incremental demand.