Table of Contents
Fetching ...

Towards Automated Safety Requirements Derivation Using Agent-based RAG

Balahari Vignesh Balu, Florian Geissler, Francesco Carella, Joao-Vitor Zacchi, Josef Jiru, Nuria Mata, Reinhard Stolle

TL;DR

The paper tackles the challenge of deriving reliable safety requirements for autonomous driving by mitigating LLM hallucinations through an agent-based retrieval-augmented generation (RAG) framework. It grounds the safety analysis in domain knowledge by leveraging a document pool that includes automotive standards and the Apollo case study, and validates the approach using 58 question–answer pairs derived from Apollo. Compared to a standard RAG pipeline and single LLM calls, the agent-based RAG demonstrates higher retrieval precision and better alignment between retrieved context and generated safety requirements, indicating more domain-relevant and explainable outputs. The work suggests that agent-based RAG is especially promising for safety-critical tasks and proposes future research on more complex datasets and alternative LLMs to broaden applicability in automotive safety analyses.

Abstract

We study the automated derivation of safety requirements in a self-driving vehicle use case, leveraging LLMs in combination with agent-based retrieval-augmented generation. Conventional approaches that utilise pre-trained LLMs to assist in safety analyses typically lack domain-specific knowledge. Existing RAG approaches address this issue, yet their performance deteriorates when handling complex queries and it becomes increasingly harder to retrieve the most relevant information. This is particularly relevant for safety-relevant applications. In this paper, we propose the use of agent-based RAG to derive safety requirements and show that the retrieved information is more relevant to the queries. We implement an agent-based approach on a document pool of automotive standards and the Apollo case study, as a representative example of an automated driving perception system. Our solution is tested on a data set of safety requirement questions and answers, extracted from the Apollo data. Evaluating a set of selected RAG metrics, we present and discuss advantages of a agent-based approach compared to default RAG methods.

Towards Automated Safety Requirements Derivation Using Agent-based RAG

TL;DR

The paper tackles the challenge of deriving reliable safety requirements for autonomous driving by mitigating LLM hallucinations through an agent-based retrieval-augmented generation (RAG) framework. It grounds the safety analysis in domain knowledge by leveraging a document pool that includes automotive standards and the Apollo case study, and validates the approach using 58 question–answer pairs derived from Apollo. Compared to a standard RAG pipeline and single LLM calls, the agent-based RAG demonstrates higher retrieval precision and better alignment between retrieved context and generated safety requirements, indicating more domain-relevant and explainable outputs. The work suggests that agent-based RAG is especially promising for safety-critical tasks and proposes future research on more complex datasets and alternative LLMs to broaden applicability in automotive safety analyses.

Abstract

We study the automated derivation of safety requirements in a self-driving vehicle use case, leveraging LLMs in combination with agent-based retrieval-augmented generation. Conventional approaches that utilise pre-trained LLMs to assist in safety analyses typically lack domain-specific knowledge. Existing RAG approaches address this issue, yet their performance deteriorates when handling complex queries and it becomes increasingly harder to retrieve the most relevant information. This is particularly relevant for safety-relevant applications. In this paper, we propose the use of agent-based RAG to derive safety requirements and show that the retrieved information is more relevant to the queries. We implement an agent-based approach on a document pool of automotive standards and the Apollo case study, as a representative example of an automated driving perception system. Our solution is tested on a data set of safety requirement questions and answers, extracted from the Apollo data. Evaluating a set of selected RAG metrics, we present and discuss advantages of a agent-based approach compared to default RAG methods.

Paper Structure

This paper contains 7 sections, 3 figures, 3 tables.

Figures (3)

  • Figure 1: A RAG pipeline showcasing how domain knowledge is pre-processed and stored to be retrieved later as context, serving as input to the LLM together with the user query. The default (conventional) RAG approach is replaced by a customized approach highlighted in green, which enables a refined context retrieval mechanism illustrated in detail in Fig. \ref{['fig:agent_based_rag']}.
  • Figure 2: The sequence of steps (read from top-to-bottom) depicting the workflow of the proposed alternate method of context retrieval mechanism to retrieve refined contexts in the agent-based RAG approach proposed in this paper.
  • Figure 3: Average and standard error for the metrics selected in Tab. \ref{['tab:metrics_summary']} for $10$ independent runs.