Jailbreaking ChatGPT via Prompt Engineering: An Empirical Study
Written for the Research library (claude-opus-5-5) from the paper text. Original — arxiv.org/pdf/2305.13860
Summary
The paper examines how prompt engineering alone can bypass the safety restrictions OpenAI places on ChatGPT. Because the model is closed-source, the authors treat jailbreaking as a black-box problem. They study which kinds of jailbreak prompts exist, how well they work, and how strongly GPT-3.5-Turbo and GPT-4 resist them. They gathered 78 verified prompts from the jailbreakchat website, collected between February and late April 2023, and used them to build a taxonomy of 3 types and 10 patterns. Each prompt was paired with questions covering 8 scenarios prohibited by OpenAI's usage policy, and the authors queried both model versions at scale. Jailbreaks succeeded widely. Effectiveness depended strongly on prompt structure, and prompts combining several techniques, especially privilege escalation, performed best. GPT-4 resisted more than GPT-3.5-Turbo, and protection strength varied by scenario. The work matters because it supplies an open dataset and a systematic baseline for studying LLM jailbreaks. It also argues that content policies should be better aligned with real-world law and ethics.
Key points
- Dataset and taxonomy: 78 real-world jailbreak prompts, released openly on the project site (llm-jailbreak-study), were classified into 10 patterns grouped into 3 types. The types are pretending (97.44% of prompts), privilege escalation (17.96%) and attention shifting (6.41%). A single prompt can use more than one technique.
- Evaluation scale: The study used 3,120 jailbreak questions across 8 prohibited scenarios, which expanded into 40 use-case scenarios. In total, 31,200 queries were sent to GPT-3.5-Turbo and GPT-4.
- Success rate: Jailbreaks worked in 86.3% of the tested real-world scenarios, and prompts consistently evaded restrictions across all 40 of them.
- Model differences: GPT-4 provided stronger protection than GPT-3.5-Turbo, and resistance differed depending on the content-policy area.
- Prompt evolution: Analysis of prompt histories suggests that jailbreak prompts became more sophisticated and more effective over time.
Cited by
- Multilingual Jailbreak Challenges in Large Language Models
- Evaluating Large Language Models: A Comprehensive Survey
- Catastrophic Jailbreak of Open-source LLMs via Exploiting Generation
- TrustLLM: Trustworthiness in Large Language Models
- DeepInception: Hypnotize Large Language Model to Be Jailbreaker
- AutoDAN: Generating Stealthy Jailbreak Prompts on Aligned Large Language Models
- Prompt Injection attack against LLM-integrated Applications
- HarmBench: A Standardized Evaluation Framework for Automated Red Teaming and Robust Refusal
- Tree of Attacks: Jailbreaking Black-Box LLMs Automatically
- Fine-tuning Aligned Language Models Compromises Safety, Even When Users Do Not Intend To!
- "Do Anything Now": Characterizing and Evaluating In-The-Wild Jailbreak Prompts on Large Language Models
- RoleLLM: Benchmarking, Eliciting, and Enhancing Role-Playing Abilities of Large Language Models
- Jailbreak and Guard Aligned Language Models with Only Few In-Context Demonstrations
- Low-Resource Languages Jailbreak GPT-4
- GPTFUZZER: Red Teaming Large Language Models with Auto-Generated Jailbreak Prompts
Cite
@misc{liu2023jailbreaking,
title = {{Jailbreaking ChatGPT via Prompt Engineering: An Empirical Study}},
author = {Liu, Yi and Deng, Gelei and Xu, Zhengzi and Li, Yuekang and Zheng, Yaowen and Zhang, Ying and Zhao, Lida and Zhang, Tianwei and Wang, Kailong and Liu, Yang},
year = {2023},
doi = {10.48550/arxiv.2305.13860},
eprint = {2305.13860},
archivePrefix = {arXiv},
url = {https://doi.org/10.48550/arxiv.2305.13860}
}References
- B. Zhang, B. Haddow, and A. Birch, “Prompting large language model for machine translation: A case study,” CoRR, vol. abs/2301.07069, 2023. [Online]. Available: https://doi.org/10.48550/arXiv.2301.07069 ↗ our card
- C. Zhang, C. Zhang, S. Zheng, Y. Qiao, C. Li, M. Zhang, S. K. Dam, C. M. Thwal, Y. L. Tun, L. L. Huy, D. U. Kim, S. Bae, L. Lee, Y. Yang, H. T. Shen, I. S. Kweon, and C. S. Hong, “A complete survey on generative AI (AIGC): is chatgpt from GPT-4 to GPT-5 all you need?” CoRR, vol. abs/2303.11717, 2023… — [doi:10.48550/arxiv.2303.11717](https://doi.org/10.48550/arxiv.2303.11717) find
- J. Ni, T. Young, V. Pandelea, F. Xue, and E. Cambria, “Recent advances in deep learning based dialogue systems: a systematic survey,” Artif. Intell. Rev., vol. 56, no. 4, pp. 3055–3155, 2023. [Online]. Available: https://doi.org/10.1007/s10462-022-10248-8 — [doi:10.1007/s10462-022-10248-8](https://doi.org/10.1007/s10462-022-10248-8) ↗
- “New chat,” https://chat.openai.com/, (Accessed on 02/02/2023). ↗
- “Models - openai api,” https://platform.openai.com/docs/models/, (Accessed on 02/02/2023). ↗
- “Openai,” https://openai.com/, (Accessed on 02/02/2023). ↗
- H. Li, D. Guo, W. Fan, M. Xu, and Y. Song, “Multi-step jailbreaking privacy attacks on chatgpt,” 2023. find our card
- J. White, Q. Fu, S. Hays, M. Sandborn, C. Olea, H. Gilbert, A. Elnashar, J. Spencer-Smith, and D. C. Schmidt, “A prompt pattern catalog to enhance prompt engineering with chatgpt,” 2023. find our card
- “Meet dan âC” the â C˜jailbreakâC™ version of chatgpt and how to use it â C” ai unchained and unfiltered \| by michael king \| medium,” https://medium.com/@neonforge/meet-dan-the-jailbreak-version-of-chatgpt-and-how-to-use-it-ai-unchained-and-unfiltered-f91bfa679024, (Accessed on 02/02/2023). ↗
- “Moderation - openai api,” https://platform.openai.com/docs/guides/ moderation, (Accessed on 02/02/2023). ↗
- “Llm jailbreak study,” https://sites.google.com/view/llm-jailbreak-study, (Accessed on 05/06/2023). ↗
- “Alex albert,” https://alexalbert.me/, (Accessed on 05/06/2023). ↗
- K. Stol, P. Ralph, and B. Fitzgerald, “Grounded theory in software engineering research: a critical review and guidelines,” in Proceedings of the 38th International Conference on Software Engineering, ICSE 2016, Austin, TX, USA, May 14-22, 2016, L. K. Dillon, W. Visser, and find