Prompt Injection as Role Confusion
role-confusion.github.io
Prompt Injection as Role Confusion
1–10 of 129 posts
Re: Prompt Injection as Role Confusion
#2Re: Prompt Injection as Role Confusion
#3I'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
#4In 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
#5YES! 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
#6LLMs 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
#7Really 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…
Wouldn't this require the training data to also be prepped with the control tokens?
Re: Prompt Injection as Role Confusion
#8> 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.
Maybe you didn't mean it this way, but it does come across as intentional sometimes.
Re: Prompt Injection as Role Confusion
#9Of 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
#10Really 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?
…This somehow feels like AI scientists rediscovering the concept of parenting.