4G remote monitoring for compactors & critical equipment
Free 1-month trial
Technical & AI

Generative AI in industry: use cases, RAG architecture and ROI

5 août 202610 min readIOTINNOV Team

Why generative AI interests industry

Since 2023, generative AI has dominated discussions: automatic writing, conversational assistants, image generation. For an industrial manager, the question is not whether an assistant can write an email, but whether these technologies can reduce production costs, improve maintenance reliability, accelerate time-to-market and compensate for the technical skills shortage affecting the manufacturing sector.

This is possible, provided you move beyond laboratory demonstrations and build systems adapted to the real constraints of industry: proprietary data, traceability requirements, quality standards, production environments sometimes isolated from the network and an imperative need for reliability. This article details the use cases that work, the architecture that makes them possible and the pitfalls to avoid.

Generative AI: what are we talking about?

Generative AI refers to models capable of producing new content (text, code, images, sequences) from a prompt. Language models (LLM, for Large Language Model) are their core: they predict the next token in a sequence, which allows them to answer questions, summarize documents, write code or draft procedures.

Three concepts recur systematically in industrial projects:

  • RAG (Retrieval-Augmented Generation): the model is connected to a business knowledge base (manuals, CMMS, standards, plans). The user's query is transformed into a vector, which is used to search for relevant documents; the model then answers based on these documents. This is the foundational technique for industrializing generative AI without retraining a model.
  • Fine-tuning: an existing model is partially retrained on business data to improve its style, vocabulary or precision in a domain. More expensive and more complex than RAG, it is only justified when RAG is insufficient.
  • AI agents: systems that chain multiple steps (query an API, run a script, verify a result) to accomplish a complete task. We detail their architectures in a dedicated article on autonomous agents.

The essential distinction is between consumer generative AI (generic, connected to the Internet, with no data control) and industrial generative AI (deployed on proprietary data, with guardrails, human validation and response traceability). All the use cases below fall into the second category.

Use case 1: RAG on technical documentation and CMMS

A medium-sized factory can accumulate tens of thousands of pages of documentation: manufacturer manuals, maintenance sheets, electrical diagrams, quality procedures, intervention histories. This documentation exists, but it is little used for lack of time. A maintenance technician then spends a significant part of their day searching for information, often in paper binders or unindexed PDFs.

RAG works as follows:

  • all documentation is ingested: PDF, Word, spreadsheets, CMMS exports, even photos of nameplates after OCR;
  • each document is split into segments (typically 500 to 1,000 characters with overlap), converted into numerical vectors and stored in a vector database;
  • the technician queries the system in natural language: "What is the procedure for replacing the seal of pump P-203? What failures have already been encountered on this reference?";
  • the system returns a sourced answer, with the exact references of the documents used, which the user can verify.

The expected benefits are concrete: less time lost in document searching, more compliant interventions (the technician follows the correct procedure rather than their memory) and the transfer of know-how from experienced technicians before they retire.

CMMS (Computerized Maintenance Management System) is an interesting special case: by connecting RAG to the history of work orders, you can ask "What are the most frequent causes of failure for this machine over the last 12 months?" and get a synthesis enriched with intervention reports. A dormant database becomes a decision-support tool for maintenance managers. Data from equipment remote monitoring (alert history, cycle counters, CSV exports or API) can complement this base.

Use case 2: PLC and HMI code generation

Programming PLCs (Programmable Logic Controllers) is a rare and expensive skill. Experienced programmers are in high demand and automation projects last for months. Generative AI opens up a pragmatic avenue here: assisted code generation in industry languages.

Recent LLMs have been trained on immense code corpora, including common automation languages: Structured Text (ST, IEC 61131-3), Ladder Diagram (LD) in textual form, Siemens SCL, or Python for vision equipment. An engineer can for example ask: "Generate a function block in ST that manages the startup sequence of three motors with a 5-second delay between each start and an interlock on thermal fault." The model produces a code skeleton that the engineer verifies, adapts and integrates into their TIA Portal or CODESYS project.

The programmer is not replaced: their productivity increases, especially on standard sequences (startups, shutdowns, fault management), which often represent a large part of an installation's code. The gain is even more pronounced on associated documentation: code comments, I/O lists, operating manuals, deliverables that nobody likes to produce but that every client demands.

For HMIs (Human-Machine Interfaces), the trend is toward generating views from specifications: the engineer describes the expected screen ("startup page with 4 motors, status indicators, start/stop buttons with interlock") and the model generates the page structure in the format of the HMI software used. Fine-tuning remains necessary, but repetitive data entry disappears.

Use case 3: synthetic data for industrial vision

AI-based industrial vision runs into a classic problem: to detect a defect through supervised learning, you need thousands of defect images. Yet defects are rare by definition, which is precisely why you want to detect them. A factory may produce millions of parts per year with only a few hundred documented defective parts: not enough to train a reliable model.

Generative AI circumvents this paradox by producing synthetic data: realistic defect images, generated artificially, with controlled variations (orientation, lighting, severity). Several approaches exist:

  • Physical 3D rendering: the part and its defects are modeled in a rendering engine (Blender, Unity, Unreal), then thousands of views are generated with varied lighting and poses. This is the most controllable method, widely used for geometric defects.
  • Conditional diffusion: diffusion models, of the type that generate images, can be refined to insert a realistic defect on a healthy image while producing the corresponding segmentation mask.
  • Synthetic/real blending: the recommended practice is to train on a blend of real data (few) and synthetic data (abundant), then validate only on real data.

Used properly, synthetic data greatly reduces the number of real images to collect to achieve satisfactory precision, depending on the nature of the defects and the quality of the rendering. The approach is particularly effective for inline quality control, surface defect detection and assembly verification.

As with Edge AI on embedded systems, the trained model can then be optimized (quantization, distillation) to run at the line edge, without depending on a cloud connection.

Use case 4: quality reports, compliance and regulatory documentation

Regulated industries (agri-food, pharmaceutical, automotive, aerospace) produce considerable volumes of compliance documents: material certificates, non-conformity sheets, audit reports, batch records. These documents follow strict formats and mobilize qualified teams who often rephrase the same information.

Generative AI is effective on this type of task because it combines three strengths:

  • structuring: transforming scattered inspection notes into a report conforming to the company's template;
  • synthesis: aggregating a quarter's non-conformities into a root cause analysis readable by management;
  • technical translation: producing multilingual versions of documents, with human review, a significant gain for exporting groups.

The critical point is human validation: in a regulatory context, a generated text can never be signed as-is. The architecture must integrate a validation workflow: the document draft is generated, a manager reviews it, corrects it if necessary, then signs it. AI provides an already well-advanced draft; the human provides the verification that engages their responsibility.

Reference architecture

These use cases rely on a common architecture, which can be described layer by layer:

  • The data layer: source documents (PDF, CMMS, ERP, plans) are connected via standard connectors. An ingestion pipeline cleans, splits and indexes them. Data freshness is ensured by scheduled or event-triggered synchronizations.
  • The vector database: the heart of RAG. It stores embeddings (numerical representations of segments) and serves semantic similarity searches. Open source solutions (pgvector, Qdrant, Milvus) cover most industrial needs without expensive licensing.
  • The orchestration layer: an application service that receives queries, builds prompts, calls the model, applies guardrails and returns sourced answers. This is where access rights are managed (an operator must not query HR data), logs and traceability.
  • The model: open source LLM hosted on-site (Llama, Mistral, Qwen and their derivatives) or cloud API, depending on confidentiality constraints. For sensitive process data, on-site hosting is often the only acceptable option.
  • The interface: internal web portal, integration into the existing CMMS or conversational assistant on the workstation. It must systematically display the sources of answers: this is the first guardrail against blind trust.

Two decisions deserve particular attention. The first is model choice: intermediate-sized open models are often sufficient for industrial use cases in French, with an inference cost compatible with an SME budget. The second is sizing: for a first production deployment, a few thousand documents and a few dozen users are enough to validate the value; there is no need to aim for very large scale from day one.

ROI: what these systems cost and what they bring

A few orders of magnitude, to be adjusted according to each context:

  • Infrastructure cost: a server equipped with a GPU (or even a small quantized model on CPU) is sufficient for an internal RAG used by a few dozen people. Depending on the chosen option, the budget ranges from a few thousand euros of hardware to a few hundred euros per month of cloud API.
  • Engineering cost: a first operational use case (RAG on documentation, for example) is generally deployed in a few weeks with a small team: data ingestion, model choice, interface, precision testing.
  • Direct gains: faster document search, accelerated report writing, standard PLC code produced faster. Measure them on your own indicators before and after deployment.
  • Indirect gains: better compliance, knowledge transfer, fewer maintenance errors, reduced downtime thanks to faster diagnostics.

The rule that emerges from field feedback: start small, measure, then extend. A first profitable use case legitimizes the next ones. The classic mistake is to launch a vast "AI" program without an identified use case, which consumes budget without producing measurable value.

Pitfalls to avoid: hallucinations, confidentiality, dependency

Industrial generative AI has real limitations, and ignoring them is costly. Here are the five most common pitfalls:

  • Hallucination: a model can produce a perfectly written and totally false answer. Countermeasures: RAG with displayed sources, human validation of decisions that engage responsibility, systematic precision evaluation on a reference question set before production deployment.
  • Data leakage: sending proprietary production data to a public API is a legal and strategic risk. Any sensitive document must go through a private deployment or a cloud contract offering explicit guarantees.
  • Vendor lock-in: a proprietary model accessible only via API can change behavior, pricing or availability overnight. Favor open models and an architecture that allows changing models without rewriting the application.
  • False precision: evaluating a RAG system on a few examples "that work well" is a classic bias. You need a structured and maintained evaluation set, with recall metrics (was the right document found?) and fidelity metrics (does the answer respect the source?).
  • Forgetting system maintenance: documents change, models evolve, users invent new uses. A generative AI system is a product that requires maintenance, not a project that ends.

How to start: the four-step roadmap

For an SME or mid-cap company that wants to take action without taking unnecessary risk:

  1. Choose a high-value, low-risk use case: RAG on technical documentation is the best candidate in most cases, because it makes no decisions that engage responsibility; it helps a human find information.
  2. Build and clean the data: system quality depends first on indexing quality. Define the document scope, standardize formats and plan for updates.
  3. Build a measurable proof of concept: a few weeks, a restricted scope, precision metrics defined in advance and a demonstration to end users as soon as possible.
  4. Go to production with guardrails: source display, human validation, audit logs, user training. Then gradually extend to other use cases, for example among the processes to automate first in an SME.

This approach avoids both oversizing and failure through lack of adoption. Technologies evolve fast, but the method remains the same: start from a real business need, measure the value, iterate.

Conclusion

RAG on documentation, PLC code generation, synthetic data for vision and regulatory writing assistance are proven use cases, whose return on investment can be measured in months rather than years. Success depends less on model sophistication than on data quality, architecture sobriety and the rigor of human validation.

For companies integrating these technologies into their existing systems (CMMS, supervision, ERP), the challenge is now operational: choose the first use case well, deploy it properly and develop the internal skill that will allow going further.

An embedded IoT project?

Our team designs the box, its firmware and the platform. Let's discuss your needs.