1. Introduction
The development and deployment of autonomous vehicles (AVs) and advanced driver assistance systems (ADAS) critically depend on the rigorous assessment of their safety behavior under broad scenario conditions. Large Language Models (LLMs), such as ChatGPT, are increasingly leveraged for generating diverse, complex driving scenarios—transitioning from SAFE to UNSAFE states—to stimulate edge-case evaluation. This structured report evaluates whether LLM-generated prompts align with formal safety standards (EU 2022/1426, ISO 26262, UNECE R157), objectively compares scenario generation outputs from LLMs (notably ChatGPT) and domain tools (Mela), proposes improved prompt design frameworks, and benchmarks results against global regulation and logical scenario frameworks.
2. Regulatory Safety Frameworks
2.1 EU 2022/1426
EU Regulation 2022/1426 mandates advanced vehicle safety features and performance-based testing, focusing on measurable KPIs, such as Time-to-Collision (TTC), Minimum Safe Distance (MSD), hazard detection, and protocol for minimal risk maneuvers. These criteria reflect the necessity for scenario definitions to employ quantitatively rigorous safety thresholds.
2.2 ISO 26262 & ISO 21448 (SOTIF)
ISO 26262 centers on the functional safety of electrical/electronic systems—requiring systematic hazard and risk analyses over the system life cycle, generally using Automotive Safety Integrity Levels (ASILs)[1]. ISO 21448 (SOTIF) addresses the safety of the intended functionality, emphasizing that risks can arise even in the absence of malfunction, due to sensing or environmental edge-cases[2][3].
2.3 UNECE Regulation R157
UNECE R157 governs Automated Lane Keeping Systems (ALKS), stipulating, for example, minimum headways (≥2 seconds), dynamic risk management, and the ability of systems to execute safe transitions across operational design domains.
3. Defining SAFE vs. UNSAFE Driving Scenarios
3.1 Objective Metrics and Thresholds
Drawing from standards and research, objective metrics delineate SAFE vs. UNSAFE driving scenarios as follows:
These metrics have explicit causal relationships to accident risk; e.g., a TTC below 1 second strongly correlates with impending collision, and PRC can be estimated statistically in scenario-based simulation for performance benchmarking[6][4].
3.2 Qualitative Criteria
Key regulatory and research-based qualitative triggers for transitioning to UNSAFE include:
- Sudden, unwarranted braking or swerve of a forward vehicle[5]
- Pedestrian occlusion or sudden road crossings, especially near lane boundaries[3]
- Lane changes with insufficient headway in dense environments[2]
- Failures in right-of-way recognition[7]
In advanced scenario modeling, these causal and behavioral aspects must be made machine-quantifiable for systematic risk quantification.
4. Comparison: Mela (Knowledge-based) vs. LLM-Generated Scenario Prompts
4.1 Scenario Generation Approaches
- Mela: Knowledge-based, parameterized; scenarios tightly coupled to safety field theory and regulatory thresholds[4][5].
- LLMs (ChatGPT): Leverage pattern recognition from textual data; uncontrolled output can omit edge-case nuances or breach compliance if prompts are not explicitly structured[4].
4.2 Prompt Engineering and Embedding Thresholds
Sample prompt (for LLMs, incorporating standards):
"Generate a traffic scenario describing a transition from SAFE to UNSAFE, adhering to EU 2022/1426 and ISO 21448. Specify precise actor behaviors and environmental changes leading to TTC≤1.0 s or MSD<1.5 m."
Inclusion of explicit quantitative criteria and regulatory references in prompts results in more standard-compliant and risk-relevant outputs[4][5].
4.3 Simulation Toolchain
Both LLM-derived and Mela scenarios are encoded (e.g., OpenSCENARIO format) and ingested into high-fidelity simulation tools (e.g., dSPACE ASM, Mela’s backend) to trace time-resolved risk indices (TTC,MSD,PRC) across scenario evolutions.
5. Empirical Results
5.1 Quantitative Safety Metrics
Structured, threshold-aware prompts drive ChatGPT outputs toward higher realism and regulatory compliance, but certain subtle human nuances (e.g., highly context-specific maneuvers) remain challenging for LLMs without domain-specific fine-tuning[4][2].
5.2 Realism and Safety Violations
- Mela scenarios consistently avoid physically unrealistic behaviors thanks to explicit modeling of driver–vehicle–road interaction fields[8][4].
- LLM outputs, especially when under-specified, occasionally produce non-compliant or low-probability scenarios (e.g., instantaneous speed shifts, implausible driver reactions).
6. Discussion
6.1 Impact of Prompt Structure
Prompts specifying explicit metric thresholds, environmental conditions, and regulatory context significantly improve the validity and usefulness of LLM-generated scenarios[4][6]. Embedding a causal progression—for example, "fog reduces visibility, leading to late hazard detection, resulting in TTC<1.0 s"—facilitates the translation of regulatory intent to simulation reality[5].
6.2 Observed Safety Violations
LLM-generated scenarios can inadvertently ignore nuanced safety triggers or produce highly creative, but impractical or non-compliant, edge-cases, especially regarding multi-agent interactions or suppressed occlusion logic—a trend noted in both adversarial and data-driven scenario generation modalities[4][9][2].
6.3 Limitations and Transferability
Despite improvements, LLM outputs exhibit transferability and fidelity gaps compared to hand-crafted knowledge-based scenarios, particularly where fine variations in road geometry, sensory error modeling, or edge behavior are critical[4][8][3].
7. Recommendations for Prompt Refinement & Tool Integration
Prompt Engineering Heuristics:
- Directly encode standards-based metrics: e.g., "Ensure TTC drops below 1.0 s due to the leading vehicle's sudden deceleration."
- Frame transitions causally and with precise environmental triggers (weather, occlusion, multi-agent interactions)[5][8].
- Require all outputs to specify TTC,MSD, and collision probability at key scenario time points.
Hybrid Framework:
- Integrate LLM-generated scenarios as augmentations—after post-generation standard checks—with knowledge-based or risk-index sampling approaches to ensure diversity and coverage without breaching compliance[6][5].
- Use automated scenario validators that flag breaches of TTC, MSD, or regulatory markers per timestep[4][5].
Tool Benchmarking:
- Benchmark LLM outputs against logical scenario catalogs as established in [5] to ensure representativity and completeness.
- Where possible, map scenario elements to driving safety fields[8] to systematically explore the driver–vehicle–road risk space.
8. Conclusion
Scenario generation for the assessment of AV safety must be robustly coupled to regulatory metrics (notably TTC, MSD, and PRC) and in-depth qualitative triggers. LLMs, when guided by carefully structured prompts, can produce realistic and useful scenarios, but remain reliant on explicit metric embedding to align with regulatory compliance and industry-defined safety logic. Knowledge-based and risk-indexed scenario generators (e.g., Mela) remain superior in compliance and coverage but lack the creative edge afforded by generative LLMs[4][6]. A hybridized workflow, combining LLM creativity, structured prompt engineering, and automated compliance auditing, is recommended for simulation-driven AV safety validation at scale.
9. Comparative Table: Tools, Metrics, and Compliance
*Improves with structured, threshold-embedded prompting.
10. Illustrative Diagram
Below is a schematic workflow for SAFE→UNSAFE scenario generation and validation.
[Prompt (with regulatory triggers) ]
|
[LLM or Mela]
|
[Scenario Validation Tool]
|
[Simulation (dSPACE/Mela/CARLA)]
|
[Metric Extraction (TTC, MSD, PRC, etc.)]
|
[Regulatory & Realism Assessment]
11. Formal Citation Examples Within the Text
- A unified driving safety field enables the systematic modeling of driver-vehicle-road dynamics, thereby facilitating quantifiable scenario safety assessments[8].
- Logical scenario frameworks abstract safety-relevant events, permitting alignment with accident classification and regulatory requirements[5].
12. Final Perspective
The synergy of structured LLM prompting and robust, simulation-based validation against regulatory thresholds paves a promising pathway toward scalable, realistic, and compliant scenario-based AD/ADAS testing. However, continued progress demands integrated workflows, automated compliance tools, and expanded scenario field modeling consonant with evolving international safety standards[2][5][4].