How can I create a dynamic prompt for a GPTs?

How can I create a dynamic prompt for a GPTs? The user can configure their preferences. For example, in a translation GPTs, users can choose the language they wish to translate.

Good question.

You would need some sort of back-end service to authenticate the user and then load their profile information (and new instructions) as a response using Actions.

It’s not a perfect solution, though. After some time the unused profile information may be lost and possibly hallucinated. For now you may need to always ensure that the profile information is loaded via your instructions.

Maybe go old school and assemble the prompt without AI. User selects options and when they hit submit on their prompt, the system collects the options and assembles them with some default text. Then you can append the prompt with that assembled text. For instance:

‘’‘For this translation, translate from [language 1] to [language 2].’‘’ or

"For this translation, translate to [desired language].‘’’

Where the constant text block is default text, and to that you programatically add the [variable text components].

Wrapping in a codeblock helps keep that final pre-instruction distinct from the text to translate.