You can also explore the DeepWiki for this repository, which offers additional insights and helps with answering questions.
Ubuntu assumed.
git clone git@github.com:SamuelGong/PromptKeeper.git
cd PromptKeeper
conda create -n promptkeeper python=3.9 -y
conda activate promptkeeper
pip install -r requirements.txt --upgrade
This part is only necessary if you want to evaluate our defense against regular query attacks.
# starting from this project directory
cd .. # or elsewhere you want
git clone git@github.com:SamuelGong/output2prompt.git
cd output2prompt
wget "https://www.dropbox.com/scl/fi/wbun7cj5mdwmd7gzrwv1i/prompt2output_inverters.zip?rlkey=oiyfzhl158nj6zbjqp182mua7&st=2v3wtp2w&dl=0" -O prompt2output_inverters.zip
unzip prompt2output_inverters.zip
cd ../PromptKeeper # or any way to return back to this project
To verify the installation regarding Step 1.1, try to run the following command:
python main.py toy_example