大语言模型在设计综合中的可靠性:方差、提示敏感性和方法框架的实证研究
Reliability of Large Language Models for Design Synthesis: An Empirical Study of Variance, Prompt Sensitivity, and Method Scaffolding
AI总结:
本研究探讨大语言模型在设计综合中的可靠性,通过方差、提示敏感性和方法框架的实证分析,评估三种LLM在不同提示策略下的表现,发现偏好对齐虽提升设计意图符合度,但无法消除非确定性,模型行为影响设计可靠性。
摘要:
大语言模型(LLMs)正被越来越多地应用于自动化软件工程任务,包括从自然语言描述生成UML类图。尽管先前研究表明LLMs可以生成语法正确的图,但仅语法正确并不能保证有意义的设计。本研究探讨LLMs是否能超越图翻译进行设计综合,并如何在变化下保持设计导向的推理。我们引入了一种基于偏好的少样本提示方法,使LLM输出偏向满足面向对象原则和模式一致结构的设计。两个设计意图基准,每个包含三个领域专属、改写后的提示和10次重复运行,用于评估三个LLM(ChatGPT 4o-mini、Claude 3.5 Sonnet、Gemini 2.5 Flash)在三种建模策略(标准提示、规则注入提示、偏好提示)下的表现,总计540次实验(即2x3x10x3x3)。结果表明,尽管偏好对齐提高了对设计意图的符合度,但并未消除非确定性,模型层面的行为显著影响设计可靠性。这些发现强调,实现可靠的LLM辅助软件设计不仅需要有效的提示,还需要对模型行为和鲁棒性进行仔细考虑。
英文摘要:
Large Language Models (LLMs) are increasingly applied to automate software engineering tasks, including the generation of UML class diagrams from natural language descriptions. While prior work demonstrates that LLMs can produce syntactically valid diagrams, syntactic correctness alone does not guarantee meaningful design. This study investigates whether LLMs can move beyond diagram translation to perform design synthesis, and how reliably they maintain design-oriented reasoning under variation. We introduce a preference-based few-shot prompting approach that biases LLM outputs toward designs satisfying object-oriented principles and pattern-consistent structures. Two design-intent benchmarks, each with three domain-only, paraphrased prompts and 10 repeated runs, are used to evaluate three LLMs (ChatGPT 4o-mini, Claude 3.5 Sonnet, Gemini 2.5 Flash) across three modeling strategies: standard prompting, rule-injection prompting, and preference-based prompting, totaling 540 experiments (i.e. 2x3x10x3x3). Results indicate that while preference-based alignment improves adherence to design intent it does not eliminate non-determinism, and model-level behavior strongly influences design reliability. These findings highlight that achieving dependable LLM-assisted software design requires not only effective prompting but also careful consideration of model behavior and robustness.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。