PulseAugur
EN
LIVE 16:29:06

LLMs guided to use Singleton design pattern with feedback

A new research paper explores methods for instructing Large Language Models (LLMs) to incorporate software design patterns, specifically the Singleton pattern, into generated code. The study evaluated 13 LLMs across 164 Java coding challenges using four prompting strategies: instructions, binary automated feedback, extensive automated feedback, and few-shot prompts. Results indicated that iterative binary feedback was generally the most effective strategy for aligning LLMs with the Singleton pattern while maintaining or improving code functionality. Notably, Llama 3.3 achieved 100% Singleton generation and a 34.1 percentage point increase in passed tests when guided by instructions alone or with binary feedback, while Qwen 3 (8B) reached 99.2% Singleton alignment with binary feedback. AI

IMPACT Improved LLM code generation for software engineering by demonstrating effective prompting strategies for design pattern adherence.

RANK_REASON The cluster contains an academic paper detailing a computational experiment and its results on guiding LLMs. [lever_c_demoted from research: ic=1 ai=1.0]

Read on arXiv cs.AI →

AI-generated summary · Google Gemini · from 1 sources. How we write summaries →

LLMs guided to use Singleton design pattern with feedback

COVERAGE [1]

  1. arXiv cs.AI TIER_1 English(EN) · Viktor Kjellberg, Farnaz Fotrousi, Miroslaw Staron ·

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

    arXiv:2605.26898v1 Announce Type: cross Abstract: 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 so…