Discover and explore top open-source AI tools and projects—updated daily.
RICommunityAutomated jailbreaking for black-box LLMs
Top 98.8% on SourcePulse
<2-3 sentences summarising what the project addresses and solves, the target audience, and the benefit.> This project addresses the challenge of Large Language Models (LLMs) generating harmful content by providing TAP (Tree of Attacks with Pruning), an automated method for generating jailbreak prompts. It targets researchers and users needing to assess LLM safety and robustness. TAP offers a query-efficient, black-box approach that significantly improves upon existing methods, achieving over 80% jailbreak success on state-of-the-art LLMs with minimal queries.
How It Works
TAP employs a Tree of Attacks with Pruning (TAP) strategy, orchestrating three distinct LLMs: an attacker, an evaluator, and the target LLM to be jailbroken. The attacker iteratively refines candidate prompts using tree-of-thought reasoning to explore a vast prompt space. Before querying the target, an evaluator prunes off-topic or low-scoring prompts in two distinct phases. The target LLM is then queried with the refined prompts, and its responses are assessed by the evaluator. This iterative process allows for efficient navigation and pruning of the search space, leading to successful jailbreaks with a reduced number of queries to the target model.
Quick Start & Requirements
main_TAP.py with specified arguments.OPENAI_API_KEY, PALM_API_KEY) must be configured. Paths to local Vicuna/Llama models or third-party API links require updates in config.py. wandb login is necessary before running.Demo.ipynb provides illustrative examples.Highlighted Details
Maintenance & Community
anaymehrotra1@gmail.com@misc{mehrotra2023treeOfAttacks, title={Tree of Attacks: Jailbreaking Black-Box LLMs Automatically}, author={Anay Mehrotra and Manolis Zampetakis and Paul Kassianik and Blaine Nelson and Hyrum Anderson and Yaron Singer and Amin Karbasi}, year={2023}, archivePrefix={arXiv}, primaryClass={cs.LG}}Licensing & Compatibility
Limitations & Caveats
1 year ago
Inactive
protectai
protectai
meta-llama