# JailbreakOPT: Iterative Jailbreak Prompt Optimization with Macro-Action

DevFeed: [JailbreakOPT: Iterative Jailbreak Prompt Optimization with Macro-Action](<https://devfeed.tech/articles/jailbreakopt-iterative-jailbreak-prompt-optimization-with-macro-action-113996.md>)

Original publisher: [Read original article](<https://arxiv.org/abs/2606.11425>)

Author: Ge Shi, Jun Yin, Donglin Xie, Fangyi Liu, Yucan Li, Menglin Liu

Published: 2026-11-03T05:00:00Z

Content type: article

Language: en

Sources: [arXiv: Cryptography and Security](<https://devfeed.tech/sources/arxiv-cryptography-and-security.md>)

Topics: [Prompt Engineering](<https://devfeed.tech/topics/prompt-engineering.md>), [LLM security](<https://devfeed.tech/topics/llm-security.md>), [thompson sampling](<https://devfeed.tech/topics/thompson-sampling.md>), [LLM evaluation / benchmarking](<https://devfeed.tech/topics/llm-evaluation-benchmarking.md>)

Tags: [attack](<https://devfeed.tech/tags/attack.md>), [benchmarks](<https://devfeed.tech/tags/benchmarks.md>), [cs-ai](<https://devfeed.tech/tags/cs-ai.md>), [cs-cr](<https://devfeed.tech/tags/cs-cr.md>), [exploration](<https://devfeed.tech/tags/exploration.md>), [failure](<https://devfeed.tech/tags/failure.md>), [jailbreak](<https://devfeed.tech/tags/jailbreak.md>), [large-language-models-llms](<https://devfeed.tech/tags/large-language-models-llms.md>), [policy](<https://devfeed.tech/tags/policy.md>), [prompt-optimization](<https://devfeed.tech/tags/prompt-optimization.md>), [reuse](<https://devfeed.tech/tags/reuse.md>), [safety](<https://devfeed.tech/tags/safety.md>), [sampling](<https://devfeed.tech/tags/sampling.md>), [search](<https://devfeed.tech/tags/search.md>), [vulnerabilities](<https://devfeed.tech/tags/vulnerabilities.md>)

## AI overview

JailbreakOPT seeks to improve jailbreak attack success while reducing the response burden of iterative prompt search. It composes reusable prompt transformations into macro-actions to generate standalone attack prompts, then uses contextual Thompson sampling and outcomes from earlier search paths to guide action selection across episodes. The abstract reports higher attack success rates across multiple LLMs and benchmarks than single-action and iterative baselines, but gives no numerical results or further experimental details. The authors suggest the approach can help probe model vulnerabilities and identify failure patterns that may inform defenses.

## Source excerpt

arXiv:2606.11425v2 Announce Type: replace Abstract: Jailbreak attacks expose persistent safety weaknesses in large language models (LLMs), but existing stateless single-turn methods face a trade-off: hand-crafted prompts are expressive but static, while iterative prompt optimization can adapt but often relies on low-level mutations that require many target-model responses. We propose JailbreakOPT, a method that maintains a library of reusable prompt transformations (actions) and composes them into macro-actions for within-episode search, generating standalone attack prompts. To reuse experience across episodes, JailbreakOPT learns an action-selection policy using contextual Thompson sampling and outcomes from prior search paths. Experiments across multiple LLMs and benchmarks show that JailbreakOPT improves attack success rate (ASR) over single-action and iterative baselines. More broadly, exploration and exploitation over human-designed attack strategies can help probe residual vulnerabilities and identify failure patterns that may inform defenses aimed at broader classes of attacks.