J* E* C* N* U* N* S* ›› 2026, Vol. 2026 ›› Issue (4): 143-153.doi: 10.3969/j.issn.1000-5641.2026.04.015

Previous Articles    

Automatic generation of use case diagrams from product requirement documents using large language models

Zezheng GONG(), Fuke SHEN, Tongquan WEI*()   

  1. School of Computer Science and Technology, East China Normal University, Shanghai 200062, China
  • Received:2025-01-15 Online:2026-07-25 Published:2026-07-18
  • Contact: Tongquan WEI E-mail:51255901046@stu.ecnu.edu.cn;tqwei@cs.ecnu.edu.cn

Abstract:

With the rapid growth of the internet and mobile application industries, agile development has become the preferred approach for product iteration in many organizations. However, as product requirement documents become increasingly complex, the testing process also becomes more complicated, reducing overall development efficiency. To address this challenge, this study investigates the automatic generation of use case diagrams from product requirement documents using large language models. Prompt engineering techniques are employed to optimize the conversion process, enabling the model to accurately understand and extract key information from requirement documents and directly generate use case diagrams that can be readily used by testers. In addition, a comprehensive evaluation framework is developed based on real business scenarios to systematically assess the quality of the generated diagrams. The output format and prompts are further refined through iterative experiments. Experimental results show that the proposed optimization strategy increases the average user adoption rate by 32% and reduces the time required for testers to create test cases by 30%.

Key words: large language models, product requirement documents, prompt engineering, automated testing, test case generation

CLC Number: