arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2509.13680cs.SEcs.AI
收藏

Code LLMs中的提示稳定性:跨情感与人格驱动变化的敏感性测量

Prompt Stability in Code LLMs: Measuring Sensitivity across Emotion- and Personality-Driven Variations

Singapore Management University(新加坡国立大学);Capital Normal University(首都师范大学);Nanyang Technological University(南洋理工大学)

Wei Ma, Yixiao Yang, Jingquan Ge, Xiaofei Xie, Lingxiao Jiang

AI总结:

本文提出PromptSE框架,通过情绪和人格模板生成语义等价的提示变体,评估14个Code LLM模型的提示稳定性,揭示性能与稳定性解耦的特性,为模型选择和部署提供补充评估维度。

摘要:

代码生成模型在软件开发中被广泛使用,但它们对提示措辞的敏感性仍未得到充分研究。用不同情绪或沟通风格表达的相同需求可能会产生不同的输出,而大多数基准测试仅强调峰值性能。我们提出了PromptSE(Prompt Sensitivity Evaluation),这是一个通过情绪和人格模板创建语义等价提示变体的框架,并使用概率感知的连续评分或在logits不可用时使用二元通过率来评估稳定性。结果被聚合为提出的曲线下面积指标(AUC-E),用于跨模型比较。在来自三个家族(Llama、Qwen和DeepSeek)的14个模型中,我们的研究表明性能和稳定性在很大程度上表现为解耦的优化目标,并揭示了与架构和规模相关的模式,这些模式挑战了关于模型鲁棒性的常见假设。该框架支持对闭源模型的快速筛选以及研究环境中的详细稳定性分析。PromptSE使从业者能够量化部署和模型选择的性能-稳定性权衡,将提示稳定性定位为与性能和公平性并列的补充评估维度,并为更可信的AI辅助软件开发工具做出贡献。

英文摘要:

Code generation models are widely used in software development, yet their sensitivity to prompt phrasing remains under-examined. Identical requirements expressed with different emotions or communication styles can yield divergent outputs, while most benchmarks emphasize only peak performance. We present PromptSE (Prompt Sensitivity Evaluation), a framework that creates semantically equivalent prompt variants with emotion and personality templates, and that evaluates stability using probability aware continuous scoring or using binary pass rates when logits are unavailable. The results are aggregated into a proposed area under curve metric (AUC-E) for cross model comparison. Across 14 models from three families (Llama, Qwen, and DeepSeek), our study shows that performance and stability behave as largely decoupled optimization objectives, and it reveals architectural and scale related patterns that challenge common assumptions about model robustness. The framework supports rapid screening for closed-source models as well as detailed stability analysis in research settings. PromptSE enables practitioners to quantify performance stability trade offs for deployment and model selection, positioning prompt stability as a complementary evaluation dimension alongside performance and fairness, and contributing to more trustworthy AI-assisted software development tools.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑