Using Large Language Models for Black-Box Testing of FMU-Based Simulations
This paper proposes a human-in-the-loop approach that leverages Large Language Models to automatically generate structured test scenarios and assertions for black-box testing of Functional Mock-up Units (FMUs), aiming to reduce manual effort and enhance result interpretability in dynamic simulation models.
Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer
Imagine you have a brand-new, high-tech engine for a ship, but it's locked inside a black box. You can't see the gears, the wires, or the code inside. You only have a manual that says, "This box takes in water and fuel, and it spits out heat and motion." Your job is to make sure this black box works perfectly without ever opening it. This is the challenge of testing FMUs (Functional Mock-up Units), which are standard digital models used by engineers to simulate complex systems.
The paper proposes a clever way to solve this using AI (Large Language Models) as a "creative assistant," but with a very important rule: a human expert must always be in the driver's seat.
Here is how their "Human-in-the-Loop" approach works, broken down into simple steps:
1. The Setup: Reading the Manual
First, the AI reads the "manual" (the technical specifications and data files) of the black box. It acts like a librarian, pulling out a list of what goes in (inputs like temperature or pressure) and what comes out (outputs like oil temperature or valve position).
- The Analogy: Think of this as the AI reading the ingredients list on a cake mix box to understand what it can do, without knowing the secret recipe inside.
2. The Brainstorming: Writing the "What If" Stories
Next, the AI is asked to imagine different test scenarios. It writes these in a simple story format called "Given-When-Then."
- Given: The engine is running normally.
- When: Suddenly, the ship hits a storm (a change in input).
- Then: The engine should stay cool and not overheat (the expected result).
- The Analogy: The AI is like a creative writer pitching plot ideas for a movie. It suggests, "What if the hero gets scared? What if it rains?" It generates many different "what if" stories to see how the system reacts.
3. The Reality Check: The Human Expert
This is the most critical part. The AI's "stories" are just ideas. A human expert (a domain specialist who knows how real engines work) reviews them.
- The Analogy: Imagine the AI is a junior chef suggesting wild recipes. The Head Chef (the human) tastes the idea and says, "No, we don't put chocolate in the soup," or "Yes, that spice mix sounds perfect." The human filters out the crazy ideas and keeps the realistic ones.
- Why this matters: The paper found that if you let the AI run wild without a human checking, it creates about 50% useless or wrong tests. With the human checking, the accuracy jumps to nearly 100%.
4. The Execution: Running the Simulation
Once the human approves the test ideas, the AI turns them into precise instructions (numbers, timing, and specific values). It then runs the simulation thousands of times, feeding the black box these inputs and watching the outputs.
- The Analogy: The AI is now the stage manager, setting up the lights and sound exactly as the Director (the human) approved, and running the play to see if the actors (the system) perform correctly.
5. The Verdict: Did it Pass?
The system checks if the results match the "Then" part of the story. Did the temperature stay within limits? Did the valve move the right way?
- The Analogy: It's like a referee blowing a whistle. If the engine overheats when it shouldn't, the test fails. If it behaves perfectly, the test passes.
The Secret Sauce: Two Different "Personalities" for the AI
The authors noticed that the AI needs to be in two different moods for this to work:
- Creative Mood (High Randomness): When brainstorming ideas, they tell the AI to be wild and diverse so it doesn't get stuck thinking of the same test over and over.
- Strict Mood (Low Randomness): When turning those ideas into actual numbers and running the tests, they tell the AI to be precise and boring, ensuring the math is exact.
The Results
They tested this on a Lube Oil Cooling System (a system that keeps a ship's engine oil from getting too hot).
- They compared their AI-assisted tests against tests created entirely by humans.
- The Finding: The AI-generated tests were just as good at finding "bugs" or potential failures as the human-made ones.
- The Catch: The AI is fast and can generate many ideas, but it needs the human to filter out the nonsense. Without the human, the AI makes mistakes. With the human, it becomes a powerful tool that saves time and effort.
In short: This paper shows that you can use AI to help engineers test complex, invisible computer models, but only if you treat the AI as a helpful intern who needs a senior manager to double-check its work. You don't replace the expert; you give them a super-fast assistant.
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.