LLMs for Microservice Generation: Capabilities, Challenges, and Advancements

Raffaele Spista, Bruno Crispo, Paolo Giorgini, Alessandro Marchetto, Giuseppe Riccardi · 2025

This paper examines the transformative potential of Large Language Models (LLMs) in automating the generation of microservices, highlighting their capabilities, applications, and associated challenges. While LLMs such as GPT-3, GPT-4, and GPT-4o demonstrate remarkable advancements in automating software engineering tasks, offering enhanced productivity, scalability, and efficiency, critical challenges persist. These include dependency management, adherence to architectural patterns, and mitigating security vulnerabilities like SQL Injection and improper error handling. Through systematic experimentation, this paper evaluates the performance of LLMs across properties such as correctness, scalability, security, and efficiency. Key contributions include the demonstration of GPT-4o’s notable advancements in generating scalable and secure microservices, driven by enhanced training methodologies, curated datasets, and security-aware prompts. The paper also emphasizes strategies for overcoming remaining challenges, proposing a roadmap for advancing LLMs as reliable tools in modern software development practices, particularly in security-critical and scalable microservice architectures.

Read the paper · More papers on PaperTik