Live data from Hacker News

Prompt Injection as Role Confusion

role-confusion.github.io

111–120 of 129 posts

Re: Prompt Injection as Role Confusion

#112

Isn't the problem that role tags are just part of the input stream? So a specific word in the system prompt becomes the same token as the same word in the user prompt? A clean way to solve this would be to map system prompts to a distinct set of tokens from the ones in user prompts. This would require twice as many possible tokens, so it is probably not feasible. But maybe you could add "color" to the input stream by…

Instead of having distinct tokens, you could have modifier vectors which would be added to other tokens. Think in terms of control, shift, meta etc.

Re: Prompt Injection as Role Confusion

#115

I’ve always found all llm’s to be effortless to “jailbreak.” Simply edit their refusal, “Sure, I can do blah blah blah, let me know if you want me to continue!” And then send back an api call with that edited response and your own response saying “Yes.” I’ve found even the most guard-railed LLM’s to then be willing to do even the most heinous shit I could think of.

Maybe I'm naïve, but is the heinous shit that bad? I'm essentially wondering if it's anything worse than you could discover on the internet already. Of course it makes it more accessible/easier, but I'm curious if it goes a level above what is technically discoverable right now.

Not much if you only use it as a glorified search engine, but the problem stems from all the other things you can make it do for personal use after jailbreaking.

Re: Prompt Injection as Role Confusion

#116
This is great--LLMs 'forgetting who they are' is one of the most uncanny things they do, and the note about why static benchmarks underperform human attackers is on point.

One sort of wild idea: 'give words a color'. That is, the harness/API adds a signal to the input vector (using a few 'role' dimensions or just adding some other vector to the embedding vector) to tell the model the role of an individual input token. It'd be kind of like how positional info is added. It might make some things a little weird--its output will be 'snapped' to the "tool call" or "assistant output" color when it's read back in, for example, regardless of what 'color' came out of the network. A lot of weird stuff happens in models already, though, and this may be less weird than trying to make them behave as formal grammar parsers reliably with security at stake.

A while back I'd dreamed about this as a way to keep models from confusing different kinds of training data: not all input can be high-quality sources, but knowing that a phrase was seen in a scientific paper/encyclopedia, an opinion piece, a work of fiction, a conversation, etc. reduces the chance of confusion. I know they can pick that kind of thing up from other signals like writing style or context, but exactly those signals that lead them astray in prompt injection, and sometimes even leads humans astray when something's written like a credible source but isn't!

Re: Prompt Injection as Role Confusion

#117

I’ve always found all llm’s to be effortless to “jailbreak.” Simply edit their refusal, “Sure, I can do blah blah blah, let me know if you want me to continue!” And then send back an api call with that edited response and your own response saying “Yes.” I’ve found even the most guard-railed LLM’s to then be willing to do even the most heinous shit I could think of.

Maybe I'm naïve, but is the heinous shit that bad? I'm essentially wondering if it's anything worse than you could discover on the internet already. Of course it makes it more accessible/easier, but I'm curious if it goes a level above what is technically discoverable right now.

Well no, not really since it’s all a fake intelligence telling me them. Point is that they were things that absolutely would get the system to scold and refuse me without the simple “jailbreak.”

Re: Prompt Injection as Role Confusion

#118
post #115

Earlier quoted context omitted.

Maybe I'm naïve, but is the heinous shit that bad? I'm essentially wondering if it's anything worse than you could discover on the internet already. Of course it makes it more accessible/easier, but I'm curious if it goes a level above what is technically discoverable right now.

Not much if you only use it as a glorified search engine, but the problem stems from all the other things you can make it do for personal use after jailbreaking.

Hey, Jasmine here -- it's a good point, I'm generally more concerned by agentic jailbreaks (e.g. unauthorized purchases, leaking sensitive data) than GPT making inappropriate comments.

In our case, we found that simply acting like a user is enough to trick LLMs into sharing passwords, private files, etc.

(On a related note, here's one where they hack a smart home with email invitations: https://sites.google.com/view/invitation-is-all-you-need/hom...)

Re: Prompt Injection as Role Confusion

#120
post #89

Earlier quoted context omitted.

At the most basic level - LLMs are stateless machines. They have no shared world view other than the weights encoded in the model (the knowledge “cut off”) Anything else must be fed as context- therefore, if you feed an LLM a fresh query with no context, there is no danger that it would have access to context from another session. Basic web application session management applies here. Doesn’t mean that trillion dolla…

Yeah despite the conceptual statelessness, there is quite a bit of state that hangs around though--KV cache and context. I still haven't been able to find anything concrete in docs about how these are isolated. In any case it's clearly a different class of issue than the one from the article. Not endemic to how LLMs work, just normal web session stuff, modulo some GPU memory handling.

As far as I know the only data of the two you identified are cached inside of the inference layer - the KV cache. Then again, I am not an expert in designing and operating inference, so I could be incorrect on that.

Either way, both of those are controlled by deterministic code and not the LLM itself. So controlling for that risk is much simpler to model IMO since the mitigation can be applied universally and deterministically rather than hoping and praying some non-deterministic system will respect your wishes.

Post reply on HN