Skip to main content
QUICK REVIEW

[Paper Review] Can an LLM Detect Instances of Microservice Infrastructure Patterns?

Carlos Eduardo Duarte, Neil B. Harrison|arXiv (Cornell University)|Mar 24, 2026
Software System Performance and ReliabilityComputer Science0 citations
TL;DR

The paper presents MicroPAD, an LLM-based tool that detects microservice infrastructure patterns across multiple languages using natural-language pattern descriptions, evaluated on 190 repositories with GPT-5 Nano.

ABSTRACT

Architectural patterns are frequently found in various software artifacts. The wide variety of patterns and their implementations makes detection challenging with current tools, especially since they often only support detecting patterns in artifacts written in a single language. Large Language Models (LLMs), trained on a diverse range of software artifacts and knowledge, might overcome the limitations of existing approaches. However, their true effectiveness and the factors influencing their performance have not yet been thoroughly examined. To better understand this, we developed MicroPAD. This tool utilizes GPT 5 nano to identify architectural patterns in software artifacts written in any language, based on natural-language pattern descriptions. We used MicroPAD to evaluate an LLM's ability to detect instances of architectural patterns, particularly infrastructure-related microservice patterns. To accomplish this, we selected a set of GitHub repositories and contacted their top contributors to create a new, human-annotated dataset of 190 repositories containing microservice architectural patterns. The results show that MicroPAD was capable of detecting pattern instances across multiple languages and artifact types. The detection performance varied across patterns (F1 scores ranging from 0.09 to 0.70), specifically in relation to their prevalence and the distinctiveness of the artifacts through which they manifest. We also found that patterns associated with recognizable, dominant artifacts were detected more reliably. Whether these findings generalize to other LLMs and tools is a promising direction for future research.

Motivation & Objective

  • Motivate the need for language-agnostic architectural pattern detection across multi-language artifacts.
  • Propose MicroPAD, an LLM-based pipeline that detects microservice infrastructure patterns without language-specific parsers.
  • Create a human-annotated dataset of repositories labeled with Richardson’s microservice patterns for evaluation.
  • Evaluate detection performance across patterns and analyze factors affecting success such as artifact prevalence and distinctiveness.

Proposed method

  • Develop Pattern Profiles from natural-language pattern descriptions and example instances.
  • Use a multi-phase pipeline (Pattern Profile creation, file-path determination, pattern detection) with LLM reasoning traces.
  • Prioritize files for analysis using embeddings and keyword matching to manage large codebases.
  • Obtain ground truth via questionnaire surveys of repository top contributors and compute precision, recall, accuracy, and F1.
  • Introduce the File Dominance Index (FDI) to analyze artifact influence on detection performance.
  • Report results using a confusion matrix and pattern-wise metrics across nine Richardson patterns.

Experimental results

Research questions

  • RQ1RQ1: What is the detection performance of a language-agnostic, LLM-based approach to detect microservice infrastructure pattern instances in software artifacts?
  • RQ2RQ2: How do the artifacts in software repositories impact the ability of an LLM-based approach to detect microservice infrastructure pattern instances?

Key findings

  • MicroPAD achieves 79.5% accuracy, 49.6% precision, 32.8% recall, and an F1 score of 39.5% across nine patterns.
  • F1 scores range from 0.70 (Service Instance Per Container) to 0.09 (3rd Party Registration).
  • There is a strong positive correlation (r = 0.74) between pattern prevalence and F1 score.
  • Patterns with dominant artifacts (e.g., Docker, Terraform, Kubernetes related) show higher detection performance (FDI correlates with FDI).
  • Top analysis artifacts vary by pattern; some patterns lack dominant files and show low F1 scores (e.g., Service Registry).
  • A strong positive correlation (r = 0.83) exists between F1 scores and the maximum File Dominance Index (FDI) per pattern.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.