Skip to content

TL;DR Safety cases are widely used to demonstrate that mission-critical systems, such as autonomous vehicles and unmanned aerial systems, can operate safely after deployment. However, manually constructing safety cases is complex, time-consuming, and labor-intensive, which calls for the proposal of...

Authors: Gerhard Yu (Alex), Amanuel Aknaw (Alex), Amir Ali Mohaghegh (Alex) et al.

Published: 2026-11-18

Categories: cs.SE, cs.MA

arXiv: 2611.21618

License: cc-by-nc-nd-4.0

PDF: download · download markdown

:material-format-quote: Cite this paper

@misc{arxiv_2611_21618,
  title        = {The Defense Rests: A Courtroom-Inspired Multi-Agent LLM Framework for Automated Safety Case Generation},
  author       = {Gerhard Yu (Alex) and Amanuel Aknaw (Alex) and Amir Ali Mohaghegh (Alex) and Yong Song (Alex) and Cao and Alvine B. Belle},
  year         = {2026},
  eprint       = {2611.21618},
  archivePrefix = {arXiv},
  url          = {https://arxiv.org/abs/2611.21618}
}

The Defense Rests: A Courtroom-Inspired Multi-Agent LLM Framework for Automated Safety Case Generation

Gerhard Yu, Amanuel Aknaw, Amir Ali Mohaghegh, Yong Song (Alex) Cao, Alvine B. Belle

Lassonde School of Engineering at York University 4700 Keele St, North York, ON M3J 1P3 Toronto, Canada [email protected], [email protected], [email protected], [email protected], [email protected]

Abstract

Safety cases are widely used to demonstrate that missioncritical systems, such as autonomous vehicles and unmanned aerial systems, can operate safely after deployment. However, manually constructing safety cases is complex, timeconsuming, and labor-intensive, which calls for the proposal of automated approaches to support their creation. Inspired by the legal nature of safety case construction, we formalize the safety case creation problem through a courtroom analogy, where stakeholders collaboratively propose, examine, criticize, review, improve and validate safety claims and their supporting evidence. In this analogy, the safety analyst acts as a prosecutor by identifying hazards and safety concerns, while the assurance case developer serves as a defense attorney by constructing and substantiating safety arguments. An orchestrator acts as a judge by coordinating stakeholder interactions, and a review board serves as a jury by assessing argument completeness and persuasiveness. Based on this formalization, we propose eTrustWare, a Large Language Model (LLM)-based multi-agent framework for automated safety case generation and review. Our experiments on several safety cases of ML-enabled autonomous driving systems demonstrate the feasibility of coordinated LLM-based agents for generating safety cases.

Introduction

Mission-critical systems are systems whose failure can have significant consequences for human safety, financial loss, or the environment (Viger et al. 2026; Yu et al. 2026b; Sivakumar et al. 2024b). Examples include autonomous vehicles, aircraft, medical devices, and critical infrastructure. Assuring their non-functional requirements, such as safety, security, and reliability, is therefore crucial, as these systems' failures can result in severe consequences (Ballingall, Sarvi, and Sweatman 2025; Finnegan and McCaffery 2014).

Assurance cases are structured, evidence-based arguments used to demonstrate that a system satisfies a specific property within a defined environment (Kelly 2007; Maksimov, Kokaly, and Chechik 2019; Meng et al. 2025). They consist of claims supported by reasoning, evidence, and explicit system boundaries (Annable et al. 2025; Koopman 2023). Assurance cases help organizations identify and ad-

Copyright © 2026, Association for the Advancement of Artificial Intelligence (www.aaai.org). All rights reserved.

dress risks, demonstrate compliance with regulatory requirements, and communicate confidence in system dependability (Koopman 2023; Meng et al. 2025).

Existing research has investigated the creation, generation, review, evaluation, formalization, and criticism of assurance cases using AI and large language models (LLMs) (Fujiwara et al. 2025; Odu et al. 2025a; Ahlbrecht, Sprockhoff, and Durak 2025; Viger et al. 2024; Yu et al. 2026b; Viger et al. 2026). However, to the best of our knowledge, only (Ikhwantri et al. 2026) has explored Agentic AI for automated assurance-case generation. This limited adoption of Agentic AI constrains the development of efficient, scalable, and intelligent system assurance practices.

Safety cases are a specific form of assurance case focused on system safety (Sivakumar et al. 2024a). Inspired by the courtroom analogy (Weinstock and Goodenough 2009; Widyasari et al. 2026), we propose eTrustWare, a multi-agent LLM-based framework for automated safetycase generation and review. The framework assigns specialized agents roles analogous to courtroom stakeholders: safety analysts identify hazards, assurance-case developers construct arguments and evidence, an orchestrator plays the role of a judge by coordinating interactions, and a review board evaluates the resulting arguments. Preliminary experiments indicate that eTrustWare can generate good safety case drafts that can then be manually refined by experts.

The novelty of our approach lies in combining semiautomated GSN-compliant safety case generation, revision, and scoring, while incorporating human experts' inputs (e.g., safety case patterns) and supporting alignment with industry standards and regulations to better foster the safety of the ML-enabled safety-critical systems under analysis.

Our contributions are four-fold:

  • We introduce a courtroom-inspired agentic AI approach for the semi-automatic generation of safety cases.
  • We rely on a dialectic process to iteratively strengthen the generated arguments by supporting their constructive criticism and logical dispute, and by refining them accordingly.
  • We implement our approach as eTrustWare, a tool that supports the generation, revision, scoring, and conversion of generated safety cases from structured prose to GSN.

• We evaluate the approach using six safety cases, leveraging various prompting strategies, LLMs, and safety case patterns.

Assurance Cases, Patterns, and Their Notations

Assurance cases are a well-established structured technique used to document a reasoned, auditable argument supporting that a system meets specific non-functional requirements, such as safety, security and reliability (Denney and Pai 2026; Carlan, Beyene, and Ruess 2016). Assurance cases are struc- ˆ tured as a hierarchy of claims, with lower-level claims drawing on concrete evidence and serving as evidence to justify claims higher in the hierarchy (Carlan and Gallina 2020; Kelly 2007). Assurance cases are becoming very popular and are usually used to argue the safety of systems in domains such as automotive, healthcare and aerospace (Buysse et al. 2025; Carlan, Beyene, and Ruess 2016; Sivakumar ˆ et al. 2024a; Maksimov, Kokaly, and Chechik 2019).

Different assurance cases address different non-functional requirements (de La Vara et al. 2023; Finnegan and Mc-Caffery 2014). This work focuses on safety cases, which demonstrate that systems are acceptably safe for intended operations and are particularly important for mission-critical systems where failures may cause significant harm (Borg et al. 2023; Gauerhof et al. 2020; Buysse et al. 2025).

Several notations allow representing assurance cases. This work focuses on the very popular GSN (Goal Structuring Notation) and GSN-compliant structured prose, which clearly represent assurance relationships for both humans and machines (Maksimov, Kokaly, and Chechik 2019; Odu et al. 2025b).

Assurance case patterns provide reusable structures for constructing arguments by capturing recurring relationships among claims, assumptions, contexts, and evidence (Carlan and Gallina 2020; Finnegan and McCaffery 2014). When used to create assurance cases, they improve their quality.

LLMs (Large Language Models) and Agentic AI

As Hou et al. (2024) explain, LLMs are AI models trained on massive textual datasets and able to understand and generate human language, learning linguistic patterns, semantics, and context. They support reasoning, decision-making, and automation across applications such as generation, retrieval, coding, testing, and documentation. Their reliance of various prompting strategies, including zero-shot, few-shot, and chain-of-thought usually improve the quality of their outputs (Mohajer et al. 2024; Odu et al. 2025a; Yu et al. 2026b).

LLM-based agents are (semi-)autonomous systems that use LLMs as their central reasoning component to perceive their environment, make decisions, and execute actions (He, Treude, and Lo 2025). LLM-based agents yield several benefits when it comes to the automation of software engineering tasks: they can autonomously plan and execute multistep workflows, interact with development tools, generate and modify code, detect and fix defects, and assist with testing and documentation (He, Treude, and Lo 2025; Zeng et al. 2026). This agentic capability enables LLMs to move beyond isolated task completion toward more autonomous and context-aware software engineering processes (Zeng et al. 2026).

There is a rich body of work on LLM-based system assurance (e.g., (Diemert et al. 2025; Herd et al. 2026; Ghahremani, Joyce, and Lechner 2024; Muram and Javed 2023; Fujiwara et al. 2025; Odu et al. 2025a; Mohamad et al. 2023; Buysse et al. 2025; Viger et al. 2024; Gohar et al. 2024; Yu et al. 2026b; Sivakumar et al. 2024b; Di Sandro et al. 2024; Odu et al. 2025b; Viger et al. 2026, 2023; Murugesan et al. 2024; Shahandashti et al. 2024)). Belle and Yu (2025) surveyed some of them. LLM-based system assurance approaches focus on various activities including assurance case creation (e.g., (Odu et al. 2025a; Sivakumar et al. 2024a)), defeater identification (e.g., (Shahandashti et al. 2024; Viger et al. 2024; Gohar et al. 2024; Viger et al. 2026)), assurance case review (e.g., (Yu et al. 2026b)), verification, formalization, semantic analysis, and assessment. However, most approaches focus on assurance case creation and defeater identification. Our focus is on assurance case creation, and more specifically on the semi-automatic safety case creation.

Existing LLM-based assurance case approaches usually rely on models from the GPT series to generate assurance cases complying with notations such as GSN, EA (Eliminative Argumentation), CAE (Claim-Argument-Evidence), or logical programming. For instance, Sivakumar et al. (2024b) used GPT-4 to generate safety cases, while Odu et al. (2025a) used GPT-4 Turbo and GPT-4o to generate assurance cases from predicate-based assurance case patterns. This approach was implemented as a tool called Smart-GSN (Odu et al. 2025b) and applied to the automotive sector (Odu, Belle, and Wang 2025). Likewise, Fujiwara et al. (2025) proposed a GPT-based approach for generating assurance cases and mitigations for AI-system threats. These approaches often employ prompting strategies such as zeroshot, one-shot, role-based prompting, and Chain-of-Thought when generating assurance cases. However, hallucinations, non-deterministic outputs, limited explainability, and insufficient real-world validation often constrain the reliability and practical applicability of these approaches.

To the best of our knowledge, only one approach combines RAG (Retrieval-Augmented Generation) and agentic AI for assurance case generation. More specifically, Ikhwantri et al. (2026) proposed an Agentic RAG framework that represents assurance cases using CAE and grounds arguments in organisation-specific technical documentation retrieved from controlled local repositories. In our work, we also use Agentic RAG, but differently from Ikhwantri et al., we introduce a multi-agent, courtroominspired framework in which prosecutor, defense attorney, judge, and jury agents collaboratively construct, challenge, validate, and review safety claims and evidence. This enables reliance on a dialectic process (Goal Structuring Notation Standard Working Group 2021) that promotes evidencegrounded generation alongside independent critical review within a unified framework.

Proposal of eTrustware: A Courtroom-Inspired Multi-Agent LLM Framework for Automated Safety Case Generation

Proposed Approach: Mapping the Courtroom Analogy to the Generation/Review of Safety Cases

To address the complexities of automated reasoning and the limitations of single-agent systems, Widyasari et al. (2026) recently proposed an approach that adapts a multiagent, courtroom-inspired framework to perform automated source-code vulnerability detection, where role-specific agents debated potential security risks with each other before a judge agent delivers a final classification and explanation. Their results show that their courtroom-inspired multiagent approach outperforms both the single-agent and traditional multi-agent baselines.

Conventional automated systems rely on one LLM, limiting perspective diversity and increasing hallucinations, overconfidence, and errors, which can compromise safety arguments in mission-critical systems. These limitations become particularly significant when reasoning about missioncritical systems, where an incorrect assumption or unsupported claim can undermine the validity of the resulting safety argument.

The courtroom analogy allows us to address these challenges by distributing the safety case creation and review tasks across multiple distinct role-specific agents. By mimicking a legal trial, we define a new framework called eTrust-Ware that enforces a structured, adversarial discussion. The four distinct courtroom-inspired roles it supports are mainly: The Prosecutor, the Defense Attorney, the Judge, and the Jury. The prosecutor is responsible for investigating the evidence, establishing the facts, and building a case against the system. The defense attorney is tasked with advocating for integrity in the system, typically by countering the prosecutor's claims. There are some cases where a certain safety case flaw is valid; in such cases, the defense attorney has to acknowledge the issue and propose mitigation strategies. The judge is responsible for upholding fairness in the courtroom. This agent must filter out bias and act in an objective manner. The jury is responsible for weighing all evidence and helps with the delivery of the final verdict. This structured process could help reduce wrongful conclusions and force a deeper and more iterative analysis in complex and/or debatable argumentation structures.

In the safety case domain, this analogy is highly applicable, because safety cases are fundamentally structured arguments in which claims must be justified through supporting evidence and reasoning. Similar to a legal case, the strengths of a safety cases depends not only on the evidence presented, but also if that evidence adequately supports the claims and whether the reasoning connecting them is sound and complete. Thus, the courtroom creates a natural mechanism for examining the validity of these arguments from multiple perspectives. By having one role construct and defend the claim, and another challenge its claims, unsupported evidence, assumptions, and potential weaknesses, the approach can help expose deficiencies that may be overlooked by a single agent.

We have adapted the mock-court approach utilizing the philosophy it conveys. More specifically, our Defense agent is responsible for generating the initial safety case utilizing safety case patterns. The Prosecutor agent critically examines the generated cases by identifying unsupported claims, insufficient evidence, inconsistencies, and other potential weaknesses. The Defense agent is then responsible for responding to this feedback, whether it is to justify, address the limitations, or refine the argument. The Jury agent evaluates the argument on four different review criteria that are recommended by the GSN standard (Goal Structuring Notation Standard Working Group 2021): argument comprehension, expressive sufficiency, well-formedness, and resistance to argument criticism and defeat. These four criteria are scored on a scale of 1-5, and the total score alongside the average is weighted to decide if the case goes back to the Defense agent or the jury. If the stores have met the standard, the Judge agent is then responsible for doing a final evaluation of the generated safety case. Through this adaptation, the courtroom analogy provides a structured workflow where safety cases are generated, revised, and evaluated across multiple perspectives, addressing the previous limitations of a single-agent system. Figure 1 illustrates this workflow.

Figure 1: eTrustWare agentic workflow

Description of the Features of eTrustWare

eTrustWare is meant to support the semi-automatic generation of safety cases. So, it aims at automatically generating safety cases that can then be manually refined by human experts (e.g., safety case developers).

eTrustWare is also designed to support various nonfunctional requirements. More specifically, it aims to be secure, scalable, web-accessible, and maintainable. To support these requirements, eTrustWare adopts a modular, tiered architecture that separates its React-based user interface, FastAPI backend, LLM-based agents, knowledge-retrieval capabilities through RAG, and a Google Firebase persistence tier. Authentication, authorization, and database access rules protect system and user data, while cloud-based storage and retrieval services help with scalability. The webbased interface allows for remote access, and the microservice architecture aids in maintenance, testing, debugging, and future additions.

Description of the Architecture of eTrustWare

The architecture of eTrustWare consists of four tiers:

The Presentation Tier: It is the tier that is responsible for displaying the data received from the other tiers and allowing users to interact witheTrustWare features, such as authentication, creating and editing new assurance cases using GSN diagrams and structured prose, and exporting assurance cases. Furthermore, this tier sends requests to the other tiers to generate assurance cases and persist user data.

The Logic (agentic) Tier: This is the tier where the various agents collaborate to generate safety cases in structured prose based on the provided prompts.

Knowledge Tier: It retrieves relevant safety standards and regulations for evidence-based reviews.

Persistence Tier: This tier stores safety case versions, agent interactions, scores, and audit trails.

eTrustWare is built atop SmartGSN (Odu et al. 2025a) and adapts some of its publicly available prompts to generate safety cases. SmartGSN is an LLM-based tool allowing to semi-automatically create assurance cases from assurance case patterns supplied in the prompts of its LLMs. Unlike SmartGSN, eTrustWare uses an agentic RAG approach based on the courtroom analogy. Thanks to that analogy and unlike existing work (e.g., (Ikhwantri et al. 2026)), eTrust-Ware is able to use a dialectic approach (Goal Structuring Notation Standard Working Group 2021) to review and criticize the safety case it generates, and to iteratively propose improvements to refine it.

Description of the RAG Pipeline

To implement our RAG pipeline, we used the best practices recommended in the literature (e.g., (Lewis et al. 2020; Brown, Roman, and Devereux 2025)). More specifically, we implemented a conventional (na¨ıve) RAG approach based on dense vector similarity retrieval. Our RAG corpus consists of safety and assurance standards, more specifically AMLASv1.1 (Hawkins et al. 2021) and UL4600 (Koopman 2023). We selected these documents because they provide domain-specific guidance relevant to the assurance of autonomous driving systems. The documents are processed by extracting their text and dividing it into chunks of 800 characters with a 100-character overlap. Each chunk is then converted into vectors using OpenAI's text-embedding-3-small model and stored in a Pinecone vector database using cosine similarity.

The RAG pipeline is integrated into the Prosecutor and Judge agents, which main purpose includes reviewing the generated assurance case. When these agents require additional safety-assurance knowledge, their queries are used to retrieve the two most semantically relevant chunks from the standards corpus. By grounding the critical agents in relevant standards-based information, the RAG pipeline provides domain-specific knowledge that strengthens the review process and supports the generation of well-founded safety case arguments.

Implementation of eTrustWare

Presentation Tier Implementation

This tier consists of a single webpage with multiple tabs to allow for coherent navigation. We implemented this tier with React, TypeScript, Tailwind CSS, ReactFlow, and Shadcn as a component library to provide users with an interactive interface to log in and sign up, along with accessing the core features. Users can automatically generate a new safety case, edit it, and save it. Additionally, this tier allows users to create a manual GSN diagram from scratch or generate one from the one automatically created.

FastAPI Gateway Implementation

The gateway provides a communication interface between the presentation tier and the underlying eTrustware components. We implemented this tier using FastAPI, with Uvicorn serving as the application server to handle incoming HTTP requests. The gateway contains endpoints where users could send and receive requests allowing them to generate assurance cases and interact with the system, forwarding requests to the logic tier and return results back to the presentation tier. This tier provides a consistence interface between the presentation tier and the logic, knowledge, and data tier while keeping their internal implementations of these components separated from the client.

Logic Tier (agentic tier) Implementation

The logic tier implements eTrustware's courtroom inspired multi agent architecture using a collection of specialized agents. The tier consists of the Defense agent, Prosecutor agent, Jury agent, and Judge agent, with each agent performing a distinct role in the safety case generation and evaluation process. The Prosecutor and Judge agents are additionally connected to the knowledge tier to retrieve relevant information from safety-assurance standards during critical evaluation, while the resulting agent outputs and execution information are passed through the persistence mechanisms as required.

The Knowledge Tier Implementation

The knowledge tier provides the agents with access to domain-specific safety assurance knowledge through the integrated RAG infrastructure described earlier. The Prosecutor and Judge agents interact with this tier when standardsbased information is required during their evaluation process, allowing relevant knowledge from the corpus to be incorporated and to help justify their reasoning.

Data Tier (persistence tier) Implementation

The data tier is implemented using Firebase Firestore to provide persistent storage for eTrustware's data. Firestore's document based structure is used to organize and persist information associated with users, safety cases, generated content, graph nodes, and other data required throughout the system's workflow. The logic tier interacts with Firestore to store and retrieve this information as required, allowing generated safety cases and related data to remain available across sessions and keeping data management separated from the rest of the system.

Setup of the Preliminary Assessment Research Questions

Our experiments investigated three research questions (RQs):

RQ1: Which LLM is the best suited to serve as the core reasoning engine for the eTrustWare multi-agent framework?

RQ2: What is the impact of supplying patterns in the prompts of eTrustWare when generating safety cases?

RQ3: What is the impact of prompting strategies on the quality of the safety cases generated by the eTrustWare?

Description of the Preliminary Experiments

To answer our research questions, we performed the following six experiments. 1) The Zero-shot (ZS-Exp) experiment provides only a brief prompt describing the topic and the relevant tool or technology, without examples, patterns, or additional guidance; 2) the Zero-shot + CoT (ZS-CoT-Exp) adds step-by-step instructions that specify goal order, claim structure, conditions, connections, strategies, domains, and solutions for each subgoal; 3) the Zero-shot + CoT + Patterns (ZS-CoT-Pat-Exp) further adds casespecific design patterns with stricter guidance on the number of goals and solutions, decorators, and system context; 4) The One-shot (OS-Exp) experiment adds a high-quality input-output example involving similar technology or the same project; 5) the One-shot + CoT (OS-CoT-Exp) combines this example with the CoT instructions and structural guidance; and 6) the One-shot + CoT + Patterns (OS-CoT-Pat-Exp) combines all previous elements with unique, stricter design patterns that guide goals, solutions, decorators, and system-specific context.

Note that when running a given experiment using a given LLM as the inference mechanism of eTrustWare, the latter generates a safety case in structured prose. When needed, we then manually clean this safety case to remove hallucinated symbols. We then use eTrustWare to automatically convert the resulting safety case into a graphical format, i.e., into a GSN diagram.

Dataset Description and Representation in GSN and Structured Prose

In our experiments, we use a dataset consisting of six GSNcompliant safety cases and the patterns used to manually create them. Table 1 describes the characteristics of these safety cases and the associated patterns. Although all six safety cases focus on ML-enabled autonomous driving systems, they cover many different safety-related scenarios, including trajectory prediction, collision avoidance, naturallanguage instruction controls, pedestrian automatic braking, automated valet parking, and self-adapting abilities during runtime.

As ground truths, we used these six manually created safety cases represented as textual prose. These safety cases are publicly available in the following references (Odu, Belle, and Wang 2025; Sivakumar et al. 2024a; Yu et al. 2026a; Borg et al. 2023; Sorokin et al. 2024; Nearchou et al. 2023).

For our one-shot experiments, we used the manually authored safety case for the continuous validation of a Level 4 automated shuttle bus under ISO guidelines (Kodama et al. 2024) as the one-shot example. In the One-shot + CoT + patterns experiment, the formalized pattern used to manually create this safety case was also supplied as part of the one-shot example.

Description of the LLMs and their Settings

eTrustWare uses an LLM to support the inference mechanism of its various agents. This LLM allows these agents to make automated decisions. In our experiments, we tried different LLMs on eTrustWare to decide which of these LLMs is the best to support decision-making in this agentic system. The LLMs we used in our experiments are the following: GPT-5.5, Claude Fable-5, and DeepSeek-v4-Pro. The temperature of the LLMs was set at 0.2. This relatively low temperature allowed for reduced variability in the generated responses and promoted more consistent and reproducible decision-making across experimental runs. Table 2 describes the characteristics of these LLMs.

Description of eTrustWare Settings

As shown in figure 1, eTrustWare evaluates the safety cases it generates by relying on four review criteria: expressive sufficiency, well-formedness, argument comprehension, and resistance to criticism and defeat. The Jury agent scores each criterion on a discrete 1–5 scale, where 1 represents the best and 5 the worst outcome. Decimal scores are avoided because finer-grained scoring provides limited benefit while potentially increasing execution and iteration times. The four scores are averaged and considered alongside the individual criterion scores when applying the acceptance gate. The gate requires every criterion to achieve a score of at most µ, currently set to 2. Safety cases meeting this threshold proceed to the Judge agent, which delivers the result to the user. Cases failing any criterion are returned to the Prosecutor agent for criticism and subsequently to the Defense agent for revision. The process currently permits three iterations before force-quitting. Manual evaluation against ground truth demonstrated that µ = 2 produced the best results.

Description of the Assessment Metrics

In accordance with the literature (Odu et al. 2025a; Sivakumar et al. 2024b), to assess our experimental results, we relied on the following metrics that allow us to evaluate the structural and semantic correctness of the safety cases eTrustWare generated:

• Tree Edit Distance (TED): TED measures structural differences between generated and ground-truth safety cases. To compute this metric, we represent each safety case as a rooted, ordered tree, with GSN elements as nodes and support relationships as edges. TED counts the minimum node insertions, deletions, and relabellings

Table 1: Characteristics of safety cases and patterns in dataset

Safety case/system #Pat. decorators #Pat. placeholders #Pat. elements #GT elements #GT relationships
Baidu Apollo 37 22 49 38 59
Quanser QCar 37 22 49 24 23
SimLingo 23 19 25 37 36
SMIRK 45 54 74 80 103
Automated Valet Parking 0 0 22 22 22
F1TENTH 0 14 11 32 31

Table 2: Settings and characteristics of the evaluated LLMs

Model Org. Context Max Out
GPT-5.5 OpenAI ∼1.05M 128K
Claude Fable-5 Anthropic 1M 128K
DeepSeek-V4-Pro DeepSeek 1M up to 384K

required to transform the generated tree into the ground truth. We compute TED using the Zhang–Shasha algorithm through Python's zss library. A value of zero indicates identical structures, while larger values indicate greater structural differences.

• Cosine Similarity: Cosine similarity measures semantic similarity between the generated safety case and its ground-truth (Odu et al. 2025a; Sivakumar et al. 2024a).Although cosine similarity generally ranges from -1 to 1, the use of non-negative word-frequency vectors restricts the range in this study from 0 to 1. A score of zero indicates that the two safety cases share no common terms. A score of one indicates that their wordfrequency vectors have the same direction and therefore display maximum similarity. Values closer to one indicate greater semantic similarity, whereas values closer to zero indicate less similarity. To compute this metric, we relied on the CountVectorizer Python class from the sklearn library.

Preliminary Results

(RQ1): On the Selection of the Right LLM for the eTrustWare Multi-Agent Framework

Tables 3 and 4 report the results of our experiments. Both tables indicate that Fable-5 is the most suitable LLM to serve as the core reasoning engine for the eTrustWare multi-agent framework. Across the six safety cases and prompting configurations, Fable-5 generally achieves lower Tree Editing Distance (TED), indicating greater structural similarity to the reference safety cases, while simultaneously maintaining comparatively high cosine similarity. Averaged across all experiments, Fable-5 achieves an approximate TED of 68, compared with 75 for DeepSeek-v4-pro and 128 for GPT-5.5. Its average cosine similarity is also the highest, at approximately 0.57, compared with 0.49 for DeepSeek-v4-pro and 0.47 for GPT-5.5. Although DeepSeek-v4-pro occasionally achieves the highest individual scores, Fable-5 provides the most consistent overall compromise between structural and semantic quality across safety cases.

(RQ2): Impact of the use of patterns on eTrustWare Performance

The results in Tables 3 and 4 show that including patterns as LLM inputs (i.e. prompting an LLM to use a pattern to generate a safety case) usually improves the quality of the safety cases eTrustWare generates. Compared with corresponding configurations without patterns, both TED and cosine similarity frequently improve when patterns are supplied in LLM prompts. For instance, in the One-shot + CoT experiment, adding patterns reduces TED substantially for GPT-5.5 in Baidu Apollo (170 to 74), Quanser QCar (82 to 62), and SimLingo (128 to 72), while cosine similarity increases from 0.45 to 0.72, 0.53 to 0.73, and 0.48 to 0.63, respectively. Similar improvements are observed for Fable-5 and DeepSeek-v4-pro across several safety cases.

(RQ3): Impact of the use of various prompting strategies on eTrustWare Performance

The results in Tables 3 and 4 also show that prompting strategy has a substantial impact on the generated safety case quality, with the One-shot + CoT + patterns experiment generally producing the best results. This experiment usually yields the lowest TED and highest cosine similarity, particularly for GPT-5.5 and Fable-5. For instance, GPT-5.5 achieves its lowest TED for Baidu Apollo (74), Quanser QCar (62), SimLingo (72), Automated Valet Parking (72), and F1TENTH Racing Car (94) under this strategy. It also obtains its highest cosine similarity for these safety cases, except for Automated Valet Parking. Likewise, Fable-5 achieves its best or near-best results under patternenhanced prompting. However, performance varies across models and safety cases, suggesting that prompting effectiveness is model- and context-dependent.

Discussion

eTrustWare demonstrates strong potential for safety case generation using patterns, structured prompts, chain-ofthought, and one-shot techniques. However, the safety cases it generates do not yet consistently meet industry standards. Its courtroom-based iterative process improves safety cases through defense, jury evaluation, and prosecutor critiques, although safety case revisions may sometimes deviate from pattern structures or introduce additional GSN elements that

Table 3: Cosine Similarity Results

Safety Case Prompting technique/Experiments GPT-5.5 Fable-5 DeepSeek-v4-pro
Baidu Apollo Zero-shot 0.42 0.48 0.37
Zero-shot + CoT 0.40 0.37 0.49
Zero-shot + CoT + patterns 0.64 0.76 0.77
One-shot 0.42 0.43 0.54
One-shot + CoT 0.45 0.46 0.44
One-shot + CoT + patterns 0.72 0.55 0.82
Quanser QCar Zero-shot 0.49 0.55 0.39
Zero-shot + CoT 0.45 0.66 0.55
Zero-shot + CoT + patterns 0.73 0.73 0.74
One-shot 0.50 0.57 0.49
One-shot + CoT 0.53 0.55 0.59
One-shot + CoT + patterns 0.73 0.79 0.80
Zero-shot 0.49 0.61 0.52
Zero-shot + CoT 0.44 0.58 0.32
Zero-shot + CoT + patterns 0.61 0.75 0.69
SimLingo One-shot 0.44 0.43 0.38
One-shot + CoT 0.48 0.40 0.41
One-shot + CoT + patterns 0.63 0.62 0.68
Zero-shot 0.44 0.60 0.36
Zero-shot + CoT 0.43 0.64 0.38
Zero-shot + CoT + patterns 0.72 0.75 0.74
SMIRK One-shot 0.44 0.46 0.50
One-shot + CoT 0.45 0.63 0.54
One-shot + CoT + patterns 0.77 0.78 0.84
Automated Valet
Parking
Zero-shot 0.42 0.41 0.33
Zero-shot + CoT 0.38 0.60 0.62
Zero-shot + CoT + patterns 0.53 0.70 0.74
One-shot 0.43 0.68 0.57
One-shot + CoT 0.38 0.69 0.68
One-shot + CoT + patterns 0.45 0.79 0.84
F1TENTH
Racing Car
Zero-shot 0.30 0.65 0.33
Zero-shot + CoT 0.35 0.46 0.51
Zero-shot + CoT + patterns 0.68 0.56 0.09
One-shot 0.50 0.21 0.14
One-shot + CoT 0.37 0.20 0.16
One-shot + CoT + patterns 0.75 0.21 0.19

do not exist in the ground truth. Manually refining the safety cases that eTrustWare yields therefore remains crucial.

Our experiments focused on commercial LLMs. Still, high-quality operation is also costly, with approximately CAD 0.20–2 per generation due to LLM token usage. Future work could integrate free or local LLMs to reduce costs and improve privacy. Scalability may improve with more performant LLMs, refined agent prompts, additional agents, user intervention, and real-time collaborative editing for large safety cases.

Threats to Validity

A potential threat to external validity is the generalization of our results beyond the analyzed safety cases, safety standards, LLMs, and experimental configurations used in our evaluation. In particular, eTrustware was evaluated in the context of autonomous system safety cases because, in the automotive sector, safety is paramount. As a consequence, the observed performance may differ when eTrustware is applied to other safety-critical domains, types of assurance cases, or assurance standards. Similarly, results obtained with the selected LLM and prompting strategies may not necessarily generalize to other models or newer versions of LLMs. To mitigate this threat, we evaluated multiple experimental configurations and used established safety assurance standards relevant to autonomous driving systems. Nevertheless, additional experiments using larger and more diverse safety cases from additional domains, standards, LLMs, and prompting strategies are required to assess the generalization of our findings.

Table 4: Tree Editing Distance (TED) Results

Safety Case Prompting technique/Experiment GPT-5.5 Fable-5 DeepSeek-v4-pro
Baidu Apollo Zero-shot 215 89 86
Zero-shot + CoT 115 63 74
Zero-shot + CoT + patterns 122 72 83
One-shot 173 63 77
One-shot + CoT 170 63 89
One-shot + CoT + patterns 74 60 72
Zero-shot 153 88 46
Zero-shot + CoT 116 27 39
Zero-shot + CoT + patterns 66 98 27
Quanser QCar One-shot 117 27 82
One-shot + CoT 82 29 41
One-shot + CoT + patterns 62 24 49
Zero-shot 132 87 41
Zero-shot + CoT 108 39 51
Zero-shot + CoT + patterns 121 50 42
SimLingo One-shot 121 39 87
One-shot + CoT 128 38 44
One-shot + CoT + patterns 72 37 37
Zero-shot 118 130 107
Zero-shot + CoT 125 104 107
Zero-shot + CoT + patterns 118 175 120
SMIRK One-shot 230 105 141
One-shot + CoT 187 106 108
One-shot + CoT + patterns 118 105 118
Automated Valet
Parking
Zero-shot 89 111 152
Zero-shot + CoT 86 29 59
Zero-shot + CoT + patterns 129 43 57
One-shot 138 30 68
One-shot + CoT 182 28 78
One-shot + CoT + patterns 72 37 38
F1TENTH
Racing Car
Zero-shot 118 124 48
Zero-shot + CoT 110 35 89
Zero-shot + CoT + patterns 125 54 53
One-shot 117 34 136
One-shot + CoT 98 37 44
One-shot + CoT + patterns 94 33 54

Conclusion and Future Work

In this paper, we introduced eTrustWare, a courtroominspired multi-agent LLM framework for generating and evaluating autonomous-vehicle safety cases. Experiments on eTrustWare showed that Claude Fable-5 performs best, while patterns, chain-of-thought prompting, and one-shot examples improve the generated safety cases structural and semantic correctness.

Future work will extend eTrustWare through real-time human-agent collaboration, will allow deploying it, and will aim at validating it using additional evaluation metrics and a larger dataset covering diverse application domains such as healthcare, nuclear, and aerospace, alongside standards such as ISO 26262. Manual expert assessments will examine potential LLM non-determinism and hallucinations.

Acknowledgments

This work was undertaken thanks in part to funding from the Connected Minds program, supported by Canada First Research Excellence Fund, grant #CFREF-2022-00010. This work was also partially supported by the NSERC (Natural Sciences and Engineering Research Council of Canada) USRA program, by an NSERC Discovery grant, and by the Lassonde School of Engineering (at York University) LURA program. Some features of eTrustWare are inspired by SmartGSN (Odu et al. 2025b). We therefore want to thank the original developers of SmartGSN, namely: Oluwafemi Odu, Daniel Mendez Beltr ´ an, Emiliano Berrones Guti ´ errez, ´ Melika Sherafat, Mhd Ryiad Alelaioy, Ursanne Kengne, Alexis Lavigne, and Ethan Ngo.

References

  • Ahlbrecht, A.; Sprockhoff, J.; and Durak, U. 2025. A system-theoretic assurance framework for safety-driven systems engineering: A. Ahlbrecht et al. Software and Systems Modeling, 24(1): 253–270.
  • Annable, N.; Lawford, M.; Paige, R. F.; and Wassyng, A. 2025. Principled Safety Assurance Arguments. In International Conference on Computer Safety, Reliability, and Security, 18–32. Springer.
  • Ballingall, S.; Sarvi, M.; and Sweatman, P. 2025. Safety assurance for automated systems in transport: A collective case study of real-world fatal crashes. Journal of Safety Research, 92: 27–39.
  • Belle, A. B.; and Yu, G. 2025. A Preliminary Systematic Review on LLM-Based System Assurance: Is Generative AI All You Need? In 2025 IEEE International Conference on Collaborative Advances in Software and COmputiNg (CAS-CON), 589–590. IEEE.
  • Borg, M.; Henriksson, J.; Socha, K.; Lennartsson, O.; Sonnsjo L ¨ onegren, E.; Bui, T.; Tomaszewski, P.; ¨ Sathyamoorthy, S. R.; Brink, S.; and Helali Moghadam, M. 2023. Ergo, SMIRK is safe: a safety case for a machine learning component in a pedestrian automatic emergency brake system. Software quality journal, 31(2): 335–403.
  • Brown, A.; Roman, M.; and Devereux, B. 2025. A systematic literature review of retrieval-augmented generation: Techniques, metrics, and challenges. arXiv preprint arXiv:2508.06401.
  • Buysse, L.; Habli, I.; Vanoost, D.; and Pissoort, D. 2025. Safe autonomous systems in a changing world: Operationalising dynamic safety cases. Safety Science, 191: 106965.
  • Carlan, C.; Beyene, T. A.; and Ruess, H. 2016. Integrated ˆ formal methods for constructing assurance cases. In 2016 IEEE International Symposium on Software Reliability Engineering Workshops (ISSREW), 221–228. IEEE.
  • Carlan, C.; and Gallina, B. 2020. Enhancing state-of-theart safety case patterns to support change impact analysis. In 30th European safety and reliability conference, volume 136.
  • de La Vara, J. L.; Gallina, B.; Fernandez-Caballero, A.; ´ Molina, J. P.; Garc´ıa, A. S.; and Ayora, C. 2023. Assurance of software-intensive medical devices: What about mental harm? In 2023 53rd Annual IEEE/IFIP International Conference on Dependable Systems and Networks-Supplemental Volume (DSN-S), 168–172. IEEE.
  • Denney, E.; and Pai, G. 2026. AdvoCATE: The Assurance Case Automation Toolset at Age 14. In AIAA SCITECH 2026 Forum, 1251.
  • Di Sandro, A.; Murphy, L.; Viger, T.; and Chechik, M. 2024. MMINT-a: a framework for model-based safety assurance. Science of Computer Programming, 231: 103004.
  • Diemert, S.; Cyffka, E.; Anwari, N.; Foster, O.; Viger, T.; Millet, L.; and Joyce, J. 2025. Balancing the risks and benefits of using large language models to support assurance case development. In International Conference on Computer Safety, Reliability, and Security, 209–225. Springer.

  • Finnegan, A.; and McCaffery, F. 2014. A security argument pattern for medical device assurance cases. In 2014 IEEE International Symposium on Software Reliability Engineering Workshops, 220–225. IEEE.

  • Fujiwara, Y.; Tuchida, T.; Miyata, R.; Washizaki, H.; and Ubayashi, N. 2025. LLM-Based Automated Mitigation and Assurance Case Generation Against Threats to AI Systems. In 2025 IEEE Conference on Artificial Intelligence (CAI), 906–911. IEEE.
  • Gauerhof, L.; Hawkins, R.; Picardi, C.; Paterson, C.; Hagiwara, Y.; and Habli, I. 2020. Assuring the safety of machine learning for pedestrian detection at crossings. In International Conference on Computer Safety, Reliability, and Security, 197–212. Springer.
  • Ghahremani, E.; Joyce, J.; and Lechner, S. 2024. Avoiding confirmation bias in a safety management system (sms). In 2024 Integrated Communications, Navigation and Surveillance Conference (ICNS), 1–11. IEEE.
  • Goal Structuring Notation Standard Working Group, G. 2021. GSN (Version 3). Accessed on May 29, 2026.
  • Gohar, U.; Hunter, M. C.; Lutz, R. R.; and Cohen, M. B. 2024. Codefeater: Using llms to find defeaters in assurance cases. In Proceedings of the 39th IEEE/ACM International Conference on Automated Software Engineering, 2262–2267.
  • Hawkins, R.; Paterson, C.; Picardi, C.; Jia, Y.; Calinescu, R.; and Habli, I. 2021. Guidance on the assurance of machine learning in autonomous systems (AMLAS). arXiv preprint arXiv:2102.01564.
  • He, J.; Treude, C.; and Lo, D. 2025. Llm-based multi-agent systems for software engineering: Literature review, vision, and the road ahead. ACM Transactions on Software Engineering and Methodology, 34(5): 1–30.
  • Herd, B.; Kelly, J.; Heinemann, C.; and Zacchi, J. V. 2026. A Subjective Logic-based method for runtime confidence updates in safety arguments. In Proceedings of the 41st ACM/SIGAPP Symposium on Applied Computing, 1478– 1485.
  • Hou, X.; Zhao, Y.; Liu, Y.; Yang, Z.; Wang, K.; Li, L.; Luo, X.; Lo, D.; Grundy, J.; and Wang, H. 2024. Large language models for software engineering: A systematic literature review. ACM Transactions on Software Engineering and Methodology, 33(8): 1–79.
  • Ikhwantri, F.; Ojanguren, I. L.; Marijan, D.; and Kosmides, P. 2026. An Agentic RAG and Evaluation Framework for Assurance Case Generation: Industrial Use Case for the EU Cyber Resilience Act Compliance. arXiv:2608.19509.
  • Kelly, T. 2007. Reviewing assurance arguments-a step-bystep approach. In Workshop on assurance cases for securitythe metrics challenge, dependable systems and networks (DSN), 25–88.
  • Kodama, H.; Matsuno, Y.; Takai, T.; Ota, H.; Okada, M.; and Tsuchiya, T. 2024. A Case Study of Continuous Assurance Argument for Level 4 Automated Driving, 150–165. ISBN 978-3-031-68605-4.
  • Koopman, P. 2023. Ul 4600: What to include in an autonomous vehicle safety case. Computer, 56(05): 101–104.

  • Lewis, P.; Perez, E.; Piktus, A.; Petroni, F.; Karpukhin, V.; Goyal, N.; Kuttler, H.; Lewis, M.; Yih, W.-t.; Rockt ¨ aschel, ¨ T.; et al. 2020. Retrieval-augmented generation for knowledge-intensive nlp tasks. Advances in neural information processing systems, 33: 9459–9474.

  • Maksimov, M.; Kokaly, S.; and Chechik, M. 2019. A survey of tool-supported assurance case assessment techniques. ACM Computing Surveys (CSUR), 52(5): 1–34.
  • Meng, B.; Paul, S.; Varanasi, S. C.; Alexander, C.; Mertens, E.; Moitra, A.; Siu, K.; and Durling, M. 2025. RITE: An IDE for Assurance and Certification of Software and Systems. In 2025 AIAA DATC/IEEE 44th Digital Avionics Systems Conference (DASC), 1–10. IEEE.
  • Mohajer, M. M.; Aleithan, R.; Harzevili, N. S.; Wei, M.; Belle, A. B.; Pham, H. V.; and Wang, S. 2024. Effectiveness of chatgpt for static analysis: How far are we? In Proceedings of the 1st ACM International Conference on AI-Powered Software, 151–160.
  • Mohamad, M.; Jolak, R.; Askerdal, O.; Stegh ¨ ofer, J.-P.; and ¨ Scandariato, R. 2023. Cascade: An asset-driven approach to build security assurance cases for automotive systems. ACM transactions on cyber-physical systems, 7(1): 1–26.
  • Muram, F. U.; and Javed, M. A. 2023. ATTEST: Automating the review and update of assurance case arguments. Journal of systems architecture, 134: 102781.
  • Murugesan, A.; Wong, I.; Arias, J.; Stroud, R.; Varadarajan, S.; Salazar, E.; Gupta, G.; Bloomfield, R.; and Rushby, J. 2024. Automating semantic analysis of system assurance cases using goal-directed asp. Theory and Practice of Logic Programming, 24(4): 805–824.
  • Nearchou, I.; Rafalko, L.; Phillips, R.; Anderson, M.; Shen, W.; and Drager, S. 2023. An assurance case driven development paradigm for autonomous vehicles: An f1tenth racing car case study. In 2023 IEEE/ACIS 21st International Conference on Software Engineering Research, Management and Applications (SERA), 156–161. IEEE.
  • Odu, O.; Belle, A. B.; and Wang, S. 2025. LLM-Based Safety Case Generation for Baidu Apollo: Are We there Yet? In 2025 IEEE/ACM 4th International Conference on AI Engineering–Software Engineering for AI (CAIN), 222– 233. IEEE.
  • Odu, O.; Belle, A. B.; Wang, S.; Kpodjedo, S.; Lethbridge, T. C.; and Hemmati, H. 2025a. Automatic instantiation of assurance cases from patterns using large language models. Journal of Systems and Software, 222: 112353.
  • Odu, O.; Beltran, D. M.; Guti ´ errez, E. B.; Belle, A. B.; Yu, ´ G.; and Sherafat, M. 2025b. SmartGSN: an online tool to semi-automatically manage assurance cases. In International Conference on Computer Safety, Reliability, and Security, 3–17. Springer.
  • Shahandashti, K. K.; Belle, A. B.; Mohajer, M. M.; Odu, O.; Lethbridge, T. C.; Hemmati, H.; and Wang, S. 2024. Using GPT-4 turbo to automatically identify defeaters in assurance cases. In 2024 IEEE 32nd International Requirements Engineering Conference Workshops (REW), 46–56. IEEE.
  • Sivakumar, M.; Belle, A. B.; Shan, J.; Odu, O.; and Yuan, M. 2024a. Design of the safety case of the reinforcement

  • learning-enabled component of a quanser autonomous vehicle. In 2024 IEEE 32nd International Requirements Engineering Conference Workshops (REW), 57–67. IEEE.

  • Sivakumar, M.; Belle, A. B.; Shan, J.; and Shahandashti, K. K. 2024b. Prompting GPT–4 to support automatic safety case generation. Expert Systems with Applications, 255: 124653.
  • Sorokin, L.; Bouchekir, R.; Beyene, T. A.; Liao, B. H.-C.; and Molin, A. 2024. Towards continuous assurance case creation for ads with the evidential tool bus. In European Dependable Computing Conference, 49–61. Springer.
  • Viger, T.; Murphy, L.; Diemert, S.; Menghi, C.; Babikian, A. A.; Joyce, J.; Di Sandro, A.; Anwari, N.; Cyffka, E.; and Chechik, M. 2026. Evaluating AI-supported eliminative argumentation for developing reliable assurance cases. Empirical Software Engineering, 31(4): 101.
  • Viger, T.; Murphy, L.; Diemert, S.; Menghi, C.; Di, A.; and Chechik, M. 2023. Supporting assurance case development using generative ai. In SAFECOMP 2023, position paper.
  • Viger, T.; Murphy, L.; Diemert, S.; Menghi, C.; Joyce, J.; Di Sandro, A.; and Chechik, M. 2024. AI-supported eliminative argumentation: Practical experience generating defeaters to increase confidence in assurance cases. In 2024 IEEE 35th International Symposium on Software Reliability Engineering (ISSRE), 284–294. IEEE.
  • Weinstock, C. B.; and Goodenough, J. B. 2009. Towards an assurance case practice for medical devices. Technical report.
  • Widyasari, R.; Weyssow, M.; Irsan, I. C.; Ang, H. W.; Liauw, F.; Ouh, E. L.; Shar, L. K.; Kang, H. J.; and Lo, D. 2026. Let the trial begin: A mock-court approach to vulnerability detection using llm-based agents. International Conference in Software engineering.
  • Yu, G.; Ishikawa, F.; Odu, O.; and Belle, A. B. 2026a. Safety Case Patterns for VLA-based driving systems: Insights from SimLingo. arXiv preprint arXiv:2603.16013.
  • Yu, G.; Sivakumar, M.; Belle, A. B.; Ghari, S.; Wang, S.; and Lethbridge, T. C. 2026b. LLMs as judges: Toward the LLMassisted review of GSN-compliant assurance cases. Journal of Systems and Software, 113036.
  • Zeng, Z.; Shahandashti, K. K.; Belle, A. B.; Wang, S.; and Jiang, Z. M. 2026. An Experience Report on LLM-Based Agentic Translation from Android to iOS: Pitfalls and Insights. In Proceedings of the 2026 IEEE/ACM Third International Conference on AI Foundation Models and Software Engineering, 6–16.