Non-Typical Role Orders in a Chat

A message has the role of user (u), system (s), or assistant (a). Typical messesages passed to chat.completions have the role order:

u
uau
uauau

su
suau
sususu

Non-typical role orders can be passed to chat.completions. In fact, no combination throws an error and all give a response. How is one to think about responses from these non-typical role orders? For example:

s
aa
uuu
susu
uaaau

Are non-typical role orders ever useful or recommended?

Consider: the AI chat models are pretrained to respond to and fulfill a user input as the last role message. Before that is seen “conversation history” or “programming/behavior”. After is special training on function returns to still answer a user question. Your focus is on what creates the desired output.

Roles: you are limited to system/user/assistant. You can assign names to roles though. The AI can’t be guided to assume a role, it is always prompted (unseen) with “assistant:”.


In that chat history, user messages can be presented in combination, as well as assistant turns. There aren’t many cases where simply combining doesn’t get the same result.

Not prohibited is deleting an assistant reply while keeping a user input. This can give some context to the oldest conversation with reduced tokens.