跳转至

文章背景与核心概要

随着大语言模型(LLM)在软件工程工作流中的集成度日益加深,理解提示词设计如何改变模型行为变得至关重要。此前的研究主要集中在技术性提示词结构上,而这项研究则探讨了心理学启发的提示词框架(借鉴自 Yukl & Falbe 的人际影响力策略分类,如理性说服、迎合奉承和紧迫感)所产生的影响。

研究人员在 LiveCodeBenchSWE-bench Verified 两个基准测试上评估了五款领先的开源大语言模型,从四个维度对代码生成进行了考核:功能正确性、质量、可维护性以及安全性。实证结果表明,特定的影响力策略——尤其是那些强调紧迫感的策略——会无意中降低代码的正确性并引入安全漏洞。这项工作为软件工程任务中基于影响力诱导的提示词框架提供了首个大规模经验研究,并为设计透明且可解释的人机交互代码生成流程提供了深刻见解。


Do Influence Tactics Matter? Investigating Prompt Framing Effects in LLM Code Generation

Do Influence Tactics Matter? Investigating Prompt Framing Effects in LLM Code Generation


📌 Executive Summary

📌 Executive Summary

As Large Language Models (LLMs) become increasingly integral to software engineering workflows, understanding how prompt design alters their behavior is critical. While previous studies have focused primarily on technical prompt structure, this research investigates the impact of psychologically inspired prompt framings—drawing from Yukl & Falbe's taxonomy of interpersonal influence tactics (such as rational persuasion, ingratiation, and urgency).

Evaluating five leading open-weight LLMs across the LiveCodeBench and SWE-bench Verified benchmarks, the authors assessed code generation across four dimensions: functional correctness, quality, maintainability, and security. The empirical findings reveal that specific influence tactics—notably those invoking urgency—can inadvertently degrade code correctness and introduce security vulnerabilities.


📖 Metadata Overview

📖 Metadata Overview

  • arXiv ID: arXiv:2608.11513 [cs.SE]
  • Authors: Alex Deaconu, Anubhav Gupta, Manaal Basha, Nicholas Haydu, Gema Rodríguez-Pérez
  • Primary Subject: Software Engineering (cs.SE)
  • Secondary Subjects: Artificial Intelligence (cs.AI), Computation and Language (cs.CL)
  • Publication Reference: Empirical Software Engineering 32 (2026) 13
  • Submission Date: August 11, 2026
  • Related DOI: 10.1007/s10664-026-10934-z

📝 Abstract

📝 Abstract

Large Language Models (LLMs) are increasingly integrated into software engineering workflows, helping developers write, debug, test, and maintain code. While prompt wording and structure are known to influence model performance, the impact of psychologically inspired prompt framings remains unexplored. This study investigates whether different psychology-based communication strategies that humans use to persuade or motivate others can lead to more effective prompt framing, which may, in turn, affect LLM behaviour in coding tasks. Drawing on Yukl & Falbe's well-known taxonomy, we operationalized eight influence tactics (like rational persuasion, ingratiation, and exchange) into reproducible prompt templates. These prompt templates were evaluated across five leading open-weight LLMs using two widely adopted benchmarks: LiveCodeBench and SWE-bench Verified. We assessed the resulting code output on four key software quality dimensions: functional correctness, quality, maintainability, and security. Our results show that certain influence-induced prompt framings, particularly those emphasizing urgency, were associated with reduced correctness and security. This work presents the first large-scale empirical study of influence-induced prompt framing in software engineering tasks, offering insights into how linguistic cues may shape LLM outputs. We conclude with practical insights for designing transparent and interpretable human-AI interactions in code generation.


🛠️ Key Contributions & Methodology

🛠️ Key Contributions & Methodology

  1. Psychological Operationalization: Adapted Yukl & Falbe's interpersonal influence tactics taxonomy into structured, reproducible prompt templates for code generation tasks.
  2. Benchmark Evaluation: Tested five open-weight LLMs rigorously utilizing two robust industry benchmarks:
  3. LiveCodeBench
  4. SWE-bench Verified
  5. Multi-Dimensional Assessment: Evaluated generated artifacts across four critical dimensions:
  6. Functional Correctness
  7. Software Quality
  8. Maintainability
  9. Security

🔗 External Resources & Full-Text Access

🔗 External Resources & Full-Text Access