修改提示词的蝴蝶效应:微小变化与越狱如何影响大型语言模型性能
The Butterfly Effect of Altering Prompts: How Small Changes and Jailbreaks Affect Large Language Model Performance
AI总结:
本文研究提示词构造差异对 LLM 分类决策的影响,通过多类文本分类任务中的提示变体实验,证明末尾空格、XML 输出要求及常用越狱均可显著改变模型答案并破坏标注质量。
摘要:
大型语言模型(LLM)目前被广泛用于众多领域和各类任务的数据标注。只需向 LLM 询问答案,即“提示”,从业者便能够利用 LLM 快速获得任意任务的响应。这种提示过程涉及从业者作出的一系列决策,从提示词的简单措辞,到要求以某种数据格式输出,再到在提示涉及更敏感主题时进行越狱。在本研究中,我们提出问题:构建提示词方式的变化是否会改变 LLM 的最终决策?我们通过在多种文本分类任务中采用一系列提示词变体来回答这一问题。我们发现,即使是最微小的扰动,例如在提示词末尾添加一个空格,也可能导致 LLM 改变其答案。此外,我们发现,要求以 XML 格式响应以及常用的越狱手段,可能对 LLM 标注的数据造成灾难性影响。
英文摘要:
Large Language Models (LLMs) are regularly being used to label data across many domains and for myriad tasks. By simply asking the LLM for an answer, or ``prompting,'' practitioners are able to use LLMs to quickly get a response for an arbitrary task. This prompting is done through a series of decisions by the practitioner, from simple wording of the prompt, to requesting the output in a certain data format, to jailbreaking in the case of prompts that address more sensitive topics. In this work, we ask: do variations in the way a prompt is constructed change the ultimate decision of the LLM? We answer this using a series of prompt variations across a variety of text classification tasks. We find that even the smallest of perturbations, such as adding a space at the end of a prompt, can cause the LLM to change its answer. Further, we find that requesting responses in XML and commonly used jailbreaks can have cataclysmic effects on the data labeled by LLMs.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。