[Latest Google Cloud Case Study] What is "Knowledge Fabric," Siemens' Challenge to AI-Modernize Massive Legacy Code?
Industrial software that supports factories, energy grids, and transportation infrastructure is extremely large and complex. Maintaining hundreds of millions of lines of "legacy code" developed over more than a decade, or migrating it to modern environments, is a headache for many engineers.

What is "Knowledge Fabric," Siemens' Challenge to AI-Modernize Massive Legacy Code?
To address this difficult challenge that standard AI code assistants cannot handle, Siemens and Google Cloud have jointly developed an AI system called "Knowledge Fabric."
We will unravel why this system is groundbreaking, as well as its mechanisms and approach.
1. The "Four Walls" That Standard AI (RAG) Cannot Solve
Modernizing large-scale industrial software is often compared to "repairing a plane while it's flying." The challenges Siemens faced spanned the following four dimensions:
Scale: The codebase is so massive that it far exceeds the context window (the amount that can be read at once) of typical LLMs.
Fragmentation: The necessary knowledge is scattered not only across code but also in Jira tickets, Confluence, and even scanned PDF manuals from the early 2000s.
Complexity: It is extremely difficult to track which requirements from a design document from ten years ago a single line of code corresponds to.
Responsibility: Industrial systems must meet strict quality and compliance standards for 15 to 20 years. AI "hallucinations" or unverified changes are not permitted.
Technical lead Agata Gołębiowska points out that "code is not just text." Because there is a "structure and relationship" of classes, files, and modules, standard RAG (Retrieval-Augmented Generation) that simply flattens and stores these in a vector database was insufficient.
2. The Solution: "Knowledge Fabric" That Understands Structure
To solve this problem, the team built a domain-specific knowledge graph that models the "relationships" between code and documents. "Spanner Graph" was adopted as the foundation.
Knowledge Fabric achieves high-precision search by combining the following three methods:
Graph Query (GQL): Accurately traverses the structure and dependencies of the code.
Vector Search (ANN): Generates embeddings for each node and searches for semantic similarity.
Full-text search: Performs pinpoint extraction using keywords.
By combining these, for example, when faced with a complex question like "If I change the logic of the axis control panel, which functions need to be updated?", the AI agent can explore the graph, identify dependencies and related documents, and present an accurate impact analysis.

3. Multi-agent workflow to "cut the elephant into pieces"
One of the key insights gained from this project is that "AI agents are not good at large, ambiguous tasks." AI does not function with vague instructions like "refactor this module."
Therefore, the team adopted a design pattern called "Slicing the elephant," where tasks are broken down into small pieces and processed by specialized agents.
The specialized agents built with the Google Agent Development Kit (ADK) collaborate as follows:
Search Agent: Deeply investigates code graphs and documentation.
User Story Agent: Creates stories that meet requirements based on interviews with product owners.
Architecture Impact Analysis Agent: Predicts side effects of changes before writing code.
Task Decomposition Agent: Breaks down work into small, contextualized tasks based on impact analysis.
Coding Agent: Performs the actual implementation only after the tasks have been broken down into specific ones.
Point: Human in the Loop
By having humans (engineers) intervene and review every step, we ensure the reliability required to meet industrial standards. Avoiding jumping straight to the coding agent without prior context understanding and analysis is the key to producing practical code.
4. Results of pilot operations and future development
In a pilot test for migrating a legacy control panel to a modern web-based interface, Knowledge Fabric significantly reduced overall coding effort.
Dependency analysis, which previously took senior engineers several days to decipher from the codebase and past documentation, is now completed in a short time. This has freed engineers from routine work, allowing them to focus on higher value-added customer innovation.
Summary: Tips for using generative AI in practice
This Siemens case study demonstrates an advanced form of practical application: not just using generative AI as a "boilerplate code writing tool," but "having it understand the structure of a massive system and breaking it down into autonomous workflows (agents) to solve."
Whether in large-scale environments or our daily development and infrastructure construction, the concept of "structuring tasks and breaking them down into specialized roles" is a very powerful hint for how we can utilize AI.
いいなと思ったら応援しよう!
忍の知恵と技術への「お布施(チップ)」を賜りたく存じます。頂いた財は、持続可能な社会、子供たち、自然、そしてあなたへの還元(有益な発信・開発)に全額投資いたします。画面下のボタンより、影の立役者たる拙者への御調達をお願い申す。一期一会の御縁に、深き感謝を。