Yesterday we built an anomaly detection system that learns normal behavior and flags deviations. Today we apply that to machines. The AI Predictive Maintenance System monitors equipment health from sensor data, predicts failures before they happen, points toward root causes, and turns predictions into scheduled maintenance. This is industrial machine learning on time-series data. LLMs have a real but supporting role: helping technicians and planners act on predictions, not making the predictions.
Save this sheet. The rest of this note walks through it section by section.
What We Are Building
A predictive maintenance system that:
- Monitors equipment health in real time
- Predicts failures before they occur
- Identifies likely root causes
- Optimizes maintenance schedules
- Reduces unexpected downtime and extends equipment life
Use cases: manufacturing plants, power generation, oil and gas, transportation and fleets, HVAC, smart buildings, and industrial IoT generally.
The business case is simple to state. Reactive maintenance means fixing things after they break, with unplanned downtime. Preventive maintenance means servicing on a fixed schedule, often replacing parts that had life left. Predictive maintenance aims to service equipment when the data says it is needed.
System Architecture
Data Collection (sensors, IIoT) -> Data Ingestion (real-time) -> Processing and Storage
-> ML Models (prediction) -> Insights and Alerts -> Maintenance Actions
-> Feedback and Continuous Learning
Sensors measure vibration, temperature, pressure, current, and RPM. An IoT gateway buffers and forwards readings into a stream (Kafka), where they are validated and written to a time-series database. Feature engineering turns raw readings into windowed statistics. Models produce anomaly flags, remaining useful life (RUL) estimates, failure classes, and trend forecasts. Those become failure alerts, health scores, and risk levels, and then maintenance actions: work orders, scheduling, parts planning, and technician alerts. Outcomes feed back into retraining.
Key Components
| Component | Role |
|---|---|
| Sensors and IoT devices | Vibration, temperature, pressure, current, RPM |
| Stream processing | Kafka for ingestion, Flink or Spark for real-time transforms |
| Time-series database | InfluxDB or TimescaleDB for high-frequency readings |
| Feature store | Rolling statistics and frequency features per asset |
| ML models and training | Anomaly, RUL, classification, forecasting |
| API and services | Expose predictions to maintenance systems |
| Alerts and notifications | Severity-based routing to planners and technicians |
| Dashboard and visualization | Fleet health, predictions, trends |
The Models
The sheet lists five model families, and they answer different questions:
| Question | Model family | Examples |
|---|---|---|
| Is this machine behaving unusually? | Anomaly detection | Isolation Forest, One-Class SVM, autoencoders |
| How long until it fails? | Remaining useful life | LSTM, GRU, DeepAR |
| What kind of failure is coming? | Failure classification | Random Forest, XGBoost |
| Where is this sensor trending? | Trend forecasting | Prophet, ARIMA, LSTM |
| How healthy is it overall? | Health scoring | Ensembles combining the above |
Most teams should start with anomaly detection and simple trend thresholds per asset type. They need no failure labels and deliver value early. RUL and failure classification come later, once you have enough labeled history.
The Labeling Problem
RUL and classification models need to know when each asset failed and how. That information lives in work orders and maintenance logs, which are often incomplete, free-text, and inconsistent. Joining sensor data to failure events is the step that decides whether supervised models are possible:
import pandas as pd
failures = work_orders.loc[work_orders["type"] == "failure", ["asset_id", "failed_at"]]
labeled = pd.merge_asof(
readings.sort_values("ts"), failures.sort_values("failed_at"),
left_on="ts", right_on="failed_at", by="asset_id", direction="forward",
)
labeled["rul_hours"] = (labeled["failed_at"] - labeled["ts"]).dt.total_seconds() / 3600
Readings with no later failure come out with no RUL label. They are censored, not healthy forever, and need careful handling in training. Failures are also rare, which is why the sheet's challenge table pairs labeled data scarcity with semi-supervised learning, and different equipment types with transfer learning.
Where LLMs Fit
LLMs do not predict bearing failure from vibration data. Purpose-built models do that better and cheaper. LLMs are useful around the prediction:
- Cleaning maintenance history. Extracting structured failure modes and dates from years of free-text work orders. This can recover the labels described above, with human review.
- Technician assistant. A RAG system over equipment manuals, past work orders, and procedures, so a technician can ask "what usually causes high vibration on this pump model?"
- Work order drafting. Turning a prediction and its contributing sensor signals into a draft work order with likely cause, parts, and steps, for a planner to approve.
- Plain-language summaries. Explaining why a health score dropped, based on the features that moved.
A Minimal Tech Stack
| Layer | Minimal choice |
|---|---|
| Language | Python |
| ML | Scikit-learn first, PyTorch or TensorFlow for sequence models |
| Streaming | Kafka, Flink later |
| Storage | TimescaleDB or InfluxDB, PostgreSQL for assets and work orders, S3 for raw archives |
| API | FastAPI |
| Visualization and alerting | Grafana, Alertmanager, PagerDuty or Slack |
| Deployment | Docker and Kubernetes |
Example Dashboard
The sheet's sample dashboard shows an overall health score, predicted failures for the next seven days, assets monitored, downtime avoided, and maintenance cost saved. Below that: health score over time, a failure prediction table listing assets like pumps, motors, compressors, fans, and gearboxes with risk level and predicted days to failure, alerts by severity, equipment health distribution, a vibration trend for one motor, and recent alerts such as vibration anomalies, high temperature, and pressure spikes.
The prediction table is the most important panel. "Motor-07, high risk, about two days" is what a planner acts on. Pair every prediction with the signals behind it and a confidence range, so the planner can decide whether to pull the machine now or at the next scheduled stop.
Downtime avoided and cost saved are the numbers leadership will ask about. Measure them honestly by comparing against a baseline period or a control group of assets, and expect results to vary widely by equipment and starting maintenance practice.
Production Concerns
Noisy sensor data. Sensors drift, drop out, and get replaced. Clean and filter at ingestion and track sensor health separately from machine health.
Model drift. Equipment ages, gets repaired, and runs under new loads. Retrain continuously and monitor prediction accuracy against actual outcomes.
Evaluation. For RUL, measure error against actual failure times. For alerts, track precision (alerts that found a real issue) and lead time (how early a real failure was flagged). An alert six hours before failure may be too late to order parts.
Integration. Predictions must reach the maintenance management system as work orders. Use standard APIs and microservices instead of a separate dashboard nobody checks.
Cost. High-frequency vibration data is large. Compute features at the edge or gateway and store raw data in cheap object storage.
Key Takeaways
- Predictive maintenance is time-series ML. Anomaly detection gives early value without labels.
- RUL and failure classification depend on clean, linked failure history.
- Predictions only matter when they become scheduled work orders.
- LLMs help with maintenance history, technician support, and work order drafts, not the forecasting itself.
FAQs
How much failure data do I need?
Enough failures per failure mode for the model to learn patterns. If you have very few, start with anomaly detection and health trends, and collect labels deliberately.
Can I use one model for all equipment?
Rarely. Different equipment types behave differently. Transfer learning helps, but expect per-type models or features.
Where should feature computation happen?
Often at the edge or gateway for high-frequency signals like vibration, sending summarized features upstream to reduce bandwidth and storage.
Up Next
Day 19 builds the AI Inventory Management System: demand forecasting, safety stock, reorder logic, and purchase order approvals, with LLMs supporting the planners rather than doing the forecasting. If you are exploring predictive maintenance for your equipment, get in touch.




Letters to the editor
No letters yet. Questions and counterpoints are welcome.