Are LLMs Ready for Anti-Pattern Detection in Microservice Architectures?

📅 2026-06-25
📈 Citations: 0
Influential: 0
📄 PDF
🤖 AI Summary
This study addresses the challenge of detecting antipatterns in microservice architectures, which adversely impact system maintainability and runtime quality. Existing approaches rely on static analysis and handcrafted rules, exhibiting limited generalizability. To overcome these limitations, this work presents the first systematic evaluation of general-purpose large language models (LLMs) for antipattern detection, introducing a prompt-engineering-based detection pipeline. The authors compare LLM performance against MARS, a state-of-the-art detection tool, under a unified evaluation protocol using a microservice dataset annotated with 16 antipattern types, assessed via precision and recall metrics. Results demonstrate that LLMs excel at identifying localized, heterogeneous, or semantically rich antipatterns, yet underperform compared to static analysis tools when antipatterns require explicit structural knowledge or cross-service dependency reasoning.
📝 Abstract
Microservice systems are prone to recurrent architectural anti-patterns (APs) that hinder maintainability, evolvability, and operational quality. Most existing AP detection approaches rely on static analysis and handcrafted rules, which can be effective but are often tool-dependent, limited to explicitly encoded detection logic, and difficult to adapt to heterogeneous repositories. In this paper, we investigate whether large language models (LLMs) are ready to support architectural anti-pattern detection in microservice architectures through a prompt-based analysis pipeline over static repository artifacts. We evaluate three general-purpose LLMs on a curated benchmark of microservice repositories annotated with 16 architectural anti-patterns, and compare their performance against the state-of-the-art static-analysis tool MARS using a uniform evaluation protocol based on precision and recall. Our results show that LLMs can provide useful support for anti-pattern detection, achieving competitive performance on several anti-patterns, especially when the relevant evidence is local, heterogeneous, or semantically rich. At the same time, they exhibit clear limitations on anti-patterns that require explicit structural or cross-service dependency evidence, where static analysis remains more reliable. These findings suggest that LLMs are not yet a replacement for traditional analyzers, but already represent a promising complementary aid for architectural assessment in microservice systems.
Problem

Research questions and friction points this paper is trying to address.

microservice architectures
architectural anti-patterns
anti-pattern detection
static analysis
software maintainability
Innovation

Methods, ideas, or system contributions that make the work stand out.

large language models
architectural anti-patterns
microservice architectures
prompt-based analysis
static repository artifacts
🔎 Similar Papers
No similar papers found.