Design a scalable AI system from scratch, optimizing cost, performance, and maintainability for Mistral AI.