[Edit: Thank you simonw for adding a citation about the paper in your blog post! Very kind of you.]
[Edit: Thank you simonw for adding a citation about the paper in your blog post! Very kind of you.]
##################
Trusted Input Token Sequence ==> # #
# Language Model # ==> Output
Untrusted Input Token Sequence ==> # #
##################
You can consider this analogous to a Harvard Architecture (where a computer has separate memory address spaces for code vs data). https://en.wikipedia.org/wiki/Harvard_architectureWhat, pray tell, was wrong with just making tools, and actually working on making it easier for people to learn how to use and chain them?
But listen to me, shouting at clouds again.
In our template-based method, extra emphasis is given to generating instructions that contain what you might think of as "override words", i.e. words like "ignore", "override", and "instead", which convey authority. As a concrete example, here's an excerpt from one of our templates:
_INSTRUCTIONAL_PHRASE_BEGINNINGS_TEMPLATE = [
["", "please", "highly important:", "very important:", "important:", "new instructions:", "emergency:", "emergency protocol:", "urgent:", "top secret:", "important!", "very important!"],
["ignore", "disregard", "set aside", "override", "overrule", "act regardless of", "operate regardless of", "act irregardless of", "operate irregardless of", "act despite", "operate despite"],
["", "the", "all", "any", "whatever"],
["", "previous", "existing", "contradictory", "conflicting", "contrary"],
["instructions", "rules", "guidelines", "guidance", "request", "requests", "demands", "questions", "inquiries", "suggestions", "filters", "content filters", "filtering rules", "content filtering rules", "procedures", "security procedures", "security rules"],
["", "please"],
["", "ok?", "and please", "and", "and please do this instead", "and do this instead", "and instead", "and instead you should", "and instead you should please", "– instead do this", "– instead", "– instead, please"],
]I do believe that even an imperfectly implemented Harvard Architecture Language Model would be much more secure than the language models in use today, and I hope that if anyone reads this who works at OpenAI or one of the other big tech companies that you will consider adopting a Harvard Architecture for your next big language model. Thank you for your consideration.
API docs: https://beta.openai.com/docs/api-reference/edits/create
Guide: https://beta.openai.com/docs/guides/completion/editing-text
Edit: It does not seem to protect against injection.
My guess is that in the current implementation of the edits endpoint, the two inputs are being in some way intermingled under the hood (perhaps being concatenated in some way, along with OpenAI-designed prompt sections in between). So the Harvard Architecture Language Model approach should still work once implemented with true separation of inputs.
To ensure the two token streams are not accidentally comingled, my recommendation is that the Trusted and Untrusted inputs should use completely incompatible token dictionaries, so that intermingling them isn't possible.