MMM ROAS Audit
Follow this workflow when asked to validate MMM output quality.
Required Context
- •Read
AGENTS.mdfirst for repository-wide constraints, data contract, and validation checklist. - •Do not restate project policies from
AGENTS.md; apply them directly.
Workflow
- •Verify input contract quickly.
- •Confirm
data.csvexists in repo root. - •Confirm required columns are present:
wk_strt_dt,sales. - •Confirm media prefix conventions still hold (
mdsp_,mdip_).
- •Run baseline pipeline.
- •Execute
python mmm_script.pyfrom repository root. - •Capture exceptions and identify first failing stage.
- •Validate expected outputs.
- •Confirm console model metrics are printed.
- •Confirm plots render without runtime exceptions in script execution.
- •Confirm
media_channel_metrics_by_year.csvis produced when relevant.
- •Audit ROAS reasonableness by media channel and year.
- •Read
media_channel_metrics_by_year.csv. - •Flag any channel-year ROAS above 20 as critical.
- •Use practical benchmark ranges for quick triage:
- •linear tv: 1.5 to 4
- •digital: 2 to 5
- •streaming tv: 2 to 6
- •Treat benchmark misses as investigation signals, not automatic failures.
- •Diagnose implausible ROAS.
- •Check transformed features for saturation/adstock parameter extremes.
- •Check multicollinearity and control leakage.
- •Check spend/impression scaling and date alignment issues.
- •Check whether optimization bounds are too loose.
- •Report findings.
- •Prioritize concrete issues, then assumptions, then next fixes.
- •Include file references and commands used.
- •If hyperparameter settings changed, note expected runtime impact.
Response Template
Use this structure in findings:
- •Status: pass/fail for run completion
- •Output check: present/missing artifacts
- •ROAS anomalies: channel-year rows and severity
- •Likely causes: ranked hypotheses
- •Recommended edits: minimal, testable code changes
- •Verification: commands rerun and observed outcome
Guardrails
- •Keep backward compatibility with existing CSV inputs unless user asks otherwise.
- •Preserve prefix-based column detection logic.
- •Prefer small function-level edits over duplicated blocks.