Retrieval-Augmented Validation of AUTOSAR ARXML : A Machine-Learning-Assisted Code-Review Framework

The automotive industry heavily depends on the AUTOSAR (Automotive Open System Architecture) platform to standardize and streamline the development of electronic control units (ECUs). ARXML files, which serve as the structural backbone forAUTOSAR-based systems, pose unique challenges due to their hierarchical complexity and verbose nature. Manual review of these files is time-consuming, error-prone,and inefficient at the scale demanded by modern automotive workflows. Advances in artificial intelligence, particularly Retrieval-Augmented Generation (RAG) models, present an opportunity to automate and enhance ARXML validation. This thesis explores how integrating AUTOSAR specifications, vector embeddings, and promptengineering can improve the precision and efficiency of ARXML review processes. This research aims to design, implement, and evaluate a RAG-based pipeline tailored for ARXML analysis and review. The main objective is to assess whether RAGmodels can detect inconsistencies in ARXML configurations and deliver actionable,specification-grounded suggestions. An additional goal is to optimize developer experience by embedding AUTOSAR compliance logic directly into review feedback, thereby streamlining validation tasks. An iterative action research methodology was adopted to co-develop the systemwith practitioners. The framework integrates semantic vector embeddings, hybrid retrieval (BM25 + FAISS), and structured prompt templates to process ARXML diffs sand retrieve relevant segments from the AUTOSAR Classic Platform R23-11 specification. The system is evaluated using an LLM-as-a-Judge framework, which separately scores retrieval quality and generation faithfulness using rubric-based criteria. Performance metrics and model interpretability were analyzed across representative patch sets from a production-grade OEM project.The RAG system produced feedback that aligned well with AUTOSAR semantics, ordering clear and structured guidance to reviewers. The generation component received high ratings for clarity and completeness, although retrieval sometimeslacked clause-level grounding. While the tool reduced reliance on manual documentation lookup and improved review usability, it did not produce executable artefacts. The framework demonstrated interactive latency (~1.9s) suitable for integration withtools like Gerrit. This thesis demonstrates that a RAG-based approach can automate and improve ARXML review by embedding structured domain knowledge into AI feedback. Allthough the system currently targets AUTOSAR Classic R23-11, its modular architecture is adaptable to other structured formats such as YAML or JSON and applicable to regulated domains like aerospace and medical devices. Future work should address traceability, integration with live review systems, and broader generalization across standards and organizations.

Publication Details

Journal
KTH Publication Database DiVA (KTH Royal Institute of Technology)
Published
2025-01-01
Primary Topic
Plant chemical constituents analysis
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Retrieval-Augmented Validation of AUTOSAR ARXML : A Machine-Learning-Assisted Code-Review Framework

KTH Publication Database DiVA (KTH Royal Institute of Technology)
Plant chemical constituents analysis
article

Retrieval-Augmented Validation of AUTOSAR ARXML : A Machine-Learning-Assisted Code-Review Framework

article en

Abstract

The automotive industry heavily depends on the AUTOSAR (Automotive Open System Architecture) platform to standardize and streamline the development of electronic control units (ECUs). ARXML files, which serve as the structural backbone forAUTOSAR-based systems, pose unique challenges due to their hierarchical complexity and verbose nature. Manual review of these files is time-consuming, error-prone,and inefficient at the scale demanded by modern automotive workflows. Advances in artificial intelligence, particularly Retrieval-Augmented Generation (RAG) models, present an opportunity to automate and enhance ARXML validation. This thesis explores how integrating AUTOSAR specifications, vector embeddings, and promptengineering can improve the precision and efficiency of ARXML review processes. This research aims to design, implement, and evaluate a RAG-based pipeline tailored for ARXML analysis and review. The main objective is to assess whether RAGmodels can detect inconsistencies in ARXML configurations and deliver actionable,specification-grounded suggestions. An additional goal is to optimize developer experience by embedding AUTOSAR compliance logic directly into review feedback, thereby streamlining validation tasks. An iterative action research methodology was adopted to co-develop the systemwith practitioners. The framework integrates semantic vector embeddings, hybrid retrieval (BM25 + FAISS), and structured prompt templates to process ARXML diffs sand retrieve relevant segments from the AUTOSAR Classic Platform R23-11 specification. The system is evaluated using an LLM-as-a-Judge framework, which separately scores retrieval quality and generation faithfulness using rubric-based criteria. Performance metrics and model interpretability were analyzed across representative patch sets from a production-grade OEM project.The RAG system produced feedback that aligned well with AUTOSAR semantics, ordering clear and structured guidance to reviewers. The generation component received high ratings for clarity and completeness, although retrieval sometimeslacked clause-level grounding. While the tool reduced reliance on manual documentation lookup and improved review usability, it did not produce executable artefacts. The framework demonstrated interactive latency (~1.9s) suitable for integration withtools like Gerrit. This thesis demonstrates that a RAG-based approach can automate and improve ARXML review by embedding structured domain knowledge into AI feedback. Allthough the system currently targets AUTOSAR Classic R23-11, its modular architecture is adaptable to other structured formats such as YAML or JSON and applicable to regulated domains like aerospace and medical devices. Future work should address traceability, integration with live review systems, and broader generalization across standards and organizations.

KTH Publication Database DiVA (KTH Royal Institute of Technology)
Industry, innovation and infrastructure
Openalex Percentile: Top 35%
Plant chemical constituents analysis
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.