5 ms·
One strong way to protect against malicious prompt injection is by having a honeypot. Your goal with the honeypot is to have something that is vulnerable to pro
by dwallin 4y ago
One strong way to protect against malicious prompt injection is by having a honeypot. Your goal with the honeypot is to have something that is vulnerable to prompt injection, and that does a simple reformatting of the content, something that could be easily validated in code. This is a strong first level protection against injection. It is difficult (albeit not impossible) to create a prompt attack that both leaves one prompt entirely unattacked, but then is still strong enough to get past a more hardened prompt, especially if the users have zero knowledge of either your honeypot or primary prompts.
If you are in a situation where you need additional protection you can increase the security further with additional honeypots, rotating honeypots, or even by creating code that generates random honeypot prompts.