
🧠 AI & Machine Learning · State Machine
The states a machine learning model moves through, from experiment to production to retirement, including rollback when live performance drops.
Drawing diagram…
State machine for an ML model: Experiment, Trained, Validated (passes metric thresholds), Approved, Shadow (runs on live traffic without serving answers), Production, Degraded when drift is detected, then Retraining, and Retired when replaced. A failed validation goes back to Experiment and a bad shadow result is rejected.
stateDiagram-v2 [*] --> Experiment Experiment --> Trained: Training run finished Trained --> Validated: Metrics above threshold Trained --> Experiment: Metrics too low Validated --> Approved: Reviewer sign-off Approved --> Shadow: Deploy without serving Shadow --> Production: Live results match Shadow --> Rejected: Live results worse Production --> Degraded: Data drift detected Degraded --> Retraining Retraining --> Trained Production --> Retired: Replaced by new version Rejected --> [*] Retired --> [*]
A chatbot that answers staff questions from company documents: documents are split and indexed in a vector database, and each question pulls the most relevant passages before the language model writes an answer.
What happens when a user asks the document chatbot a question: permission check, embedding, vector search, prompt building and a cited answer.
How documents become searchable passages for an AI assistant: extraction, cleaning, chunking, embedding and indexing, with changed files re-processed automatically.
How an AI agent completes a task by planning, calling tools, checking results and asking a person to approve risky actions before it finishes.
Where each part of an MLOps setup runs: feature store, training jobs on GPU nodes, experiment tracking, model registry and automated deployment to serving.
One gateway that every app in a company uses to reach language models: it applies budgets, rate limits, content filters and caching, and records usage per team.