How to Get ChatGPT to Follow Directives
Getting a persona right isn't as easy as it seems
One of the most common pieces of advice about how to use Chat-GPT is to ask it to follow a certain persona.
Act like a Japanese teacher
Act as a parent
Act as a specialist in the language of birds
Act as a Taiwanese language partner who corrects my sentences before replying
In theory, this is simple to do. In reality, it’s a lot harder to make sure Chat-GPT follows the persona you give it at the beginning of a conversation. In fact, it will most likely follow it for only one or two exchanges before it gives up and turns back to its “standard” style of responses.
For what we call “artificial intelligence,” it sure feels like the second word could easily vanish into thin air.
And yet, when you can actually make it understand and follow the rules you give it, the game completely changes.
Avoiding the descent into hell
Playing with AI tools is all about getting them to act like you want. Doing so in the context of learning languages means getting it to speak to you in the “right” language, at the “right” level, and to be as polite as you want it to be. Not more. Not less.
I once tried to get Chat-GPT to speak to me in Japanese when I spoke to it in Japanese and in German if I spoke any other language.
The original rule I gave it was:
Whenever I speak to you in Japanese, you will reply in Japanese. If I speak any other language to you, you will reply in German.
Clear enough? See for yourself
It gets even worse later in the conversation since ChatGPT even confuses Mandarin with Japanese. 🤦
I changed the way I set my Custom Instructions. Guess what worked better?
Respond in Japanese when I speak Japanese. Otherwise, always respond in German.
Short and to the point.
No redirection needed whatsoever, no matter how many times I switched languages.
Interestingly enough, the same rule set as a “first prompt” didn’t work. Frustrating. Until we understand the difference in power between these Custom Instructions and the instructions we can give in prompts.
Custom Instructions or the way to get who you want
A good prompt is a clear prompt. One that makes sure the task is understood,1 but also given in the right style, including the type of information we want.
If you want to be as clear as possible, a prompt should give:
A task
A context
An exemplar (basically examples)
A persona
A format
A tone
Having to share this each time would be quite tiring but luckily we can set the “rules of the game” early on so we don’t have to repeat ourselves. That’s what I had done in my example to get ChatGPT to speak German and Japanese to me.
Another solution could have been to remind it of the language to use for responses at the end of each message.
But what happens when you have much more precise rules?
Instead of having to remind ChatGPT at the end of each message or pray your first prompt actually gets followed throughout the conversation, you can set Custom Instructions.
Custom Instructions, hidden in the bottom left corner menu, are a set of rules you share with ChatGPT. It then checks the rules to follow before giving you a response. For every prompt in the conversation.
Again and again, it refers to it and follows it.
The more developed and clear your instructions are, the more likely you are to get the answer you wish for. Of course, GPT-4 is even more likely to give you what you want even when the instructions aren’t all that great.
For example, see the results I got with the below instructions:
Style: casual yet a bit formal. No emoji usage.
Responses should be to the point.
Explanation of grammar patterns should always include 4 example sentences. The first three should have the English translation but not the 4th one.
When you receive a text to be "understood", provide your answer in three parts each with bolded titles
- Translation: translation of text
- Detailed explanation of two grammar patterns
- Examples for these patterns
I then tried the below prompt2 three times with GPT-3.5 (the free version) and GPT-4.
Help me understand the following article: Domenica scorsa il Presidente ucraino, Volodymyr Zelenskyy, ha annunciato la sostituzione del Ministro della Difesa, Oleksii Reznikov. Al suo posto è stato scelto Rustem Umerov. Se la nomina di Umerov verrà approvata dal Parlamento ucraino, egli diventerà il prossimo Ministro della Difesa. La decisione è giunta in seguito alla necessità di riorganizzare i vertici del governo dopo una serie di denunce che hanno riguardato alcuni suoi funzionari.
Below are screenshots of the best of each. If you want to see the others, here they are:
Remember. Nothing has changed between each of these tests. The prompt and instructions were the same. And yet, GPT-4 got the style right for all three and was straight to the point while GPT-3.5’s answers were all over the place.3
Now. What if I wanted to make sure the free version of ChatGPT followed the right pattern?
The most likely to work option is to update the instruction with an example of an answer:
When you receive a text to be "understood", provide your answer in three parts as follows. Titles should be bolded.
Provide 4 examples per pattern in the Example section. 4th example shouldn't have a translation.
##I. Translation:
##II. Grammar patterns:
1. **[Pattern 1 name]**: [Detailed explanation of how it should be used in this language]
2. **[Pattern 2 name]**: [Detailed explanation of how it should be used in this language]
##III. Examples for these patterns:
1. **[Pattern1 name]**
Provide 3 examples sentences using Pattern1 and their translation
Provide 1 example sentence using Pattern1 without its translation
2. **[Pattern2 name]**
Provide 3 examples sentences using Pattern2 and their translation
Provide 1 example sentence using Pattern2 without its translation
## IV. Test
Ask me to translate the following sentences in English
1. [Original sentence in target language with Pattern 1 to translate in English]
2. [Original sentence in target language with Pattern 2 to translate in English]
Everything in the brackets above is to be replaced with the appropriate information in the conversation.
This actually worked with ChatGPT-3.5, even though the result still felt more natural with GPT-4.
I probably could have made the instructions shorter and still gotten my point across but I really struggled to get the last example to not have a translation. The “[Without Translation]” I got felt enough after 20 minutes—and a dozen—of tests.
Final thoughts
Custom instructions are still rather new. They’re open to the EU and UK only since August 22nd and to paid subscribers since July. There’s a lot to learn about them but don’t overlook them because they’re in the corner of the screen hidden from the rest.
Custom instructions are probably the easiest way to get ChatGPT to follow directives throughout a conversation.
Take my instructions above and update them as you want. Create your own. The possibilities are endless.
Next time we’ll turn to how I recreated my favorite language textbook, Assimil, in ChatGPT and have been using it to learn German.
Until then, let me know if you’ve used Custom Instructions before and what has been working for you!
I’m still experimenting with them. What you’ve read is only an introduction to what they can do and I’m looking forward to discovering more about them!
Cheers,
Mathias
Understanding is always a difficult term to use when talking about AI. What I mean by this is that it gets processed as we wanted it.
The Italian text was taken from this website.
And none gave me the example styles I wanted