How to prevent GPT from switching role?

The chat AI is prompted with “user” & “assistant”, and the post-training is all about answering questions, so this would be kind of hard. On completions and 3.5-instruct, you’d be able to make your own turns for the AI to complete:

Teacher: Do you have any questions about the trig homework?
Student: (AI writes here)

That would be best with a convincing preamble and several multi-shot turns before.

Otherwise, it is all about instructing in a system message, giving examples in the system message - and not letting the chat go on too long.

You can have an “inspector” AI examine the generation, and if the roles are reverse, add more prompting automatically to the user input and retry to ensure AI adheres to the student role.

Frankly, I don’t think the AI has much in the way of questions to ask. You might want to have a complete persona description of who the AI is depicting.

1 Like