GPT-4 (the one available via API) is indeed more resistant against prompt injection attacks because of how the model treats “system message” (that’s configurable only via the API). It will really stick to the instructions from the system message and basically ignore any instructions from user messages that contradict it. I’ve set up a Twitch bots with both GPT-3.5 and 4 and while version 3.5 was very easily “hacked” (for example one user told it that it should start writing in Chinese from now on and it did) version 4 seemed to be resistant against this even though few people tried to jailbreak it in several different ways.
Shameless plug: I’m coding stuff related to AI and other things live on Twitch on weekends in case that’s something that interests you, at twitch.tv/m4v3k