Maintenance
Keep production AI systems useful, secure, reliable, supported, and economical throughout their lifecycle.
Deployment begins the production lifecycle. User behavior, input data, labels, business rules, software dependencies, security threats, cloud services, provider models, costs, and regulations all change. Even an untouched model can become less useful when its operating environment no longer matches the assumptions under which it was approved.
Maintenance covers the complete AI product—not only the model. Application code, preprocessing, feature pipelines, prompts, retrieval indexes, tools, infrastructure, dependencies, security controls, monitoring, documentation, support, and decommissioning all require ownership.
Maintenance Objectives
| Objective | Key question |
|---|---|
| Usefulness | Does the system still solve the intended user or business problem? |
| Model quality | Are predictions still accurate, calibrated, grounded, fair, and safe enough? |
| Reliability | Does it meet availability, latency, capacity, and recovery objectives? |
| Security and privacy | Are vulnerabilities, access, secrets, data use, retention, and threats controlled? |
| Compatibility | Do data, APIs, models, runtimes, clients, providers, and schemas work together? |
| Operability | Can teams diagnose, change, roll back, restore, and support it safely? |
| Economics | Does quality-adjusted cost per useful outcome remain acceptable? |
| Governance | Are owners, approvals, evidence, obligations, and review dates current? |
| Retirement | Can obsolete components be removed without disrupting users or losing required evidence? |
The Maintenance Cycle
Observe service + data + model + safety + outcome + cost signals
-> Review health, risk, dependencies, value, and upcoming changes
-> Prioritize maintenance work
-> Implement through version control and reproducible pipelines
-> Test code, data, model, security, compatibility, load, and recovery
-> Release progressively with rollback readiness
-> Verify production behavior and document evidence
-> Continue, improve, replace, or retireAvoid modifying production manually. Maintenance should create a reviewed, immutable, traceable release that follows the same testing and promotion controls as a product feature.
Ownership and Inventory
- Assign business, model, data, application, platform, security, privacy, and operational owners with decision and escalation authority.
- Inventory models, endpoints, pipelines, datasets, features, prompts, indexes, tools, providers, dependencies, and infrastructure.
- Record purpose, users, risk, repository, environments, versions, dashboards, runbooks, cost center, and review date.
- Track support and end-of-life dates for runtimes, frameworks, APIs, base images, models, certificates, and cloud services.
- Alert when ownership disappears, a review expires, a dependency approaches deprecation, or an endpoint no longer creates value.
Maintenance Cadence
| Cadence | Example work |
|---|---|
| Continuous | Health, security, data, model, outcome, cost monitoring, backups, and automated cleanup |
| Daily or weekly | Alerts, incidents, failed jobs, capacity, data freshness, labels, support issues, and cost anomalies |
| Monthly | Dependencies, access, model slices, retention, right-sizing, certificates, and technical debt |
| Quarterly or risk-based | Threat model, recovery drill, responsible-AI review, vendor risk, runbooks, and retirement candidates |
| Event-driven | Critical vulnerability, schema change, drift, provider deprecation, incident, regulation, or ownership change |
Cadence should reflect impact, traffic, rate of change, label delay, and obligations. High-impact or rapidly changing systems need more frequent review than a low-risk batch process.
Model Maintenance
- Monitor production inputs, predictions, calibration, important slices, delayed ground truth, human corrections, and business outcomes.
- Compare deployed champions and candidates on versioned representative evaluation suites.
- Diagnose the cause before recalibrating, changing thresholds, repairing features, retraining, replacing, or retiring.
- Preserve intended and prohibited uses, limitations, lineage, evaluation evidence, approvals, and review dates.
- Reassess fairness, privacy, robustness, safety, and human oversight when populations, purposes, or policies change.
- Maintain a complete compatible rollback release rather than only an old model file.
Retraining Is Not the Default Answer
| Observed issue | Likely maintenance response |
|---|---|
| Broken source or transformation | Repair the pipeline and re-evaluate affected predictions |
| Calibration changed | Recalibrate or adjust reviewed thresholds |
| New user population | Collect representative labels and evaluate important slices |
| Label quality declined | Fix the labeling process before training |
| Confirmed concept change | Retrain through the governed pipeline and compare with the champion |
| Model no longer provides value | Replace with a simpler method or retire it |
Data drift can reflect seasonality, product growth, a sensor change, or a pipeline defect. Retrain only when evidence and intended outcomes justify it, and never bypass normal validation and approval.
Data and Feature Maintenance
- Maintain producer contracts for schema, type, units, semantics, freshness, quality, and change notification.
- Verify that training and serving feature definitions remain compatible.
- Monitor missingness, ranges, categories, volume, duplicates, lineage, and label delay.
- Backfill or recompute through versioned logic and reconcile downstream models and predictions.
- Apply retention and deletion to raw data, features, labels, caches, and prediction records.
- Reconfirm that collection remains necessary, authorized, representative, and proportionate.
Software and Dependency Maintenance
- Pin dependencies and base images for reproducibility; update them deliberately instead of following floating latest versions.
- Prioritize security updates by exploitability, exposure, data sensitivity, and impact.
- Rebuild immutable artifacts from reviewed source, scan them, preserve provenance, and verify integrity.
- Test model format, preprocessing, API, schema, runtime, driver, accelerator, and client compatibility.
- Run code, contract, model parity, load, resilience, privacy, security, and rollback tests before promotion.
- Remove unused packages and images to reduce attack surface and maintenance effort.
Update or vulnerability discovered
-> Inventory affected assets and exposure
-> Assess severity, exploitability, impact, and deadline
-> Patch source or dependency and rebuild immutable artifacts
-> Run security + compatibility + model behavior + performance tests
-> Stage and canary the release
-> Verify health, behavior, and evidence
-> Apply temporary mitigation or emergency process when requiredInfrastructure Maintenance
- Apply changes through versioned infrastructure as code and detect unauthorized drift.
- Patch hosts, clusters, gateways, databases, drivers, accelerators, and agents within defined support windows.
- Review capacity, quotas, autoscaling, failure domains, domains, certificates, licenses, and resource expiration.
- Test backups, restoration, failover, traffic switching, graceful shutdown, and rollback.
- Remove orphaned endpoints, disks, snapshots, IPs, credentials, experiments, and development resources after governed checks.
- Reassess managed versus self-hosted choices as scale, pricing, product needs, and team capacity evolve.
Security and Privacy Maintenance
- Rotate secrets, certificates, signing keys, and credentials and test emergency revocation.
- Review human and workload access, inherited roles, dormant identities, and tenant isolation.
- Update threat models for new data, tools, providers, integrations, and deployment paths.
- Scan code, dependencies, images, models, infrastructure, and telemetry for known exposure.
- Review logs, prompts, indexes, caches, backups, and vendor systems for minimization, access, retention, and deletion.
- Track security exceptions and accepted residual risks with owners and expiration dates.
Generative AI, RAG, and Agent Maintenance
Version and maintain the provider model, prompts, examples, output schema, safety policy, retrieval documents, parser, chunking, embedding model, vector index, tools, permissions, evaluators, and application code as one compatible release.
| Component | Maintenance questions |
|---|---|
| Provider model | Is it supported, behavior stable, quota sufficient, and its replacement evaluated? |
| Prompts | Do instructions match current policy, output contracts, model behavior, and user needs? |
| Knowledge base | Are documents current, authorized, parsed, deduplicated, and expired correctly? |
| Embeddings and index | Are versions compatible, permissions correct, retrieval quality acceptable, and rebuilds reproducible? |
| Tools and agents | Are schemas, privileges, destinations, limits, approvals, and failure paths safe? |
| Evaluations | Do datasets include new failures, languages, slices, attacks, and production cases? |
| Economics | Are tokens, context, retries, loops, tools, caching, and model routing efficient? |
Provider and API Changes
External providers can deprecate models, SDKs, endpoints, authentication, regions, or features. Track announcements and contract dates, test pinned candidate versions, and maintain migration plans. Record the resolved provider model or deployment version when possible because an alias can change behavior without an application-code release.
- Test quality, safety, latency, token use, tools, quotas, and structured-output compatibility.
- Use adapters where they genuinely reduce migration cost without hiding important capability differences.
- Maintain and test fallback or degraded behavior for dependency failure.
- Do not assume multi-provider portability when prompts, safety controls, tools, and behavior differ.
Safe Maintenance Releases
Use production-like staging and progressive shadow, canary, or blue/green release strategies. Compare service, data, model, safety, product, and cost signals. Preserve schema and state compatibility and restore the complete last known-good bundle when trusted guardrails fail.
| Test | Purpose |
|---|---|
| Regression and contract | Verify fixed behavior, APIs, schemas, events, and consumers |
| Model evaluation | Compare quality, calibration, slices, robustness, safety, and fairness |
| Artifact compatibility | Verify model, runtime, image, driver, accelerator, and preprocessing |
| Security and privacy | Check vulnerabilities, access, secrets, isolation, abuse, and data handling |
| Load and soak | Measure throughput, tail latency, saturation, leaks, and cost |
| Resilience | Exercise dependencies, quotas, zones, queues, timeouts, and overload |
| Rollback and restore | Prove that previous release and required state can be recovered |
| Synthetic production | Continuously verify a safe end-to-end path after release |
Incidents and Technical Debt
Incident response restores safe service; problem management removes recurring causes. Identify affected predictions and downstream actions, reconcile them where needed, and turn lessons into tests, controls, monitoring, training, and prioritized backlog work.
- Track recurring incidents, manual production steps, unknown lineage, unsupported dependencies, duplicate transformations, and stale documentation.
- Reserve explicit engineering capacity for preventive maintenance rather than allowing every cycle to be consumed by features.
- Review near misses, fallbacks, and human overrides because they can reveal hidden weaknesses.
- Reduce alert fatigue and keep runbooks aligned with the current architecture.
Documentation and Runbooks
- Architecture, data flow, trust boundaries, dependencies, model and release lineage
- Purpose, users, limitations, prohibited uses, owners, review and expiration dates
- Build, test, approve, deploy, canary, rollback, restore, and retirement procedures
- Dashboards, objectives, alerts, severity, on-call, escalation, and communication
- Data contracts, labels, retention, deletion, backup, capacity, quotas, costs, vendors, and support dates
- Known risks, exceptions, mitigating controls, evidence, and re-review deadlines
Deprecation and Retirement
Retire a model when it no longer creates enough value, has unacceptable risk, lacks an owner, duplicates another capability, cannot be supported, or has been replaced. Retirement is a controlled change, not simply deleting an endpoint.
Inventory consumers and dependencies
-> Approve retirement and communicate timeline
-> Provide replacement or safe fallback
-> Stop new traffic and observe
-> Disable retraining, jobs, tools, credentials, and endpoints
-> Archive required code, model, lineage, evaluation, approval, and audit evidence
-> Apply data and artifact retention or deletion policy
-> Remove infrastructure, access, alerts, dashboards, and contracts
-> Verify no dependent workflow remains and document closureCommon Maintenance Mistakes
| Mistake | Consequence | Better practice |
|---|---|---|
| Retrain on schedule without diagnosis | Unnecessary cost or a worse model | Use evidence and validate every candidate |
| Update directly in production | Compatibility and behavior failures | Build immutable release and test progressively |
| Maintain the model only | Data, prompt, tool, runtime, and infrastructure decay | Own the complete AI product |
| Use floating latest versions | Uncontrolled behavior changes | Pin and record resolved versions |
| No assigned owner | Alerts and deprecations remain unresolved | Maintain accountable ownership |
| Ignore low-traffic services | Stale risk and cost remain online | Review value, support, and retirement |
| Skip recovery tests | Backups and rollback fail during incidents | Run restoration and failover exercises |
| Keep all data forever | Privacy, security, and cost risks grow | Apply justified retention and deletion |
| Delete old release immediately | Rollback and audit become impossible | Retain required known-good evidence |
| No maintenance capacity | Debt and vulnerabilities accumulate | Fund planned preventive work |
Practical Exercise
- Choose a deployed AI service and create its owner and component inventory.
- Record versions, support dates, dependencies, data contracts, dashboards, runbooks, cost center, and last review.
- Review recent service, data, model, safety, outcome, and cost signals and identify one maintenance need.
- Update a dependency or model through a reproducible build, complete tests, staging, and canary release.
- Demonstrate rollback and verify predictions, service health, and affected records.
- Run a secret-rotation or backup-restoration exercise and retain evidence.
- Identify one stale resource, model, dataset, log stream, or alert and apply governed cleanup or retirement.
- Create continuous, monthly, event-driven, and quarterly maintenance checklists with owners.
Production Maintenance Checklist
[ ] Business, model, data, application, platform, security, privacy, and operational owners assigned
[ ] Models, endpoints, pipelines, data, features, prompts, indexes, tools, dependencies, and infrastructure inventoried
[ ] Objectives, dashboards, alerts, support windows, review dates, costs, and runbooks current
[ ] Data quality, drift, labels, slices, model quality, safety, outcomes, and value reviewed
[ ] Dependencies, runtimes, drivers, certificates, identities, permissions, and vulnerabilities maintained
[ ] GenAI provider, prompts, retrieval, indexes, tools, policies, evaluations, tokens, and quotas reviewed
[ ] Changes use version control, immutable builds, testing, approval, canary, rollback, and verification
[ ] Backups, restoration, failover, incidents, reconciliation, and emergency revocation exercised
[ ] Technical debt, waste, exceptions, deprecations, unsupported assets, and corrective actions tracked
[ ] Retention, deletion, archive, replacement, retirement, and ownership transfer tested