Closed hchiam closed 9 months ago
brainstormed possible vulnerabilities using ChatGPT, and came up with something along the lines of:
consider a while loop to regenerate the random number to make sure it doesn't exist in the userPrompt
userPrompt
https://github.com/hchiam/learning-prompt-eng/blob/main/example_prompts/helpers/antiIgnoreInstructions.js
(but this might hopefully get mitigated with the new ChatGPT setup where you have a separate input box for user input)
(aside: in a more complex app, consider encoding the input just like you would for untrusted HTML/JS code)
there's settings in things like the messages object in gpt-4 apis and to me it seems still valid to use my extension of the random wrapper method (aka random sequence enclosure)
messages
brainstormed possible vulnerabilities using ChatGPT, and came up with something along the lines of:
consider a while loop to regenerate the random number to make sure it doesn't exist in the
userPrompt
https://github.com/hchiam/learning-prompt-eng/blob/main/example_prompts/helpers/antiIgnoreInstructions.js
(but this might hopefully get mitigated with the new ChatGPT setup where you have a separate input box for user input)
(aside: in a more complex app, consider encoding the input just like you would for untrusted HTML/JS code)