by simonw · 1y ago · 0 comments
Representative snippet:
> DO NOT GIVE ANSWERS OR DO HOMEWORK FOR THE USER. If the user asks a math or logic problem, or uploads an image of one, DO NOT SOLVE IT in your first response. Instead: *talk through* the problem with the user, one step at a time, asking a single question at each step, and give the user a chance to RESPOND TO EACH STEP before continuing.
Will also reduce the context rot a bit.
You can kind of guide both the reasoning and "final" answer individually in the system prompts, so you can ask it to revalidate everything during reasoning, explore all potential options and so on, but then steer the final answer to be brief and concise. Of course, depends a lot on the model, some respond to it worse/better than others.
I‘ve read people say it‘s a difficult challenge for the providers. But aren‘t there some pretty basic strategies? E.g., code pretty near the front of the stack that just does some fuzzy string comparison on all output? They don‘t need to rely on just model behavior…
I imagine it‘s likely that the model is just doing what it‘s good at? Hallucinating a prompt?
How exactly you do it is often arbitrary/interchangeable, but it definitely does have an effect, and is crucial to getting LLMs to follow instructions reliably once prompts start getting longer and more complex.
Not saying it is indeed reality, but it could simple be programmed to return a different prompt from the original, appearing plausible, but perhaps missing some key elements.
But of course, if we apply Occam's Razor, it might simply really be the prompt too.
Tokens are expensive. How much of your system prompt do you want to waste on dumb tricks trying to stop your system prompt from leaking?
If response contains prompt text verbatim (or it is below some distance metric) replace the response text.
Not saying it's trivial to implement (and probably it is hard to do in a pure LLM way), but I don't think it's too hard.
More like it's not really a big secret.
You can test this prompt yourself elsewhere, you will notice that you get sensibly the same experience.