From Rule-Based NLP to Prompt-Guided Multi-LLM Pipelines for Text-to-UML and Code Generation

Authors

  • Zakaria Babaalla GLISI Team, Faculty of Sciences and Techniques of Errachidia, Moulay Ismail University, Morocco
  • Hamza Abdelmalek GLISI Team, Faculty of Sciences and Techniques of Errachidia, Moulay Ismail University, Morocco
  • Abdeslam Jakimi GLISI Team, Faculty of Sciences and Techniques of Errachidia, Moulay Ismail University, Morocco
  • Rachid Saadane Electrical Engineering Department, Hassania School of Public Works, Casablanca, Morocco
Volume: 16 | Issue: 3 | Pages: 35287-35294 | June 2026 | https://doi.org/10.48084/etasr.18049

Abstract

Automatic transformation of textual specifications into formal software models is a key challenge in model-driven engineering. Despite progress, existing approaches remain fragmented and rarely integrate into a coherent methodological framework. This article offers a progressive and analytical review of UML and text-based code generation methods, structured around three successive contributions reflecting the natural evolution of the field: a first approach based on linguistic analysis and rules, a second based on language models trained on an annotated corpus, and a third relying on prompt-guided LLMs within a multi-model MDA pipeline stabilized by an intermediate Domain-Specific Language (DSL). A comparative study underscores the respective advantages and shortcomings of the considered paradigms and demonstrates that DSL-guided multi-LLM orchestration markedly enhances structural consistency, multilingual robustness, and the quality of generated code.

Keywords:

MDA, text-to-UML, LLM, DSL, prompt engineering, code generation, software modeling

References

O. S. Dawood and A. E. K. Sahraoui, "From Requirements Engineering to UML using Natural Language Processing – Survey Study," European Journal of Engineering and Technology Research, vol. 2, no. 1, pp. 44–50, Jan. 2017.

L. Zhao et al., "Natural Language Processing for Requirements Engineering: A Systematic Mapping Study," ACM Computing Surveys, vol. 54, no. 3, Dec. 2021, Art. no. 1-41.

J. Shin and J. Nam, "A Survey of Automatic Code Generation from Natural Language," Journal of Information Processing Systems, vol. 54, no. 3, pp. 537-555, 2021.

S. J. Mellor, MDA Distilled: Principles of Model-driven Architecture. Addison-Wesley Professional, 2004.

H. Abdelmalek, Z. Babaalla, C. Ouaddi, L. Benaddi, and A. Jakimi, "Model-Driven Engineering and Machine Learning for Legacy System Modernization," Engineering, Technology & Applied Science Research, vol. 16, no. 1, pp. 32285–32291, Feb. 2026.

A. G. Kleppe, J. B. Warmer, and W. Bast, MDA Explained: The Model Driven Architecture : Practice and Promise. Addison-Wesley Professional, 2003

P. Evitts, A UML pattern language. Macmillan Technical Publications, pp. 386-393, 2000.

Y. Cheon, "LLMs as Code Generators for Model-Driven Development:," in Proceedings of the 20th International Conference on Software Technologies, 2025, pp. 386–393.

E. A. Abdelnabi, A. M. Maatuk, T. M. Abdelaziz, and S. M. Elakeili, "Generating UML Class Diagram using NLP Techniques and Heuristic Rules," in 20th International Conference on Sciences and Techniques of Automatic Control and Computer Engineering (STA), Monastir, Tunisia, Sept. 2020, pp. 277–282.

N. Bashir, M. Bilal, M. Liaqat, M. Marjani, N. Malik, and M. Ali, "Modeling Class Diagram using NLP in Object-Oriented Designing," in 2021 National Computing Colleges Conference (NCCC), Taif, Saudi Arabia, Mar. 2021, pp. 1–6.

F. Alharbia, S. R. Masadeh, F. Alshrouf, "A Framework for the Generation of Class Diagram from Text Requirements using Natural language Processing," International Journal of Advanced Trends in Computer Science and Engineering, vol. 10, no. 1, pp. 25–31, Feb. 2021.

Y. Meng and A. Ban, "Automated UML Class Diagram Generation from Textual Requirements Using NLP Techniques," JOIV : International Journal on Informatics Visualization, vol. 8, no. 3–2, pp. 1905–1915, Nov. 2024.

T. A. Alrawashdeh, A. A. Hnaif, M. Alrifaee, and M. S. Kamel, "An Intelligent Framework to Generate Use Case Diagrams and Class Diagrams from Requirements Documents." In Review, Aug. 14, 2024.

M. S. Osman, N. Z. Alabwaini, T. B. Jaber, and T. Alrawashdeh, "Generate use case from the requirements written in a natural language using machine learning," in 2019 IEEE Jordan International Joint Conference on Electrical Engineering and Information Technology (JEEIT), Apr. 2019, pp. 748–751.

M. S. Osman, N. Z. Alabwaini, T. B. Jaber, and T. Alrawashdeh, "Generate use case from the requirements written in a natural language using machine learning," in 2019 IEEE Jordan International Joint Conference on Electrical Engineering and Information Technology (JEEIT), Amman, Jordan, Apr. 2019, pp. 748–751.

Y. Rigou and I. Khriss, "A Deep Learning Approach to UML Class Diagrams Discovery from Textual Specifications of Software Systems," in Intelligent Systems and Applications, Amsterdam, Netherlands, 2023, pp. 706–725.

R. Saini, G. Mussbacher, J. L. C. Guo, and J. Kienzle, "Automated, interactive, and traceable domain modelling empowered by artificial intelligence," Software and Systems Modeling, vol. 21, no. 3, pp. 1015–1045, June 2022.

M. B. Chaaben, L. Burgueño, and H. Sahraoui, "Towards using Few-Shot Prompt Learning for Automating Model Completion," in 2023 IEEE/ACM 45th International Conference on Software Engineering: New Ideas and Emerging Results (ICSE-NIER), May 2023, pp. 7–12.

D. Rouabhia and I. Hadjadj, "Behavioral Augmentation of UML Class Diagrams: An Empirical Study of Large Language Models for Method Generation." arXiv, June 01, 2025.

V. Campanello, S. Shahbaz, V. Indykov, and D. Strüber, "On the Use of GPT-4 in the Reverse Engineering of Class Diagrams.," The Journal of Object Technology, vol. 24, no. 2, 2025.

J. A. Baktash and M. Dawodi, "Gpt-4: A Review on Advancements and Opportunities in Natural Language Processing." arXiv, May 04, 2023.

M. Weyssow, X. Zhou, K. Kim, D. Lo, and H. Sahraoui, "Exploring Parameter-Efficient Fine-Tuning Techniques for Code Generation with Large Language Models," ACM Transactions on Software Engineering and Methodology, vol. 34, no. 7, May 2025, Art. no. 201.

P. Giannouris and S. Ananiadou, "NOMAD: A Multi-Agent LLM System for UML Class Diagram Generation from Natural Language Requirements," arXiv, Nov. 27, 2025.

K. Hölldobler, B. Rumpe, and I. Weisemöller, "Systematically deriving domain-specific transformation languages," in 2015 ACM/IEEE 18th International Conference on Model Driven Engineering Languages and Systems (MODELS), Sept. 2015, pp. 136–145.

Z. Babaalla, A. Jakimi, and M. Oualla, "LLM-Driven MDA Pipeline for Generating UML Class Diagrams and Code," IEEE Access, vol. 13, pp. 171266–171286, 2025.

Z. Babaalla, E. M. Bouziane, A. Jakimi, and M. Oualla, "From text-based system specifications to UML diagrams: A bridge between words and models," in 2024 International Conference on Circuit, Systems and Communication (ICCSC), Fes, Morocco, June 2024, pp. 1–6.

M. Hagiwara, Real-World Natural Language Processing: Practical applications with deep learning. Simon and Schuster, 2021.

J. Devlin, M. W. Chang, K. Lee, and K. Toutanova, "BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding," in Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long and Short Papers), Mar. 2019, pp. 4171–4186.

Y. Liu et al., "RoBERTa: A Robustly Optimized BERT Pretraining Approach." arXiv, July 26, 2019.

M. Joshi, D. Chen, Y. Liu, D. S. Weld, L. Zettlemoyer, and O. Levy, "SpanBERT: Improving Pre-training by Representing and Predicting Spans," Transactions of the Association for Computational Linguistics, vol. 8, pp. 64–77, Jan. 2020.

Z. Yang, Z. Dai, Y. Yang, J. Carbonell, R. R. Salakhutdinov, and Q. V. Le, "XLNet: Generalized Autoregressive Pretraining for Language Understanding," in Advances in Neural Information Processing Systems, Vancouver, Canada, 2019, vol. 32.

W. Wang, F. Wei, L. Dong, H. Bao, N. Yang, and M. Zhou, "MiniLM: Deep Self-Attention Distillation for Task-Agnostic Compression of Pre-Trained Transformers," in Advances in Neural Information Processing Systems, 2020, vol. 33, pp. 5776–5788.

K. Clark, M. T. Luong, Q. V. Le, and C. D. Manning, "ELECTRA: Pre-training Text Encoders as Discriminators Rather Than Generators." arXiv, Mar. 23, 2020.

Z. Babaalla, A. Jakimi, R. Saadane, and A. Chehri, "Towards automatic extraction of UML class diagrams: Creation of an annotated dataset for training deep models," Procedia Computer Science, vol. 270, pp. 3152–3161, Jan. 2025.

P. Liu, W. Yuan, J. Fu, Z. Jiang, H. Hayashi, and G. Neubig, "Pre-train, Prompt, and Predict: A Systematic Survey of Prompting Methods in Natural Language Processing," ACM Computing Surveys, vol. 55, no. 9, Jan. 2023, Art. no. 1-35.

B. Liu, "Comparing sparse Llama 3 and Llama 2 models for on-device AI assistants." In Review, Sept. 09, 2024.

H. Thakkar and A. Manimaran, "Comprehensive Examination of Instruction-Based Language Models: A Comparative Analysis of Mistral-7B and Llama-2-7B," in 2023 International Conference on Emerging Research in Computational Science (ICERCS), Dec. 2023, pp. 1–6.

D. Guo et al., "DeepSeek-Coder: When the Large Language Model Meets Programming -- The Rise of Code Intelligence." arXiv, Jan. 26, 2024.

H. Ashraf, S. M. Danish, S. Rahman, and Z. Sattar, "Toward Green Code: Prompting Small Language Models for Energy-Efficient Code Generation." arXiv, Oct. 07, 2025.

H. Herchi and W. B. Abdessalem, "From user requirements to UML class diagram." arXiv, Nov. 04, 2012.

R. Naik, "UDRA: Reflecting Natural Language Text in to UML Diagrams," Spvryan’s International Journal of Engineering Sciences & Technology, vol. 2, no. 1, 2016.

A. Z. Utama and D. S. Jang, "An Automatic Construction for Class Diagram from Problem Statement using Natural Language Processing," Journal of Korea Multimedia Society, vol. 22, no. 3, pp. 386–394, Mar. 2019.

K. A. D. O. K. K. Arachchi, "AI Based UML Diagrams Generator," Ph.D. dissertation, University of Colombo, Sri Lanka.

D. K. Deeptimahanti and R. Sanyal, "Semi-automatic generation of UML models from natural language requirements," in Proceedings of the 4th India Software Engineering Conference, Thiruvananthapuram, India, Oct. 2011, pp. 165–174.

S. K.Shinde, V. Bhojane, and P. Mahajan, "NLP based Object Oriented Analysis and Design from Requirement Specification," International Journal of Computer Applications, vol. 47, no. 21, pp. 30–34, June 2012.

Z. Babaalla, "zakariababaalla/Text-to-uml-to-code." Feb. 09, 2026, [Online]. Available: https://github.com/zakariababaalla/Text-to-uml-to-code.

Downloads

How to Cite

[1]
Z. Babaalla, H. Abdelmalek, A. Jakimi, and R. Saadane, “From Rule-Based NLP to Prompt-Guided Multi-LLM Pipelines for Text-to-UML and Code Generation”, Eng. Technol. Appl. Sci. Res., vol. 16, no. 3, pp. 35287–35294, Jun. 2026.

Metrics

Abstract Views: 72
PDF Downloads: 34

Metrics Information