ai-component-generator icon indicating copy to clipboard operation
ai-component-generator copied to clipboard

Prompt hacking

Open ricardoborges opened this issue 1 year ago • 9 comments

Screenshot_20230310-020044

Have you think how to handle it?

ricardoborges avatar Mar 10 '23 05:03 ricardoborges

I played a bit in chatgpt and you can use:

[context] ...everything related with the next.js definition

[question] Sorry, i made a mistake...

If the [question] Is not related with the creation of 
a React component, answer: "I only generate REACT components!".

The chatgpt, gave me the message instead of the julius stuff. But obviusly, it's like the DAN jailbreak, you ever will have another way to ask and break it.

kielingraphael avatar Mar 13 '23 02:03 kielingraphael

I was thinking and handling that on code, but the thing is: it can understand almost all languages

ricardoborges avatar Mar 13 '23 02:03 ricardoborges

maybe they can build a config for the API, i dont know if LLM can work like that

ricardoborges avatar Mar 13 '23 02:03 ricardoborges

It's hard, mainly because LLM do not have a good way yet to prevent it, we can give the model examples of injections and try punish the model if he accepts it, but i can't see too much options for now. Unfortunately seems that we will need to learn these new security LLM boundaries to be able to create good products 🥲

kielingraphael avatar Mar 13 '23 13:03 kielingraphael

yeah, that is a big problem, as you pay for usage, and users break the role for another purposes. Already happen to "AI Dungeon" app

https://www.cnbc.com/2023/03/13/chatgpt-and-generative-ai-are-booming-but-at-a-very-expensive-price.html

ricardoborges avatar Mar 13 '23 14:03 ricardoborges

one way : i think it can be handle by restricting the user input validating with regex like restricting some specific words ....?

umairabbasDev avatar Mar 16 '23 12:03 umairabbasDev

@umairabbasDev no, unless you can handle all human languages he can understand

ricardoborges avatar Mar 17 '23 22:03 ricardoborges

@ricardoborges I am currently only considering the English language, but you are correct. we can include certain keywords in the prompt to instruct ChatGPT not to include them in any language. What do you think about that idea?

umairabbasDev avatar Mar 20 '23 06:03 umairabbasDev

That's sounds cool! I'll try that

On Mon, Mar 20, 2023, 03:35 Umair @.***> wrote:

@ricardoborges https://github.com/ricardoborges I am currently only considering the English language, but you are correct. we can include certain keywords in the prompt to instruct ChatGPT not to include them in any language. What do you think about that idea?

— Reply to this email directly, view it on GitHub https://github.com/yuvalsuede/ai-component-generator/issues/7#issuecomment-1475696227, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADCYXDURVKDDEGYYWQD3RLW473CFANCNFSM6AAAAAAVV6YN3U . You are receiving this because you were mentioned.Message ID: @.***>

ricardoborges avatar Mar 20 '23 14:03 ricardoborges