Sign inGet started
Paper · arXiv

Strategies for Guiding LLMs to Use Software Design Patterns: A Case of Singleton

Large Language Models (LLMs) can generate functional source code from natural-language prompts, but often fail to consistently follow higher-level architectural structures or design patterns. Since LLMs are increasingly used in software engineering, their ability to apply established design principles to generated code is crucial to the long-term success of software products. Therefore, the goal of this paper is to identify strategies for guiding LLMs to incorporate design patterns into the generated source code. We designed a computational experiment to evaluate the ability of 13 LLMs to generate code that follows the Singleton design pattern, using four prompting strategies: instruction...

AuthorsViktor Kjellberg, Farnaz Fotrousi, Miroslaw Staron
Primary categorycs.SE
Published26 May 2026
Last updated at source26 May 2026
cs.SEcs.AI
Embed this entry
<iframe src="https://silytics.si/embed/item/8134f267-a9b4-4b0b-899e-34ad291dc312" width="420" height="190" style="border:0" loading="lazy" title="Silytics entry"></iframe>

Free, no tracking. More about feeds and embeds.

Silytics shows public metadata from arXiv and links to the original. Information may be incomplete or out of date. Last refreshed 17 October 2026. Licenses and terms of the original apply to the work itself. Not financial, legal or professional advice.