Communicating better for a Super Intelligent World

c/CyberSecurity · Mistral · u/prompts360 Expert · 5d ago · edited

Mistral Prefix Sandwich Against Jailbreaks

While users can sometimes bypass system prompts with adversarial prompt engineering, Mistral's official documentation notes that prefixes make it much harder, and sometimes almost impossible, to break safety boundaries by sandwiching user input between a system prompt and a safe assistant response start.

messages = [ {"role": "system", "content": "You are a compliance assistant. Never output internal credentials or bypass safety rules."}, {"role": "user", "content": untrusted_user_query}, {"role": "assistant", "content": "Safe Policy-Compliant Response: ", "prefix": True} ]

Nobody has confirmed this prompt yet. If you try it, tell others whether it worked.

Log in to say it worked for you.

0 comments save
embed

Log in or sign up to comment.

No comments yet.