What if your industrial intelligence stopped guessing and started being accountable?

The case of the NSQA evolution in NARRATE

In a hyper-connected industrial world where data flows abundantly, but critical decisions still rely solely on human intuition supported by static data most of the time, a question is gaining traction:

Can a Large Language Model (LLM) take operational control of a manufacturing network without making up data along the way or acting as an opaque black box?

This is precisely the fundamental technological barrier we have faced within the framework of deliverable D3.3 of the European project NARRATE. 

It is a complex question that we are answering with the design and deployment of a new generation of industrial intelligence: the NSQA (Neuro-Symbolic Question Answering) module, integrated into the heart of our IMC (Intelligent Manufacturing Custodian) platform. 

In the development of artificial intelligence agents for critical environments, there is a fundamental problem: when you task a conventional generative AI with managing an entire operational network at once, it collapses. It suffers cognitive overload, rapidly degrades its context, and commits what we call “structural hallucinations”. 

In this post, we describe in detail how we have made a 180-degree turn in our engineering to unite the semantic flexibility of neural networks with the deterministic rigor of declarative logic. It is a definitive step toward transforming our factory into a system that not only reasons but is capable of following established rules to interact with the environment appropriately. 

Why did we have to abandon the previous strategy?

In the original conception of our architecture (documented in the early phases of deliverable D3.3), the platform’s decision-making brain operated under a classic continuous reasoning chain called “PlanAndExecute”. In this purely centralized model, a single ReAct (Reason + Act) agent managed the entire global context of the query, devised tactical steps, and directly executed available tools, whether they were RAG engines or enterprise API clients. 

The problem with this monolithic approach? That all cognitive and execution load resided in a single computational node. 

By exposing the same neural network to dozens of simultaneous endpoints, extensive OpenAPI schemas, heterogeneous parameters, and a constantly growing historical memory, the model collapsed. The agent would attempt to take logical shortcuts. It would invent intermediate variables or, more seriously, introduce commercial names into parameters where databases demanded strict technical identifiers. The inevitable result was cascading critical failures and HTTP 400 or 404 responses. 

Recent studies confirm that isolating the context of linguistic agents is a mandatory condition to overcome their inherent cognitive limits. The operational reality of Industry 4.0 taught us a vital lesson: purely neural models lack the robustness and determinism that a critical environment demands, while purely symbolic systems are too rigid and incapable of generalizing new linguistic descriptions. 

To solve this structural gap, we decided to retire the “monolithic agent” and evolve toward a distributed ecosystem. 

From an isolated brain to a team of specialists

To solve the problem of context degradation, we have restructured the NSQA engine by evolving toward a Hierarchical Multi-Agent Orchestration framework built on LangGraph. 

Conceptually and operationally, this new design takes its direct inspiration from holonic architectures historically validated in industrial automation, such as PROSA or ADACOR, which are based on autonomous, cooperative entities organized in levels. 

Our architecture now divides cognitive responsibilities into two perfectly delimited strata:

  • The Supervisor Agent (Strategist): Acts as the central cognitive core. It does not execute final actions or touch databases. Its sole function is to reflect on the user’s global objective, design a step-by-step resolution plan, and delegate clear, literal, and precise instructions to the appropriate specialists. It maintains the global working memory and the trajectory of the problem. 
  • The Factory of Specialized Sub-agents (Tacticians): These are highly focused agents dynamically generated through the analysis of OpenAPI specifications. They operate in totally isolated contexts, without access to the global memory of the conversation, which prevents context contamination at the root. Their sole objective is to translate the supervisor’s order into a strict technical execution schema (APISchema). 
  • The Deterministic Symbolic Executor: Once the sub-agent writes the schema, the symbolic code takes absolute control to inject secure authentication headers, execute pure HTTP requests, and return the raw observation back to the supervisor. With this separation of functions, we ensure that the LLM dedicates itself exclusively to planning and formatting, while the deterministic code manages the actual execution. 

The first filter: a gatekeeper that does not improvise

In operational platforms where safety and auditing are non-negotiable requirements, the information entry point cannot be left to the open and probabilistic interpretation of a generative neural model. 

For this reason, at the very base of the processing pipeline, we have placed an intelligent Query Router that operates under a strict deterministic classification protocol with a temperature set exactly at 0.0. Every time the system receives a signal—whether it is a free query from an operator or an automatic event captured by RabbitMQ—this semantic router evaluates the intent and imposes the execution path: 

  • Flow 1: System Override (Emergency Protocol): If the described situation activates an industrial risk previously configured in the database (e.g., a critical stock failure), the router completely overrides the AI’s creative autonomy. The system injects a static, hardcoded response plan that the agent is forced to execute step-by-step, blindly, and in strict chronological order. 
  • Flow 2: Fast-Track Bypass: Designed for direct queries of documentation in technical manuals (via RAG) or simple alerts from IoT sensors. It completely avoids the cognitive load and computational overhead of the multi-agent supervisor to offer responses with minimal latency. 
  • Flow 3: Dynamic Orchestration: Reserved exclusively for complex generic queries that require deploying the full multi-step reasoning capacity of the Supervisor. 

The 4 functional layers that support the decision

To achieve a manufacturing network that moves from simply visualizing data in isolated dashboards to understanding its context, anticipating bottlenecks, and acting in a justified manner, we have consolidated the NSQA module into four functional levels that interact in each cycle: 

  • Routing & Triage Layer: Acts as the deterministic entry point that evaluates incoming signals and efficiently distributes them between fast-track bypass, emergency override, or dynamic delegation. 
  • Symbolic Guardrail Layer: Functions as the structural and security backbone. It prohibits hallucinations by imposing strict rules before any execution. It integrates global anti-loop policies that prohibit sequential repetitive calls, forcing the processing of entire lists of assets through consolidated batch queries. 
  • Multi-Agent Orchestration Layer: Operationalizes problem-solving by coordinating the central Supervisor and the factory of technical specialists. 
  • Telemetry & Audit Layer: Replaces the abstract and uncontrollable concept of “unstructured learning” with a rigorous and quantitative tracking of the system’s actual execution. 

The result is a hybrid decision substrate: the neural layer provides the “human face” and semantic adaptability; the symbolic layer provides the logical, stable, and auditable “nervous system”. 

Guardrails in practice: Zero Assumptions

Let’s see how this neuro-symbolic shielding acts when faced with a real industrial test case. A user launches the following query in the chat: “Show me the risk associated with all suppliers of the product named Bespoke Baby Cot.”

A standard LLM would see the commercial name “BaseBasics SME” in the database and would attempt to directly invoke the risk tool by passing that linguistic parameter. Our system cuts that path off at the root by applying a strict Schema Awareness protocol:

  • The symbolic guardrail identifies that “BaseBasics SME” is a Name (it contains spaces and words), while the risk API strictly requires a technical ID (an alphanumeric code like CS_003). 
  • The system prohibits the model from “guessing” or formatting the text. It forces it to stop its plan and first call an inventory sub-agent (GET /suppliers) to resolve the exact mapping of entities. 
  • Only when the Supervisor receives the literal ID strings in its working memory does it authorize the call to the risk endpoint. 

Measure to trust: telemetry and self-healing rate

In critical sectors such as advanced logistics, energy supply, or manufacturing networks, trust is not claimed: it is demonstrated with traceable metrics. 

Our fourth layer audits the lifecycle of each query by extracting pure telemetry from LangGraph trajectories (ExecutionMetrics). For each generated response, the system records the exact latency time in seconds, total token consumption, and the length of the path explored. But the most innovative indicator we capture is the Self-Correction Rate

The software scans the observations returned by the tools looking for unmistakable error signatures (such as “MISSING ID”, “400 Bad Request”, or “404 Not Found”). If an agent makes a tactical slip, the guardrail intercepts it, the model reflects on the error and rectifies its strategy in the next turn autonomously, and the system counts that recovery. 

This telemetry offers objective data to engineers to refine prompts. Furthermore, when a dynamic resolution trajectory demonstrates perfect efficacy, the platform allows it to be submitted for human validation and saved as a permanent static plan. The system institutionalizes its own experience. 

The horizon map: Current limits and the evolution toward total autonomy

In industrial-grade software engineering, technical honesty is the first prerequisite for generating trust: no architecture is definitive; all are strategic bridges designed to bypass the technological bottlenecks of their era. 

Today, our orchestrated system masterfully solves determinism at execution time, but it remains constrained by two physical “stoppers”: the latency inherent in HTTP queries to the legacy RESTful services it attacks, and the dependence on a human-in-the-loop to validate successful dynamic trajectories before converting them into permanent static plans. 

The modular design of the IMC has not been conceived as a goal, but as a launchpad toward three cognitive evolutions already outlined in the NARRATE roadmap: 

  • Autonomous institutionalization by reinforcement: As the fourth layer accumulates thousands of execution metrics (ExecutionMetrics), the system will stop asking the user for permission to save a resolution plan. It will employ reinforcement learning based on environmental feedback to auto-validate and permanently institutionalize new strategies in the face of unprecedented disruptions. 
  • Proactive asset auto-discovery: Currently, our dynamic tool registry generates sub-agents by reading OpenAPI files provided by developers. The immediate evolution is to endow the Supervisor Agent with continuous network scanning capability. If the plant connects a new Digital Twin or deploys a vibration sensor on an assembly line, the strategist will detect it, read its gateway, and register it as a sub-agent on the fly, without writing a single line of code. 
  • The leap toward “Edge Computing” (From LLMs to SLMs): The exhaustive record of successes and self-corrections is building the project’s biggest hidden asset: a massive dataset of pure industrial trajectories. We will use these logs to apply “fine-tuning” on Small Language Models (SLMs) deployed locally on the factory’s own servers. 

We will eliminate cloud latency, suppress the inference cost of large commercial models, and bring neuro-symbolic reasoning directly to the plant’s silicon. 

Industrial impact: what do we achieve on the actual plant floor?

The deployment of the NSQA engine on the IMC platform demonstrates that uniting the best of structured reasoning with the flexibility of language brings four immediate benefits to industrial companies: 

  • Autonomous operational resilience: When a supplier gives notice that they will not deliver production components on time this week, the system does not freeze. It cross-references the stock graph in Neo4j, evaluates declarative rules, and proposes optimal purchase alternatives in seconds. 
  • Drastic compression of reaction time: Planning teams no longer need to spend hours manually reviewing spreadsheets and email histories to assess the impact of a logistical disruption; it is enough to ask the system a question. 
  • Total directive alignment: Thanks to the generative interface, the platform not only executes complex reconfigurations but justifies the “why” behind each choice in natural language, facilitating consensus between purchasing, the plant floor, and management. 
  • Viable technological scalability: The rigorous telemetry log will allow in the future to fine-tune small local language models (SLMs) trained for isolated tasks, drastically reducing dependence on and latency of gigantic commercial LLMs. 

In short, we have left behind the static factory that simply sees what happens, to give way to the cognitive industry that thinks, acts, and renders accounts. 

And if you are wondering if generative AI can manage the supply chain, the answer is: Yes

Authors
Picture of Jesús Ávila Molina

Jesús Ávila Molina

Picture of Jorge Capel Planells

Jorge Capel Planells

Share this post