It's actually a really interesting problem. I had a vague idea before that it would be neat to make an assistant or something like that, and I had assumed that you could treat the LLM as a black box, and have kind of an orchestrating layer that serialized to and from it, keeping a distinction between "safe" and "unsafe" input. But now I'm seeing that you can't really do that. There's no "parameterized query" equivalent, and the truly immense promise of LLMs often revolves around it digesting data from the outside world.
Prompt injection: what’s the worst that can happen?
51–60 of 213 posts
Re: Prompt injection: what’s the worst that can happen?
#52The core reason (and thus the proper place to fix) for any injection attack is unclear distinction between data and instructions or code. Yes, language models gain flexibility by making it easy to mix instructions and data, and that has value, however if you do want to enforce a distinction you definitely can (and should) do that with out-of-band means, with something that can't possibly be expressed (and thus also o…
I'm not sure it's that simple. The problem is you can't have the system act intelligently[0] on the data at all . If it is allowed to act intelligently on the data then it can be instructed via the data. You could probably get close by training it with a privilege/authority bit but there will always be ways to break out. As far as I am aware there are no machine learning models that generalize with 100% accuracy, in…
Re: Prompt injection: what’s the worst that can happen?
#53Another solution could be to make a system that attempts to recognize malicious input somehow .
Re: Prompt injection: what’s the worst that can happen?
#54I still don't get it. Why would you allow a random person to access an agent that has access to your emails? If the LLM has access to your data you have to limit access to that LLM just like limiting access to a database. Edited to add: Or limit the data access the LLM has when the end user is not you. Edited again: Thanks to the comments below, I now understand. With LLMs as the execution platform that both reads da…
It's just like regular emails: you can always get spam, malware and other trash and when they reach your system they can cause damage. The agent is just a new level on the stack (operating system, email client etc) that can now be compromised by a simple email.
Re: Prompt injection: what’s the worst that can happen?
#55Re: Prompt injection: what’s the worst that can happen?
#56Re: Prompt injection: what’s the worst that can happen?
#57But that's relatively easily to prevent, in the response before returning to the user, check for a string match to your prompt, or chunks of your prompt, or a vector similarity.
Just because it's an "AI" you don't solve everything with it, it's not actually "intelligent", you still write backend code and wrappers.
Re: Prompt injection: what’s the worst that can happen?
#58I still don't get it. Why would you allow a random person to access an agent that has access to your emails? If the LLM has access to your data you have to limit access to that LLM just like limiting access to a database. Edited to add: Or limit the data access the LLM has when the end user is not you. Edited again: Thanks to the comments below, I now understand. With LLMs as the execution platform that both reads da…
You're not allowing a random person access to the agent, you're allowing the agent access to your emails. But since everybody can send you an email, your agent is going to be exposed to a lot of stuff. It's just like regular emails: you can always get spam, malware and other trash and when they reach your system they can cause damage. The agent is just a new level on the stack (operating system, email client etc) tha…
Re: Prompt injection: what’s the worst that can happen?
#59" prompt leak attacks are something you should accept as inevitable: treat your own internal prompts as effectively public data, don’t waste additional time trying to hide them." But that's relatively easily to prevent, in the response before returning to the user, check for a string match to your prompt, or chunks of your prompt, or a vector similarity. Just because it's an "AI" you don't solve everything with it, i…
Seems like an arms race that’s impossible to prevent leaks.