# MLOps

> MLOps is the set of practices for building, deploying and maintaining machine learning models in production, covering data pipelines, training, versioning, deployment, monitoring and retraining when performance declines.

Also called: machine learning operations, ML operations, ML engineering, model operations. Category: Delivery and quality. Source: https://aibuildindex.com/glossary/mlops

## In the index

- Forecasting and prediction model: median $2,000, middle half $300 to $7,200, 109 priced briefs (https://aibuildindex.com/cost/forecasting-prediction)
- Recommendation system: median $1,850, middle half $560 to $4,700, 67 priced briefs (https://aibuildindex.com/cost/recommendation-system)
- LLM fine-tuning: median $3,500, middle half $420 to $13,700, 78 priced briefs (https://aibuildindex.com/cost/llm-fine-tuning)

A machine learning model that works on a data scientist's laptop is a long way from one that serves predictions reliably every day. MLOps covers that distance. It applies the habits of software delivery, such as version control, automated testing and repeatable releases, to models whose behaviour depends on data. For a buyer commissioning a [forecasting](https://aibuildindex.com/glossary/forecasting) model, a recommendation engine or a fine-tuned model, MLOps decides whether the system keeps working after the builder leaves.

## How it works

The MLOps life cycle has several stages:

- **Data pipelines.** A [data pipeline](https://aibuildindex.com/glossary/data-pipeline) collects, cleans and prepares [training data](https://aibuildindex.com/glossary/training-data) the same way each time, so results can be reproduced.
- **Training and tracking.** Each training run is recorded with its data, settings and scores, so the team knows which version is which.
- **Versioning and registry.** Approved models are stored with version numbers and can be rolled back.
- **Deployment.** Models are released through automated steps, often through the same [CI/CD](https://aibuildindex.com/glossary/ci-cd) pipeline as the rest of the software.
- **Monitoring.** Predictions and input data are watched for signs of [model drift](https://aibuildindex.com/glossary/model-drift).
- **Retraining.** When performance slips, the pipeline retrains on fresh data and the new version goes through the same checks.

[LLMOps](https://aibuildindex.com/glossary/llmops) adapts these ideas for systems built on hosted language models, where training is rare and prompts take its place.

## What it means for cost

MLOps is a large part of the difference between a cheap model and a dependable one. A builder can deliver a trained model file quickly; building the pipeline to retrain, test and redeploy it takes considerably longer. Quotes that look very different for the "same" model often differ in exactly this.

The trade-off depends on how fast the data changes. A model predicting demand in a stable market may need retraining rarely. One tracking customer behaviour or prices may need it often, and without automation each retrain becomes a small project with its own bill.

Ask a builder:

- How will the model be retrained, and how often?
- Can we reproduce a training run from scratch?
- What will warn us that performance has dropped?
- Which parts of the pipeline will we be able to run ourselves?

## Common questions

### Does every machine learning project need full MLOps?

No. A one-off analysis or a model that will be used briefly can skip most of it. Any model expected to run in production for months, on changing data, needs at least reproducible training, versioning and monitoring.

### Is MLOps needed if I only use a hosted AI model?

Mostly not in its classic form, because you are not training the model. You still need the operational side, such as monitoring, evaluation and controlled changes, which is usually described as LLMOps.

### Why does a model need retraining?

Because the world it learned from changes. Customer behaviour, prices, products and language shift over time, and a model trained on older data becomes less accurate. Retraining on recent data brings it back in line.

## Related terms

- [LLMOps](https://aibuildindex.com/glossary/llmops): LLMOps is the set of practices for running applications built on large language models in production, covering prompt versioning, evaluation, monitoring, cost control, model updates and safety checks after launch.
- [Model drift](https://aibuildindex.com/glossary/model-drift): Model drift is the gradual decline in an AI system's accuracy after launch, caused by real-world data, user behaviour or the underlying model changing away from the conditions the system was built and tested on.
- [Machine learning](https://aibuildindex.com/glossary/machine-learning): Machine learning is a branch of AI in which software learns patterns from examples rather than following hand-written rules, then uses those patterns to make predictions or decisions about new data.
- [Data pipeline](https://aibuildindex.com/glossary/data-pipeline): A data pipeline is an automated series of steps that moves data from one or more sources to a destination, transforming, checking and enriching it along the way, on a schedule or as new data arrives.
- [Training data](https://aibuildindex.com/glossary/training-data): Training data is the set of examples a machine learning model learns from, such as labelled images, past transactions or question-and-answer pairs, and its quality, coverage and rights largely decide how well the finished model performs.
- [CI/CD](https://aibuildindex.com/glossary/ci-cd): CI/CD, short for continuous integration and continuous delivery, is an automated pipeline that tests every code change as it is made and prepares or releases it, so updates reach production quickly and safely.
