- The paper introduces a GenAI-driven automation workflow that integrates LLMs, RAG, and MDE to streamline automotive software engineering.
- The methodology formalizes and validates automotive requirements, enabling early compliance checks and rapid simulation scenario generation.
- The approach significantly reduces development time for ADAS testing while ensuring data privacy and human-in-the-loop oversight.
GenAI-Driven Automation in Automotive Software Engineering: A Comprehensive Workflow
Introduction
The paper presents a systematic approach to leveraging Generative AI (GenAI), particularly LLMs and Retrieval Augmented Generation (RAG), for automating the end-to-end automotive software development lifecycle. The focus is on Advanced Driver Assistance Systems (ADAS) and autonomous driving, where regulatory compliance, complexity, and the scale of requirements pose significant challenges. The proposed methodology integrates GenAI with Model-Driven Engineering (MDE) to address issues of trustworthiness, reproducibility, and hallucination mitigation, while also enabling local deployment for sensitive assets. The workflow encompasses requirements extraction, formalization, consistency checking, simulation scenario generation, and target platform code synthesis.
Figure 1: GenAI-empowered automotive software development workflow.
Methodological Framework
The workflow initiates with the ingestion of requirements and regulatory documents, utilizing RAG to extract relevant information efficiently. This is particularly critical for processing standards such as UN Regulation No. 152, where both textual and visual content must be parsed. Vision-LLMs (VLMs) are incorporated for multimodal document understanding, ensuring that diagrams and graphs are not neglected in the requirements extraction phase.
Subsequently, LLMs are employed to summarize and structure requirements into formal representations, such as Ecore metamodels and XMI model instances. This formalization enables early-stage design checks and compliance verification, serving as a bridge between requirements engineering and code generation. The workflow is orchestrated using the n8n automation platform, facilitating modular integration of AI agents and auxiliary tools.
Model-Driven Consistency Checking
A central component of the workflow is the model checker, which comprises two LLM agents: one for instance model generation and another for Object Constraint Language (OCL) rule synthesis. The process begins with hardware/software specifications and a system metamodel as input, producing an XMI instance model. The authors report that a Llama 3.1-70B-based solution achieves semantic performance on par with GPT-4o, with improved efficiency by introducing an intermediate conceptual model notation rather than direct XMI generation.
For OCL rule generation, a fine-tuned Llama3-8B model is used in conjunction with RAG, enabling local deployment and domain-specific adaptation. The metamodeling process itself can be automated using deepseek-ai/deepseek-LLM-7b-chat, with iterative refinement and human-in-the-loop feedback via PlantUML representations. This iterative, visual approach supports both automation and expert oversight.
Figure 2: Model instance and OCL rule generation for consistency checking.
Figure 3: LLM-based iterative metamodeling.
Regulation-Compliant Scenario Generation
The generation of regulation-compliant test scenarios is addressed through a robust RAG pipeline. The SmartChunking technique preprocesses regulatory PDFs by mapping hierarchical structures, resolving references, and expanding context via graph traversal. This enables efficient, query-sensitive retrieval and reranking, ensuring that LLMs receive only the most relevant and contextually enriched information. The approach is shown to outperform conventional chunking and non-RAG baselines, particularly in extracting precise numerical and conditional details from lengthy standards.
Figure 4: GenAI-empowered automotive software development workflow.
Simulation Scenario and Code Generation
Building on the extracted scenarios, the workflow generates configuration code for CARLA-based simulation environments. Separate LLM-driven pipelines address vehicle definition, pre-conditions (scene setup, agent positioning, weather), and post-conditions (telemetry, expected outcomes). The methodology leverages GPT-4o and is informed by prior work on requirements-driven code generation. This modularization allows for fine-grained control and traceability from requirements to simulation artifacts.
Figure 5: Simulation scenario generation.
The final stage involves generating C++ code for the target testbench platform, complementing the Python simulation code executed in CARLA. The architecture employs ROS2 for event communication, with the simulation acting as a publisher and the vehicle controller as a subscriber. The code generation process is informed by the experiment model, code templates, and the Vehicle Signal Specification (VSS) catalog. Signal mapping and control logic synthesis are automated, with comAPI invocations translated to CAN messages for zone ECUs via a gateway component. This enables seamless integration between simulated and physical environments, supporting hardware-in-the-loop (HIL) testing.
Figure 6: Target platform code generation.
The approach demonstrates a significant reduction in development and testing time for ADAS capabilities, with initial results for automated emergency braking indicating a shift from days or hours to minutes. The use of locally deployable, fine-tuned LLMs addresses concerns around data privacy and asset exposure. However, the workflow still recommends human-in-the-loop validation, particularly for safety-critical applications. The reliance on multi-agent LLM systems for hallucination mitigation is a notable strength, but the scalability and generalizability of the approach to broader automotive domains remain open questions.
Implications and Future Directions
The integration of GenAI, RAG, and MDE in a unified workflow has both practical and theoretical implications. Practically, it enables rapid prototyping, compliance checking, and code synthesis, potentially transforming the automotive software engineering landscape. Theoretically, it advances the state of the art in AI-assisted formal methods, model-driven engineering, and trustworthy automation. Future work may focus on expanding the range of supported standards, enhancing multimodal document understanding, and further automating the human-in-the-loop components. The development of smaller, task-specific LLMs for local deployment is also a promising direction, particularly in the context of intellectual property and regulatory constraints.
Conclusion
This work presents a comprehensive, modular workflow for GenAI-driven automation in automotive software development, spanning requirements extraction, formalization, consistency checking, simulation, and target platform code generation. The integration of LLMs, RAG, and MDE addresses key challenges in trustworthiness, compliance, and efficiency. The reported reduction in development cycle time and the ability to locally deploy tailored AI models underscore the practical viability of the approach. Further research is warranted to generalize the methodology and fully realize its potential in safety-critical, large-scale automotive systems.