Study on Quantitative Modeling of Task Completion Probability in AI Agents Using DAG and State-Machine
This study proposes a quantitative reliability model for AI agent workflows using DAGs and state machines to predict task completion probabilities, demonstrating through theoretical derivation and simulations that strategic path redundancy significantly improves success rates over linear approaches, particularly at bottleneck stages.
Original paper licensed under CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the author. For technical accuracy, refer to the original paper. Read full disclaimer
In the rapidly evolving world of artificial intelligence, a new generation of software agents has emerged, capable of breaking down complex human instructions into lists of smaller tasks. These digital workers can write code, summarize articles, or search for information, but they often stumble when a task goes wrong. Traditional methods for organizing these agents rely on simple, linear lists: step one, then step two, then step three. If step two fails, the entire process usually collapses, much like a chain breaking at its weakest link. To handle more difficult jobs, engineers have begun using more flexible structures that allow for branching paths and parallel work, letting the agent try a different route if the first one fails. However, until now, there has been no reliable way to calculate exactly how much more likely an agent is to succeed when given these extra options, or to know where adding a backup plan would actually help the most.
A recent study by Akira Otsuki at Nihon University addresses this gap by applying the mathematical principles of reliability engineering to the behavior of AI agents. The researcher treated the agent's workflow not just as a sequence of commands, but as a network of possibilities where success depends on the probability of each individual step. By combining a directed acyclic graph—a structure that maps out dependencies without creating loops—with a state machine that tracks the progress of every task, the study created a model to predict the likelihood of a goal being reached. The core idea is simple: if a primary path fails, a redundant alternative path can save the mission, but only if that alternative is actually available and effective. The study tested this model using millions of computer simulations and a real-world agent running on a local computer, aiming to determine if these theoretical predictions hold up in practice.
The results show that adding a backup path significantly boosts the chances of success, but the benefit depends entirely on where that backup is placed. In a standard linear workflow, the overall success rate drops dramatically as the number of steps increases, because the agent must succeed at every single step to finish the job. For instance, if an agent has to complete five steps and each step has an 80 percent chance of success, the likelihood of finishing the whole task without error falls to about 33 percent. However, when the researcher introduced a redundant path—an alternative way to complete a specific step—the overall success rate jumped to nearly 60 percent for the same five-step task. This improvement happens because the model mathematically accounts for the "rescue" provided by the alternative path, effectively filtering out the risk of failure at that specific stage.
Crucially, the study found that not all backup plans are created equal. Adding a redundant path to a step that is already highly reliable yields very little improvement, whereas adding it to a weak or "bottleneck" step provides a massive boost. In one simulation, placing a backup option on the least reliable stage of a workflow improved the total success rate by nearly four times more than placing it on the most reliable stage. This finding offers a clear rule for designing better AI systems: if you have limited resources to add backup plans, you should focus them on the parts of the process that are most likely to fail. The researchers confirmed this through extensive testing, running 100,000 simulated trials for various combinations of success rates. In every case, the mathematical predictions matched the simulated outcomes with a margin of error so small it was barely noticeable, proving that the model accurately reflects how these systems behave when task outcomes are independent.
The study also examined how these agents perform when failures are not random but persistent, such as when a website is down for everyone. In these scenarios, simply retrying the same failed task does not help much, but switching to a completely different source does. The model showed that an alternative path is most valuable when the primary route is prone to consistent failure, while retries are better suited for random, temporary glitches. Furthermore, the researchers tested the theory with a real AI agent running on a local machine, tasked with finding and summarizing economic news. The agent was run 100 times, and the researchers used the first half of the results to estimate the success rates of each step. When they used these estimates to predict the outcome of the second half of the runs, the predictions fell squarely within the range of what actually happened. The agent using the flexible, redundant workflow succeeded in 62 percent of the cases, compared to only 16 percent for a rigid, linear version of the same agent.
While the model is powerful, the researchers are careful to note its boundaries. The calculations assume that the success or failure of one path does not influence the other; if both the main path and the backup path rely on the same underlying service, they might fail together, reducing the benefit of the backup. The study suggests that for the most complex real-world applications, engineers must account for these shared risks. Additionally, the current validation is limited to specific tasks and a single type of AI model. Despite these limitations, the work provides a solid mathematical foundation for understanding how to build more resilient AI systems. It moves beyond simply making agents that can follow instructions to creating agents that can be designed with a known, calculable probability of success, allowing developers to make informed decisions about where to invest effort to make their systems more robust.
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.