Manuscript Offprint

arXiv:2610.13479

A Local Agentic AI Framework to Generate Edge Case Scenarios for Safety Assurance

Victoria J. Hodge, Colin Paterson, Rob Alexander

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Generating edge case scenarios is crucial for training, testing and safety assuring autonomous systems. This identifies hazardous failures to increase system reliability and robustness, ensures the system can still function safely on the boundaries of its operational design domain and learns the expected system behaviour for these edge cases. The rapid advancement in the generation and analysis capabilities of language models (LMs) has expanded their applicability and recent work has investigated LM scenario generation. However, many recent approaches rely on human-in-the-loop or rule-based strategies. This restricts the LM's ability to generate diverse and edge case scenarios; the long tail of the distribution. Our work uses local LMs in a laptop-based agentic AI framework for adaptive scenario generation. This is cheap, fully-controlled, ensures data privacy and security. It uses think, act, observe, update, and continue loops with lightweight JSON encoding to generate scenarios. We use the system requirements, system description and environment description as knowledge bases in contextual prompts for an LM to ensure scenario realism. A second, independent LM critiques each scenario using domain specific criteria so it can be refined. The refined scenarios are run in simulation and evaluation metrics collected. These metric scores are analysed and similar scenarios are created for edge cases (exploitation) or novel scenarios are generated to explore the scenario space. Post-hoc clustering using metric scores and thematic-type analysis of the rich-text scenario descriptions produced by the LM pinpoints functional gaps and their triggering conditions. This creates traceable evidence for the safety assurance case. Our work highlights the potential of a flexible and adaptive local agentic AI framework for automating edge case generation and producing traceable safety assurance evidence.

Keywords: Agentic AI, Closed Loop, Edge Case, Local Agentic AI, Safety Assurance, Scenario Generation, Simulation

1. Introduction

The impact of recent innovations in AI systems has changed how businesses and even economies function and changed how people interact with their environment. The emergence of AI-based autonomous systems is a major part of this innovation. An autonomous system is: “a system involving software applications, machines, and people, that is able to take actions with little or no human supervision” 1^{1}. These systems have the potential to revolutionise daily life and their use is expanding rapidly, in particular in safety-critical domains. Safety-critical domains include autonomous road vehicles; medical, assistive, manufacturing and delivery robots; aerial vehicles; marine vehicles; underwater vehicles; wireless sensor networks used for monitoring; and components within systems such as an autopilot system in an aircraft [1].

The development of autonomous systems that operate in safety-critical domains remains complex. Failures in such systems can cause harm to the environment, harm to people, or substantial economic loss [2][2]. As systems become more autonomous, the level of human oversight decreases [3][3]. Replacing humans with AI in these systems means that

∗^{*}Corresponding author

Email addresses: victoria.hodge@york.ac.uk (Victoria J. Hodge), colin.paterson@york.ac.uk (Colin Paterson), rob.alexander@york.ac.uk (Rob Alexander)

1^{1}https://tas.ac.uk/our-definitions/ (accessed 27 Sept 2026) we can no longer rely on a suitably qualified human to respond to unusual situations in a safe manner. Instead, we are required to argue that, throughout its operational lifetime, the system will, autonomously, meet operational, safety, and regulatory standards under all anticipated operating conditions. However, such safety assurance requires rigorous and often expensive through-life safety assurance processes to ensure safety standards and regulations are met, and that the system is free from unacceptable risks. Autonomous systems that operate in open-world environments shift the focus of safe development and operation from guaranteeing against known operational parameters to effectively anticipating and mitigating novel inputs, unexpected situations and uncertainty. Furthermore, the system's operational environment may be underspecified at design time [3], or even unknown, which further increases the likelihood of unknown and unsafe scenarios. Arguing that the system is free from unacceptable risk is a complex and multifaceted process.

References (39)