Deterministic vs. LLM-Controlled Orchestration for COBOL-to-Python Modernization
This paper presents a controlled empirical study demonstrating that deterministic orchestration outperforms LLM-controlled agentic workflows in COBOL-to-Python modernization by achieving comparable translation accuracy while significantly improving robustness, reducing performance variability, and lowering operational costs by up to 3.5x.
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
For decades, the financial and government sectors have relied on massive, intricate computer programs written in a language called COBOL. These systems run the world's banking transactions and social security payments, yet the experts who built them are retiring, and the code itself is often decades old, poorly documented, and difficult to change. To keep these vital services running, organizations must translate this ancient code into modern languages like Python, a process that requires extreme precision because even a tiny error can cause a system to fail. Recently, a new type of artificial intelligence known as a large language model has emerged as a potential tool for this task. These models can read code and write new code, but they often work by acting like autonomous agents: they decide for themselves which steps to take, when to retry a task, and how to fix mistakes as they go. This raises a critical question for engineers: is it better to let the artificial intelligence drive the entire process, deciding every move in real time, or is it more effective to keep the process on a strict, pre-defined track where the computer follows a fixed set of rules?
A team of researchers at Bucknell University and Astrio set out to answer this question by conducting a controlled experiment to see how these two different approaches handle the difficult job of converting COBOL code into Python. They built a system called ATLAS to act as the translator, but they designed the experiment so that the only thing that changed between tests was who was in the driver's seat. In one version, the artificial intelligence was given full control, allowed to choose its own path, select its own tools, and decide when to stop or start over. In the other version, the same artificial intelligence was used to write the code, but a rigid, unchanging set of rules dictated exactly what steps to take, in what order, and how many times to try again if something went wrong. By keeping the brain of the system—the language model—exactly the same in both scenarios, the researchers could isolate the effect of the control method itself, stripping away all other variables to see which strategy truly worked better.
The results of this study revealed a clear trade-off between flexibility and reliability. When the artificial intelligence was allowed to control the process, it frequently managed to produce a working program, often succeeding in generating a result that could run without crashing. However, this success came with a hidden cost: the results were inconsistent. Because the model was making its own decisions about how to proceed, the same starting code could lead to very different outcomes on different tries, sometimes producing a perfect translation and other times failing in unpredictable ways. Furthermore, this "agentic" approach was incredibly expensive. The model would often wander down long, winding paths of reasoning, asking itself questions and trying multiple strategies that were not necessary, consuming vast amounts of computational resources. In some cases, the flexible approach used more than three times as many tokens—the basic units of information the model processes—as the fixed approach to achieve a similar result.
In contrast, the system that followed a fixed, deterministic path produced results that were far more stable and predictable. While the overall ability to translate the code was just as good as the flexible version, the rigid system rarely failed in the worst cases. It did not get lost in loops of unnecessary thinking, and it did not vary its behavior from one run to the next. Most importantly, it was significantly cheaper to run. By sticking to a strict schedule of steps and only using the artificial intelligence to write the code rather than to plan the journey, the system reduced the cost of translation by a factor of three to three and a half. The researchers found that for tasks like modernizing legacy software, where the steps are well-defined and the results can be checked against strict rules, letting the artificial intelligence drive the car was not only more expensive but also less reliable than having a human-designed map guide the way.
This study suggests that the future of using artificial intelligence in complex engineering tasks may not lie in giving the machines total freedom to decide how to work. Instead, the most effective approach appears to be embedding these powerful models within a structured framework where the rules of engagement are fixed and the path is clear. The artificial intelligence remains the expert writer, capable of understanding complex instructions and generating new code, but the orchestration of the work—the planning, the timing, and the safety checks—remains under strict, deterministic control. This ensures that the process is not only capable of producing high-quality results but also remains robust, predictable, and economically viable for the large-scale, critical systems that keep our modern world running.
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.