Last summer, my studies at Tampere University were nearing completion, and it was time to start working on my Master’s thesis. During an early discussion with our CEO, Pyry, the idea of utilizing AI in variable mapping came up. At that point, the concept was still quite broad, but over time it evolved into a more concrete research topic and eventually into a full thesis.
The full thesis is available in Tampere University’s archive Trepo.
Why This Problem Matters
As Industry 4.0 continues to advance, the importance of data utilization keeps growing. With the rise of AI and the Industrial Internet of Things (IIoT), systems are expected to communicate more seamlessly with each other. This requires data to be represented in a standardized and widely understood format.
In industrial environments—especially in manufacturing—the amount of collected data is already massive, and it is only expected to increase. However, raw data alone is not enough. To be useful, it must be structured, consistent, and compatible across systems.
This is where OPC UA and its information models come in. They provide a standardized way to represent data, enabling interoperability between devices and systems—even across different vendors. However, transitioning from legacy systems to modern OPC UA-based solutions can feel like a significant challenge. One of the biggest bottlenecks in this transition is variable mapping.
The Bottleneck: Manual Variable Mapping
Mapping industrial automation variables into OPC UA information models is often one of the most time-consuming steps in system integration. While OPC UA enables interoperability, achieving it in practice usually requires a large amount of manual work, especially when dealing with legacy systems and inconsistent naming conventions.
In real-world environments, variable names and structures can vary significantly between systems. As a result, mapping is often repetitive, time-consuming, and prone to human error. Depending on the size of the system, this phase alone can take weeks or even months to complete.
In practice, the challenge often looks deceptively simple. A source system might contain variables such as countInfeed, countOutfeed, or rateActual, while the target OPC UA model defines nodes like ProcessedCount or MachineSpeed. For a human, the mapping may be straightforward in some cases and unclear in others. For AI, the task becomes a question of interpreting meaning from names, context, and limited metadata—exactly the kind of problem where semantic models can provide value.
This raises a natural question: could AI help make this process faster and more efficient?
Exploring an AI-Assisted Approach
Instead of aiming for full automation, the thesis focused on a more practical goal: supporting the mapping process with AI.
A prototype was developed that combines two complementary techniques. First, embedding-based similarity search is used to retrieve the most relevant candidate nodes from the target OPC UA information model. Then, a Large Language Model (LLM) evaluates these candidates and selects the most suitable match, or rejects them if no appropriate option is found.
From a technical perspective, the key challenge is that variable mapping is not just a string-matching problem. It requires interpreting semantics, context, and sometimes even implicit domain knowledge. Embedding models address this by transforming variable names and descriptions into vector representations, allowing semantically similar concepts to be identified even when naming differs. The LLM then adds a higher-level reasoning layer on top of this, evaluating which candidate best fits the intended meaning.
This approach can be seen as a form of retrieval-augmented decision-making, where AI does not work in isolation but is guided by structured domain knowledge. Rather than searching the entire model space, the LLM only evaluates a small set of relevant options, which improves both efficiency and reliability.
The overall workflow of the prototype is illustrated in the figure below.
The process remains semi-automatic: straightforward cases can be handled automatically, while uncertain cases are passed to manual review.
What Did We Learn?
To evaluate the approach, two different LLM configurations were tested: zero-shot and few-shot.
In zero-shot mode, the model receives no example mappings. This results in more cautious behavior: fewer automatic mappings are made, but the accuracy of those mappings is generally higher. A larger portion of the variables, however, must be handled manually.
In few-shot mode, the model is given example mappings as guidance. This significantly increases the level of automation, reducing the number of variables that require manual review. At the same time, the model becomes more decisive, which can occasionally lead to incorrect or less reliable mappings.
In practice, this creates a clear trade-off between automation and accuracy. More guidance leads to higher efficiency, but also introduces a higher risk of mistakes. This means that the optimal configuration depends on the use case and the acceptable balance between speed and reliability.
The Real Value: A Hybrid Approach
One of the most important findings of the study is that AI does not need to replace the expert to be useful. Instead, the most effective approach is a hybrid model where AI and humans work together.
In this setup, AI handles repetitive mapping tasks, obvious matches, and initial filtering of candidates. Human experts, on the other hand, focus on validating results, resolving ambiguous cases, and making context-dependent decisions.
This significantly reduces manual workload while maintaining reliability. Instead of spending time on straightforward mappings, engineers can concentrate on the cases that actually require expertise.
Additionally, the system can provide reasoning for its decisions. This makes the mapping process more transparent and helps users understand why a particular suggestion was made, which in turn speeds up manual review.
Where Could This Be Used in Practice?
AI-assisted variable mapping is particularly useful in scenarios where large amounts of heterogeneous data need to be standardized. Typical examples include:
- migrating legacy systems to OPC UA
- integrating equipment from multiple vendors
- harmonizing data across production lines
- preparing data for analytics, MES, or cloud platforms
In these situations, the mapping phase often becomes a bottleneck. Reducing the amount of manual work required can significantly shorten project timelines and lower implementation costs.
The Role of the Information Model
An important observation from the study is that the success of the mapping process does not depend only on AI, it also depends heavily on the quality of the target information model.
If the model contains overlapping or ambiguous nodes, mapping becomes more difficult for both humans and AI. This increases the number of uncertain cases and reduces the effectiveness of automation. On the other hand, clear structure, consistent naming, and well-defined concepts can significantly improve mapping quality.
It is also important to consider the quality of the source data. If variable names are unclear, inconsistent, or lack meaningful context, even advanced AI models struggle to produce reliable results.
In other words, AI can support the process, but it cannot compensate for poorly structured data.
So, Can AI Be Used for Variable Mapping?
The short answer is: yes, but not on its own.
AI-assisted mapping can significantly reduce manual work and improve efficiency, especially in large-scale systems. However, it does not eliminate the need for domain expertise. Certain cases – such as ambiguous semantics or multiple possible matches – still require human judgment.
The most practical solution today is a semi-automatic workflow, where AI acts as a powerful support tool rather than a fully autonomous system.
Looking Ahead
There are several opportunities to further improve this approach. Future work could focus on combining different AI methods more effectively, optimizing model configurations, and improving decision-making strategies. For example, in cases where similarity is already very high, it may be possible to skip the LLM step entirely and accept the mapping directly.
As AI technologies continue to evolve, their role in industrial data integration is likely to grow. While fully automated mapping may not yet be realistic, the results of this work suggest that AI can already provide meaningful benefits in real-world applications.
Final Thoughts
AI will not – at least yet – replace engineering expertise in industrial data modeling, but it can significantly change how the work is done.
Instead of manually mapping every variable, engineers can focus on validating and refining the results, as well as handling the most complex and critical cases. This shift from manual effort to assisted decision-making is where the real value lies.
Tuomas Kauppinen
Software Engineer