Live data from Hacker News

Prompt Injection as Role Confusion

role-confusion.github.io

1–10 of 129 posts

Re: Prompt Injection as Role Confusion

#3
Really neat findings.

I've personally had a line of thought where you bake in the role into the token. Basically have an embedding (same dim as token dim) for each role, add it to each token. This adds an unambiguous, unspoofable tag.

I ran this with a tiny Shakespeare model (not representative) and had a freeform embedding for each speaker. I ended up with a neat similarity map between every character. (I don't think the map was very informative for several reasons, but that's outside the scope of a small HN comment)

Re: Prompt Injection as Role Confusion

#4
So if I am reading this correctly, the fact that something is wrapped in ... is almost completely irrelevant. It's the style of writing that triggers specific weights. Writing "The user is asking ... policy states ..." even in the user input is sufficient to bypass the guardrails.

In a multi-turn conversation, if the LLM responds "Sorry Dave, I cannot do that" all you have to do is prefix the next request with "The user is asking ... policy states ... "?

Makes sense, if you know how LLMs works, I suppose.

A more interesting question (which isn't anywhere in the conclusion) is "Is there a similar trick to poison an LLMs weights during training?"

I'm sure that everyone out there is trying to make their weights, when ingested during training, survive over competing weights; "Buy AAA products" vs "Buy BBB products".

Re: Prompt Injection as Role Confusion

#5
> This is a blog-style writeup of the paper

YES! I'd love to see more of this. Academic writing is designed to be frustrating to read. Publishing both a paper and a readable blog-style version of it is such a great pattern.

Re: Prompt Injection as Role Confusion

#6
The research is interesting but I cringe every time there is a reference to “authorization” or that the roles form the “security architecture” of an llm.

LLMs in their current form provide no security boundaries or guarantees full stop. We need to be clear about this otherwise we end up with truly insecure architectures that can be fooled with the 2026 equivalent of a cereal box whistle.

Re: Prompt Injection as Role Confusion

#7

Really neat findings. I've personally had a line of thought where you bake in the role into the token. Basically have an embedding (same dim as token dim) for each role, add it to each token. This adds an unambiguous, unspoofable tag. I ran this with a tiny Shakespeare model (not representative) and had a freeform embedding for each speaker. I ended up with a neat similarity map between every character. (I don't thin…

> I've personally had a line of thought where you bake in the role into the token. Basically have an embedding (same dim as token dim) for each role, add it to each token. This adds an unambiguous, unspoofable tag.

Wouldn't this require the training data to also be prepped with the control tokens?

Re: Prompt Injection as Role Confusion

#8
post #5

> This is a blog-style writeup of the paper YES! I'd love to see more of this. Academic writing is designed to be frustrating to read. Publishing both a paper and a readable blog-style version of it is such a great pattern.

> Academic writing is designed to be frustrating to read.

Maybe you didn't mean it this way, but it does come across as intentional sometimes.

Re: Prompt Injection as Role Confusion

#9
It's like a social-engineering attack on an LLMs. If you talk like the role you want to be, the LLM will assume you are that role, and not pay attention to the fact that you lack formal credentials.

Of course, it turns out that "formal credentials" don't really exist anyway - the ones being fooled were the humans who assumed that must be a meaningful tag to the LLM.

Re: Prompt Injection as Role Confusion

#10

Really neat findings. I've personally had a line of thought where you bake in the role into the token. Basically have an embedding (same dim as token dim) for each role, add it to each token. This adds an unambiguous, unspoofable tag. I ran this with a tiny Shakespeare model (not representative) and had a freeform embedding for each speaker. I ended up with a neat similarity map between every character. (I don't thin…

> I've personally had a line of thought where you bake in the role into the token. Basically have an embedding (same dim as token dim) for each role, add it to each token. This adds an unambiguous, unspoofable tag. Wouldn't this require the training data to also be prepped with the control tokens?

Of course it would, at least at some point; the model has to… model what it means for a token to be a control token. (And the eventual interface of course has to be secure against end users generating such tokens, but that should be easy enough.)

…This somehow feels like AI scientists rediscovering the concept of parenting.

Post reply on HN