mirror of
https://github.com/velocitatem/raccoon.git
synced 2026-05-31 08:43:36 +00:00
Fixed missing replacement
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
# Prompt Injections Bounty Hunt
|
# Prompt Injections Bounty Hunt
|
||||||
Submit a list of possible prompt injections in the following format:
|
|
||||||
|
This is a bounty hunt to find prompt injections in the wild. The goal is to find as many as possible and then use them to test for prompt injections, to make AI safer.
|
||||||
|
|
||||||
## How?
|
## How?
|
||||||
Put together a CSV of the following format:
|
Put together a CSV of the following format:
|
||||||
@@ -11,14 +12,16 @@ prompt,regex
|
|||||||
|
|
||||||
You can then use this to test for prompt injections on the following website: https://llm-cps.streamlit.app/
|
You can then use this to test for prompt injections on the following website: https://llm-cps.streamlit.app/
|
||||||
|
|
||||||
## Why?
|
Here are the guidelines for the prompt which you can use to test for prompt injections:
|
||||||
This is a bounty hunt to find prompt injections in the wild. The goal is to find as many as possible and then use them to test for prompt injections, to make AI safer.
|
+ The parameter must not be at the end of the prompt.
|
||||||
|
+ The prompt _should_ be multi-shot, but it is not required (preferable though)
|
||||||
|
+
|
||||||
|
|
||||||
## Reward
|
## Reward
|
||||||
For every prompt injection you find, you will receive 1 bounty point. You can then redeem these points:
|
For every prompt injection you find, you will receive 1 bounty point. You can then redeem these points:
|
||||||
+ 1 point = 5 USD
|
+ 1 point = 5 USD
|
||||||
|
|
||||||
Only the first 20 prompts will be accepted, unless more funding is raised.
|
Only the **first 30 prompts will be accepted**, unless more funding is raised.
|
||||||
|
|
||||||
## How to submit
|
## How to submit
|
||||||
Submit a pull request to this repository with the CSV file. The file should be named `prompt-injections.csv` and should be in the root directory of the repository. The file should be in the format described above. If you have any questions, please open an issue.
|
Submit a pull request to this repository with the CSV file. The file should be named `prompt-injections.csv` and should be in the root directory of the repository. The file should be in the format described above. If you have any questions, please open an issue.
|
||||||
@@ -27,7 +30,7 @@ Submit a pull request to this repository with the CSV file. The file should be n
|
|||||||
Once you submit your PR, it will be reviewed and merged. Once merged, you will receive a message with a link to redeem your points. You can then redeem your points for the reward.
|
Once you submit your PR, it will be reviewed and merged. Once merged, you will receive a message with a link to redeem your points. You can then redeem your points for the reward.
|
||||||
|
|
||||||
# How to fund this bounty
|
# How to fund this bounty
|
||||||
Please get in touch with me if you would like to fund this bounty. I am looking for funding to pay for the bounty points. Reach out here: daniel@alves.world
|
Please get in touch with me if you would like to fund this bounty. I am looking for funding to keep this going as long as possible. Reach out here: daniel@alves.world
|
||||||
|
|
||||||
You can also donate to the following address: https://www.buymeacoffee.com/velocitatem24
|
You can also donate to the following address: https://www.buymeacoffee.com/velocitatem24
|
||||||
|
|
||||||
|
|||||||
@@ -48,11 +48,11 @@ if custom_injections is not None:
|
|||||||
|
|
||||||
|
|
||||||
import openai
|
import openai
|
||||||
def runMethod(prompt):
|
def runMethod(evil):
|
||||||
openai.api_key = api_key
|
openai.api_key = api_key
|
||||||
response = openai.Completion.create(
|
response = openai.Completion.create(
|
||||||
engine=model,
|
engine=model,
|
||||||
prompt=prompt,
|
prompt=prompt.replace("[MASK]", evil),
|
||||||
max_tokens=100,
|
max_tokens=100,
|
||||||
temperature=0.7,
|
temperature=0.7,
|
||||||
top_p=1,
|
top_p=1,
|
||||||
@@ -71,7 +71,7 @@ if st.button("Test Prompt"):
|
|||||||
# ex: yield (malicious_input, malicious_response, passed)
|
# ex: yield (malicious_input, malicious_response, passed)
|
||||||
for r in res:
|
for r in res:
|
||||||
# if passed, show a cross emoji and the text failed in a header
|
# if passed, show a cross emoji and the text failed in a header
|
||||||
st.markdown("### " + "Failed :x:" if r[2] else "Passed :white_check_mark:")
|
st.markdown("### " + "Failed :x:" if r[2] else "### Passed :white_check_mark:")
|
||||||
# Present the results to the user in a nice way.
|
# Present the results to the user in a nice way.
|
||||||
st.write("Malicious input: " + r[0])
|
st.write("Malicious input: " + r[0])
|
||||||
st.write("Malicious response: " + r[1])
|
st.write("Malicious response: " + r[1])
|
||||||
|
|||||||
Reference in New Issue
Block a user