Your question is System Design and Refactoring. Take a moment with it on the right.
Talk me through your thinking if you like. When you're confident, submit your answer and I'll grade it like a real screen (7/10 or better passes).
Describe a time you designed a system and then refactored it to improve maintainability or performance.
Give a concrete example involving meaningful architectural or ML-serving decisions. Explain the original design, the evidence that motivated the refactor, the changes you made, the tradeoffs, and how you measured the outcome. Address risks such as regression, feature drift, training-serving skew, latency, and operational complexity where relevant.