The AI reads machine logs and free-text technician notes, proposes a root cause and opens a ticket with the parts needed.
When a machine throws a fault, a technician digs through logs and mentally joins it to something he saw last month. Notes from past repairs are free text and nobody searches them. The audit checks whether the logs are rich enough to infer cause, how to connect repair history to the live fault, and where the line is past which a technician must decide.
AI Agent + human review
A hybrid AI workflow with human-in-the-loop gates will automate routine fault diagnosis while keeping qualified technicians in control of safety-critical decisions.
The fault diagnosis process is a strong candidate for a hybrid AI workflow: structured machine logs and a decade of free-text repair notes provide the raw material for an AI system to propose root causes and draft tickets automatically, while the 10-15% of complex or safety-critical cases are routed to a technician for final judgement. The hybrid path is the right choice because the process combines high volume and clear rules for the majority of cases with a genuine need for human oversight on exceptions, and because compliance requires that reasoning is always recorded. The client's automation engineer already works in Python with live integrations against both the historian and the maintenance system, meaning the recommended path fits the existing stack precisely and avoids greenfield infrastructure work. The goal stated by the client, freeing technicians from the routine so they can focus on the hard cases, is exactly what a well-designed hybrid system delivers.
The automation engineer's existing Python integrations against the historian database and the maintenance system mean the hybrid AI workflow can be built directly on the current stack without introducing new middleware or vendor lock-in.
Process Overview
Fault diagnosis at this plant begins the moment a machine throws a fault and writes structured data to the historian database. A maintenance technician then manually reviews those logs, searches their own memory and a decade of free-text repair notes stored in the maintenance system, and mentally connects the current fault to patterns they have seen before. Once they have a working hypothesis, they propose a root cause, open a ticket listing the required parts, and record their reasoning in the maintenance file for audit purposes. The whole cycle runs roughly 2,400 times a year and takes an average of 55 minutes per case, consuming around 2,200 hours of skilled technician time annually.
The process sits at the intersection of two very different data types. The historian database is structured and queryable, giving a clean picture of what happened electrically or mechanically at the moment of the fault. The maintenance system holds ten years of repair notes written in plain language by multiple technicians, full of institutional knowledge but inconsistent in terminology and format. Bridging those two sources quickly and reliably is the core challenge the team faces every time a machine goes down.
A small but significant minority of cases, somewhere between ten and fifteen percent, do not match any standard pattern and require genuine expert judgement. Compliance rules make this distinction critical: safety-critical decisions must be made by a qualified technician, and the reasoning behind every diagnosis must be recorded in the maintenance file. The current process depends heavily on the knowledge of two or three experienced people, which creates concentration risk and limits the team's ability to scale as fault volume grows.
Path Scores
High volume, structured inputs, rich historical data and a clear complexity threshold make this process ideal for AI-driven automation on the routine cases with a mandatory human gate for exceptions and safety-critical decisions. The existing Python stack and in-house integrations reduce build risk significantly. Compliance requirements around recorded reasoning are naturally satisfied by a workflow that logs every AI inference step.
A fully automated AI workflow would handle the routine majority well, but the 10-15% of non-standard cases and the explicit regulatory requirement that safety-critical decisions stay with a qualified technician make full automation inappropriate without human gates. It is viable as the backbone of the hybrid approach but not as a standalone solution.
An AI agent could autonomously query logs, retrieve repair history and draft tickets, and would handle the retrieval-augmented reasoning over free-text notes well. However, the safety-critical nature of the decisions and the compliance requirement for qualified-technician sign-off on exceptions mean a fully autonomous agent without hard human gates is not appropriate here.
The structured log data could support rule-based pattern matching for known fault codes, but the free-text repair notes and the need to reason across ten years of unstructured history require natural language understanding that deterministic code cannot provide. It could complement the hybrid solution for the simplest fault patterns but is insufficient on its own.
RPA is suited to navigating fixed UI workflows and copying structured data between systems. The core challenge here is semantic reasoning over unstructured text and log data, which is outside RPA's capability. It could automate ticket creation once a diagnosis is confirmed but adds little value to the diagnostic step itself.
Training the team on AI tools would improve individual productivity but would not address the structural problem: 2,200 hours per year of manual effort driven by the absence of a system that connects logs to repair history at scale. Education is a valuable complement to the recommended path, not a substitute for it.
The current manual process is fragile, knowledge is concentrated in two or three people, and 2,200 hours per year are consumed by a task that is largely pattern-matching against historical data. Staying manual carries growing operational risk and does not scale as fault volume increases.
Process Dimensions
Eight dimensions drive the recommendation, scored 0–10 with a note on each.
Machine logs are structured and queryable via the historian database, but ten years of repair notes are free text, requiring NLP or embedding-based retrieval to unlock their value.
The majority of fault patterns follow recognisable rules that can be codified, but 10-15% of cases require contextual judgement that resists simple rule expression.
Exceptions account for 10-15% of cases but consume a disproportionate share of total effort, making a clean human escalation path essential rather than optional.
The automation engineer has already built Python integrations against both the historian database and the maintenance system, giving the project a strong technical foundation from day one.
At 2,400 cases per year and 55 minutes each, the process consumes roughly 2,200 hours annually at a significant labour cost, making the ROI case for automation compelling.
Fault patterns evolve as machinery ages or changes, so the AI model will need periodic retraining or prompt updates, but the core workflow structure is unlikely to change frequently.
Routine cases require minimal human judgement, but safety-critical and non-standard faults demand qualified technician oversight, making a hard human gate non-negotiable.
Safety-critical decisions must be made by a qualified technician and all reasoning must be recorded in the maintenance file, requirements that the hybrid approach satisfies by design.
ROI Estimate
£99,000
Current annual cost
65%
Estimated time saved
£64,350
Annual savings
5mo
Payback period
Current annual cost is calculated as 2,400 cases x 55 minutes / 60 x GBP 45 per hour = GBP 99,000. The 65% savings estimate reflects full automation of the routine 85-90% of cases and partial assistance on exceptions, with technician time on exceptions assumed to remain largely manual.
Implementation Roadmap
Assess the quality and completeness of the historian database logs and the ten years of free-text repair notes. Build a retrieval-augmented generation (RAG) pipeline in Python that embeds repair notes and enables semantic search against live fault data. This milestone establishes whether the historical data is rich enough to support reliable root-cause inference and surfaces any data cleaning work needed.
Develop the AI workflow that ingests a live fault event, queries the historian for structured log context, retrieves the most relevant historical repair notes via the RAG pipeline, and produces a ranked list of probable root causes with supporting evidence. Validate accuracy against a labelled sample of past cases provided by the maintenance technicians. The automation engineer leads this phase using the existing Python stack.
Implement the routing logic that sends routine high-confidence diagnoses directly to ticket creation and flags low-confidence or safety-critical cases for technician review. Build the ticket creation integration so that parts lists and recorded reasoning are written automatically to the maintenance file. Define and agree the confidence threshold with the plant manager and a senior technician before go-live.
Run the system in shadow mode alongside the existing manual process for a defined period, comparing AI-proposed diagnoses to technician decisions. Use disagreements to refine the model and adjust the confidence threshold. Collect technician feedback on the quality of retrieved repair history and the clarity of the reasoning recorded in the maintenance file.
Retire the manual email and spreadsheet workarounds and make the hybrid system the single point of record for fault diagnosis. Document the system architecture and the confidence-threshold decision for the maintenance file audit trail. Train all four technicians and the plant manager on how to review escalated cases and how to correct AI proposals so that corrections feed back into the model.
Risks & Considerations
The biggest risk is over-reliance on AI confidence scores for cases that sit near the threshold between routine and safety-critical. If the threshold is set too high, technicians are flooded with reviews and adoption suffers; if set too low, a genuinely hazardous fault could be actioned without qualified sign-off. The threshold must be agreed with the plant manager and reviewed quarterly as the model accumulates more labelled data. A second risk is the quality of the historical repair notes: ten years of free-text written by multiple technicians will contain inconsistent terminology, abbreviations and missing context, which can degrade retrieval accuracy for rare fault types. A data cleaning and normalisation sprint before the pilot is essential to mitigate this. Finally, the system concentrates diagnostic knowledge in a model that the automation engineer maintains; a succession plan or documentation standard should be established so that the organisation is not dependent on a single person to keep the system running.
In partnership with AIRIES, the AI learning platform. These levels fit your result.
-
3
Corporate Applied Intelligence & AutomationTurn your own tasks into AI workflows, build reports and dashboards, set up a personal AI assistant.
-
4
AI Leadership & Scalable SystemsDesign teams of AI agents and automate whole departments.
Level 3 gives the automation engineer the structured approach to turn this diagnostic process into a repeatable AI workflow, covering task auditing, workflow design and personal AI tooling that directly maps to the build phases in the roadmap. Level 4 equips the plant manager to design the escalation playbook, set confidence thresholds and oversee a department-level system where AI agents handle routine cases and humans handle exceptions, which is precisely the operating model the client wants to reach.
- Building AI workflows in Python
- Retrieval-augmented generation for unstructured text
- Designing human-in-the-loop escalation gates
- Managing and auditing AI agent outputs
The automation engineer who will build and maintain the system, plus the plant manager who will oversee AI-assisted decisions and manage the escalation process.
Architecture Overview
Hover to zoom · click for fullscreen
Why This Approach
The recommended path is a Hybrid AI workflow with human-in-the-loop gates, and the case for it rests on a combination of factors that rarely align this cleanly in a single process. The volume is high enough, around 2,400 cases per year, that even modest per-case time savings translate into a compelling return. The data is rich enough, structured logs plus a decade of repair history, to give an AI system genuine material to work with. And the process has a natural complexity threshold built into it: the majority of faults are pattern-matching exercises that a well-designed system can handle reliably, while a defined minority genuinely require a trained technician. A Hybrid architecture is not a compromise between automation and manual work; it is the design that fits this process most precisely.
The client's preferred tech stack is Python, and the automation engineer already has live integrations against both the historian database and the maintenance system. This matters more than it might initially appear. Many automation projects of this type spend their first month on infrastructure: standing up middleware, negotiating API access, dealing with authentication across systems. Here, that work is largely done. The Hybrid AI workflow can be built directly on the existing Python foundation, which reduces build risk, keeps the team working in a language they already know, and avoids introducing a new vendor whose platform the automation engineer would need to learn and maintain. The recommendation fits the stack precisely, and that alignment is worth preserving.
The alternative paths were considered seriously. A fully automated AI Workflow scores well on the routine majority but fails on the compliance requirement: safety-critical decisions must stay with a qualified technician, and a system with no mandatory human gate cannot satisfy that constraint by design. An AI Agent could handle the retrieval and reasoning steps capably, particularly the semantic search over free-text repair notes, but an autonomous agent without hard escalation controls carries the same compliance problem. Traditional Code could support rule-based pattern matching against known fault codes from the historian database, but it cannot reason across ten years of unstructured text, which is precisely where the diagnostic value lies for complex cases. RPA is the wrong tool entirely: the bottleneck here is semantic reasoning, not UI navigation or data copying between fixed screens.
The Hybrid path satisfies the compliance requirements by design rather than by workaround. Every AI inference step is logged, which means the maintenance file always contains recorded reasoning whether the case was handled automatically or escalated. The human gate for safety-critical and low-confidence cases is not an optional feature; it is the architectural boundary that makes the rest of the automation safe to deploy. Defining the confidence threshold, the point at which the system routes a case to a technician rather than proceeding automatically, is the most important design decision in the whole project, and it needs to be agreed with the plant manager and a senior technician before go-live, then reviewed quarterly as the model accumulates more labelled data.
The honest tradeoff is this: a Hybrid system is more complex to build and govern than a simple automated pipeline. The confidence threshold requires ongoing calibration. The RAG pipeline over ten years of free-text notes will need a data cleaning sprint before it produces reliable results. And the system will concentrate diagnostic knowledge in a model that the automation engineer maintains, which creates a succession risk that needs to be managed explicitly. None of these tradeoffs change the recommendation, but they all need to be planned for. The projected payback period of around five months, based on 65 percent automation of current manual effort, is realistic if the data quality work is done properly and the pilot phase is used honestly to refine the model rather than treated as a formality before go-live.
Comparing the Top Approaches
The two closest alternatives to the recommended Hybrid path are a fully automated AI Workflow and an autonomous AI Agent. Both would handle the routine majority of fault diagnoses reasonably well, and either could serve as the backbone of a workable system. The reason neither is sufficient on its own comes down to two things that are specific to this process: the explicit regulatory requirement that safety-critical decisions remain with a qualified technician, and the reality that 10 to 15 percent of faults do not match any standard pattern and genuinely require contextual human judgement. A fully automated AI Workflow has no mechanism for routing those cases to a person before a ticket is actioned. An autonomous AI Agent could query logs, retrieve repair history and draft a ticket without any human involvement, which is precisely what the compliance requirement prohibits for the harder cases. The Hybrid path resolves this not by weakening the automation but by adding a hard routing gate: high-confidence routine diagnoses flow straight to ticket creation, while anything below the agreed confidence threshold, or flagged as safety-critical, lands in a technician review queue before any action is taken.
What makes the Hybrid path the clear winner for this specific process is that it matches the actual shape of the work. The majority of the 2,400 annual cases are pattern-matching exercises against structured logs and historical notes, which an AI system can do faster and more consistently than a person searching from memory. The minority are genuinely difficult, and those are exactly the cases where a skilled technician adds irreplaceable value. The Hybrid design does not try to replace that judgement; it clears the routine workload away so that technicians can spend their time on the cases that actually need them. Traditional Code and RPA were both considered and scored significantly lower, for straightforward reasons. Traditional rule-based code could handle a subset of known fault codes in the structured historian data, but it cannot reason across ten years of free-text repair notes, and that unstructured history is where a large part of the diagnostic value sits. RPA is well suited to navigating fixed interfaces and copying structured data between systems, but the diagnostic step here is a reasoning problem, not a navigation problem, and RPA contributes nothing to it.
How to Build It
The build starts with a data audit before any model work begins. The automation engineer queries the historian database via its existing Python interface and takes a representative sample of the free-text repair notes from the maintenance system to assess consistency, completeness and the range of terminology in use. Ten years of notes written by multiple technicians will contain abbreviations, shorthand and gaps, and the audit surfaces exactly where cleaning and normalisation are needed before those notes become reliable retrieval material. The output of this phase is a cleaned, embedded corpus of historical repair records stored in a vector database, with a retrieval-augmented generation pipeline in Python that can accept a live fault event and return the most semantically relevant past cases as context. LangChain or LlamaIndex are natural choices for orchestrating this pipeline given the automation engineer's existing Python fluency, and a hosted embedding model such as OpenAI's text-embedding-3-small or a self-hosted alternative via Ollama keeps the data within the organisation's control if that is a requirement.
With the retrieval layer in place, the next phase builds the inference engine. When a machine throws a fault, the historian database emits the structured log data through the existing Python integration. The system pulls that data, constructs a prompt that combines the structured log context with the top retrieved repair cases, and calls a language model to produce a ranked list of probable root causes with supporting evidence drawn from both sources. GPT-4o or a comparable model is appropriate here given the reasoning complexity involved. Every inference step, the retrieved cases, the prompt, the model's reasoning and the proposed root cause, is written to a structured log that feeds directly into the maintenance file, satisfying the audit requirement by design rather than as an afterthought.
The human-in-the-loop gate sits between the inference engine and ticket creation. A confidence score is derived from the model's output and matched against a threshold agreed in advance with the plant manager and a senior technician. Cases above the threshold and not flagged as safety-critical are passed automatically to the ticket creation step, where the maintenance system integration writes the parts list and recorded reasoning without further human input. Cases below the threshold, or carrying a safety-critical flag based on fault code classification, are pushed to a technician review queue, implemented as a lightweight web interface or a structured email notification depending on what the team will actually use. The technician sees the AI's proposed diagnosis and the supporting evidence, approves or corrects it, and the corrected outcome is written back to the maintenance system and added to the training corpus for future improvement.
The system runs in shadow mode for three to four weeks before go-live, processing live faults in parallel with the existing manual process without replacing it. Every case where the AI proposal and the technician's manual diagnosis diverge is reviewed together to refine the confidence threshold and identify retrieval gaps. This shadow period is also when the team builds trust in the system: technicians who can see the AI's reasoning and check it against their own judgement are far more likely to rely on it confidently once it goes live. After shadow mode, the manual email and spreadsheet workarounds are retired and the hybrid system becomes the single point of record for fault diagnosis across all four technicians and the plant manager.
Risks in Detail
The most serious risk in this design is miscalibration of the confidence threshold that separates automated ticket creation from technician review. Set the threshold too conservatively and technicians are reviewing a large fraction of cases manually, adoption suffers, and the efficiency gains fail to materialise. Set it too permissively and a fault that genuinely warrants qualified human judgement gets actioned automatically, which in a safety-critical maintenance context could have consequences well beyond a wrong parts order. There is no purely technical way to resolve this: the threshold has to be agreed with the plant manager and at least one senior technician before go-live, tested carefully during the shadow period, and reviewed on a quarterly schedule as the model accumulates more labelled feedback. The routing logic must also treat certain fault codes as hard safety-critical flags that bypass the confidence score entirely and always go to a technician, regardless of how confident the model appears to be.
The second risk is the quality of the historical repair notes. A decade of free-text written across a rotating team of technicians will contain inconsistent terminology for the same fault types, partial entries, and cases where the root cause was never recorded because it was obvious to the person writing at the time. A retrieval system trained on that data will underperform on exactly the rare fault types where historical context matters most, because rare faults are precisely the ones most likely to have sparse or inconsistent records. The data cleaning sprint before the pilot is not optional; it is where much of the real diagnostic accuracy is won or lost. Beyond data quality, there is a dependency risk worth naming directly: the system as described is maintained by a single automation engineer. If that person leaves, the organisation needs someone who understands the RAG pipeline, the confidence threshold logic and the model prompts well enough to keep it running and retrain it as fault patterns evolve. Documentation standards and a knowledge transfer plan should be built into the rollout phase, not treated as something to do later.
Claude Code Starter
A scaffolded project ready to open in Claude Code. Unzip, open the folder, and Claude starts building immediately.
Claude Code Starter (.zip)
Your own assessment includes a ready-to-use project scaffold: CLAUDE.md, pyproject.toml, src/agent.py and .env.example. Open the folder in Claude Code and it starts building.