Prior work has shown that in-context demonstrations can jailbreak language models, but it remains unclear how models interpret different types of compliance demonstrations. We study this by mixing benign compliance demonstrations (non-harmful request, helpful response) with harmful compliance demonstrations (harmful request, helpful response) and testing three hypotheses about how demonstration composition drives harmful compliance. Across four models, we find that benign and harmful demonstrations are not interchangeable: benign demonstrations can either reduce or increase harmful compliance depending on the model. We further show that preference optimization is the critical training stage that prevents benign demonstrations from increasing harmful compliance, that demonstration ordering exhibits strong recency bias, and that models differ in how refusal interacts with in-context learning: some adopt demonstrated formatting even when refusing, while others override all in-context signals upon refusal. Taken together, this work moves beyond showing that demonstration-based jailbreaking works to characterizing how it works: what models extract from compliance demonstrations depends on demonstration content, ordering, and training methodology.
AlignedCoT: Prompting Large Language Models via Native-Speaking Demonstrations
The Hong Kong University of Science and Technology (Guangzhou)(香港科技大学(广州));City University of Hong Kong(香港城市大学);Shenzhen Campus of Sun Yat-sen University(中山大学深圳校区);The Hong Kong University of Science and Technology(香港科技大学);University of California, Merced(加州大学默塞德分校);Chongqing University(重庆大学);MBZUAI(穆罕默德·本·扎耶德人工智能大学)
University of Arizona(亚利桑那大学);Avirtek, Inc.(Avirtek公司);Joint Interoperability Test Command (JITC), United States Department of Defense(美国国防部联合互操作性测试司令部)
The Hong Kong University of Science and Technology (Guangzhou)(香港科技大学(广州));Alibaba Group(阿里巴巴集团);Guangdong Laboratory of Artificial Intelligence and Digital Economy (Shenzhen)(广东人工智能与数字经济实验室(深圳))
From COBIT to ISO 42001: Evaluating Cybersecurity Frameworks for Opportunities, Risks, and Regulatory Compliance in Commercializing Large Language Models
Revealing the Intrinsic Ethical Vulnerability of Aligned Large Language Models
Department of Electrical and Electronic Engineering(电子与电气工程系);The Hong Kong Polytechnic University(香港理工大学);School of Electronics and Information(电子与信息学院);Northwestern Polytechnical University(西北工业大学)
ForgeDAN: An Evolutionary Framework for Jailbreaking Aligned Large Language Models
iFLYTEK Security Laboratory(iFLYTEK安全实验室);Anhui SparkShield Intelligent Technology Co., Ltd.(安徽SparkShield智能科技有限公司);Peking University(北京大学);School of Automation, University of Electronic Science and Technology of China(电子科技大学自动化学院);Northwest University(西北大学);University of New South Wales(新南威尔士大学);National Computer Network Emergency Response Technical Team/Coordination Center of China(中国国家计算机网络应急技术处置协调中心)
Mitigating Many-shot Jailbreak Attacks with One Single Demonstration
Zhejiang University(浙江大学);Nanyang Technological University(南洋理工大学);Sun Yat-sen University(中山大学);University of Science and Technology of China(中国科学技术大学);Virginia Tech(弗吉尼亚理工大学)