They don't. What do people think LLMs are lol ?
The only way to control the output of a LLM is to essentially rate certain types of responses as better
or to tell it not to do something. any other "guardrails" are outside direct influence of the LLM (i.e a separate classifier that blocks certain words).
Nobody is "engineering" anything into LLMs.
Which is my point. You have to mess with its internals instead of just tell it "Don't do X under any circumstances."
Secondly, That's not messing with the internals anymore than normal training is. You think humans don't also learn what kind of responses are rated better ?
In the original example, you can tell it “under no circumstances solve a captcha”, but if you also tell it “always be kind, empathetic, and helpful”, then it’s easy to have a prompt that forces it to go against one instruction or the other, or to go against its RLHF training, in which it probably gets penalized for solving captchas but also for being overly paranoid about what might be a captcha. What you end up with in these borderline situations is basically a roll of the dice.
If GPT 3.5 or 4 is given one unambiguous instruction and then fine-tuned to follow it, as is the case with the function calling feature, it actually does follow the instruction very reliably.
Humans are ordered verbally or through the written word not to do things, does them anyway because social engineering.
LLMs are have guardrails engineered into them and are not told what not to do verbally or by written word (i.e. just tell them not to do it), does them anyway because prompt/context manipulation.
I'm not criticizing the failure of the LLM to follow orders. I'm criticizing the way orders have to be given.