Does the run instructions override or extend the assistant instruction?

As headline says.
Let’s say i have few lines of instructions for the assistant to be a jolly person, but after a few runs i want to change it to be a bit more angry.
Can i then just add “you are getting a bit more angry now” to the run instructions, or would that lose all of the original assistant instructions?

1 Like

Do you mean the System prompt?

Even if you change it mid stream, if you’re sending the message history, it’ll also use all that context.

Do you have an example of System/User prompts you’re trying? Or are you at the more theoretical stage still without code?

I am still on the theoretical plan :slightly_smiling_face:
When creating an assistant in the api, the instruction parameter has this description:

instructions:
string or null
Optional
The system instructions that the assistant uses. The maximum length is 32768 characters.

Now when creating a run i see this description for instructions:

instructions:
string or null
Optional
Override the default system message of the assistant. This is useful for modifying the behavior on a per-run basis.

So it states right there override, but i just want to be sure if the instructions parameter from the creation of the assistant is then ignored.
And now that i think about it, will the instructions from previous runs be ignore too, or still taken into consideration?

1 Like

I’ve not tinkered with Assistant API at all yet myself, so I’m not 100% sure. If you try, though, do come back and let us know.

Sounds like it should work as you expect.

I tried that yesterday haha. It kind of worked, but only for the messages with the instruction, as soon as a prompt sent without that instruction was made it stopped “being angry”.

Ok, so if no instructions are sent on later runs, it reverts back to the assistant instructions :stuck_out_tongue:

I believe it adds rather than overrides the instructions.

See in the examples in

In the instructions it adds “refer to the user as Jane Doe”, and later on it still uses the original instructions of being a math tutor despite that. (See Step 4-5)

I managed to get correct results by creating the first run without any new instructions, and then create new runs with the additional instructions as needed.