Requirements extraction and modeling are critical phases in software development, which have a direct impact on design quality and alignment with stakeholder needs. The integration of Retrieval-Augmented Generation (RAG) techniques with Large Language Models (LLMs) enables the automation and optimization of requirement analysis, improving information consistency and traceability. This paper explores how the RAG paradigm can be used for automatic requirement extraction and UML diagram generation. In particular, it focuses on use case and sequence diagrams. We analyze the advantages and challenges of this methodology, with a particular focus on model accuracy. We present a practical implementation using RAG and LLM to support requirements engineering, highlighting the achieved results and future research directions. The presented case study has been provided by the Italian Ministry of Justice, through the Direzione Generale per i Sistemi Informativi Automatizzati.
Requirements Extraction, Definition, and Design Using Retrieval Augmented Generation and Large Language Models
Di Martino B.;D'Angelo S.;Esposito A.;Branco D.;
2025
Abstract
Requirements extraction and modeling are critical phases in software development, which have a direct impact on design quality and alignment with stakeholder needs. The integration of Retrieval-Augmented Generation (RAG) techniques with Large Language Models (LLMs) enables the automation and optimization of requirement analysis, improving information consistency and traceability. This paper explores how the RAG paradigm can be used for automatic requirement extraction and UML diagram generation. In particular, it focuses on use case and sequence diagrams. We analyze the advantages and challenges of this methodology, with a particular focus on model accuracy. We present a practical implementation using RAG and LLM to support requirements engineering, highlighting the achieved results and future research directions. The presented case study has been provided by the Italian Ministry of Justice, through the Direzione Generale per i Sistemi Informativi Automatizzati.I documenti in IRIS sono protetti da copyright e tutti i diritti sono riservati, salvo diversa indicazione.


