Recent work has shown that front-end code generated by Large Language Models (LLMs) can embed deceptive designs. To assess the magnitude of this problem, identify the factors that influence deceptive design production, and test strategies for reducing deceptive designs, we carried out two studies which generated and analyzed 1,296 LLM-generated web components, along with a design rationale for each. The first study tested four LLMs for 15 common ecommerce components. Overall 55.8% of components contained at least one deceptive design, and 30.6% contained two or more. Occurence varied significantly across models, with DeepSeek-V3 producing the fewest. Interface interference emerged as the dominant strategy, using color psychology to influence actions and hiding essential information. The first study found that prompts emphasizing business interests (e.g., increasing sales) significantly increased deceptive designs, so a second study tested a variety of prompting strategies to reduce their frequency, finding a values-centered approach the most effective. Our findings highlight risks in using LLMs for coding and offer recommendations for LLM developers and providers.
翻译:近期研究表明,大型语言模型(LLM)生成的前端代码可能嵌入欺骗性设计。为评估该问题的严重程度、识别影响欺骗性设计产生的因素,并测试减少欺骗性设计的策略,我们开展了两项研究,生成并分析了1,296个LLM生成的网页组件及其对应的设计原理。第一项研究针对15种常见电商组件测试了四种LLM。总体而言,55.8%的组件包含至少一项欺骗性设计,30.6%的组件包含两项及以上。不同模型间的出现率差异显著,其中DeepSeek-V3产生的欺骗性设计最少。界面干扰成为主要策略,通过色彩心理学影响用户行为并隐藏关键信息。第一项研究发现强调商业利益(如提升销量)的提示词会显著增加欺骗性设计,因此第二项研究测试了多种提示策略以降低其出现频率,发现以价值为中心的提示方法最为有效。我们的研究结果揭示了使用LLM进行编码的风险,并为LLM开发者与供应商提供了改进建议。