Whenever you're ready, walk me through how you'd approach this.
How would you mitigate hallucination or goal-divergence in agents tasked with high-precision manufacturing operations?
Treat this as a hands-on machine learning design and implementation task. Propose a tabular risk model or anomaly detector that scores proposed agent actions before execution, rejects unsupported actions, and identifies distribution shift. Explain how you would construct labels, avoid leakage, evaluate rare unsafe events, calibrate thresholds, and monitor the system after deployment. Provide production-quality Python for preprocessing, training, validation, threshold selection, and drift monitoring.