Required Features 1. Process Simulation • Simulate a production line where ICs pass through: ◦ Wafer Closer ◦ Pin Welder ◦ Test Machine • Each IC has a small chance of defect at each stage (controlled by user input) • Generate a stream of ICs with pass/fail results 2. Statistical Process Control (SPC) • Use a P-chart to monitor defect rate over time • Detect if 30-sample rolling failure rate exceeds a predefined control limit (e.g., 0.3) • Highlight trend breaches as potential quality issues 3. GUI Dashboard • Display: ◦ Real-time total ICs tested ◦ Pass/fail count ◦ SPC control chart (matplotlib) • Add input fields for defect rates for each upstream process • Add buttons: Start, Stop, Reset, Generate AI Report 4. LLM Insight Button • Add a button that: ◦ Sends IC test summary + simulated machine logs to an LLM ◦ Gets back a diagnostic report (simulate or use API) ◦ Shows results in a pop-up Tech Stack • Python 3.8+ • Libraries: tkinter, matplotlib, numpy, random, (openai optional) Deliverables • One .py file, self-contained • Well-commented and modular code (for education/demo use) • Ensure GUI fits within 1920×1080 resolution