Handling of `instructions` and `additional_instructions`

How is the additional_instructions args to client.beta.threads.runs.stream() handled differently than the content data member of the message object when processing the message ?

This pertains to the Assistants API, v2.

Note also that my application sets the additional instructions with every call to client.beta.threads.runs.stream().

CONTEXT:

I contemplated providing attachment data to the Assistant using the additional_instructions arg to client.beta.threads.runs.stream() instead of adding it to the message content (via client.beta.threads.messages.create()). I was disabused of this notion by the sources I consulted, all of which advised against this. Nonetheless this stoked my curiosity about the semantics of how the Assistant handles/interprets additional instructions vs message content.

How exactly are additional_instructions provided to the assistant, compared to how message content is provided? Is there any real difference? From my understanding of how content is provided to an LLM it seems to me that instructions and content are simply concatenated, so why is it advised not to intermingle attachment data with additional instructions?

The whole foundation of Assistants is that an “assistant” is built out of pre-composed instructions to do a task or become a specialist. Then, the assistant ID can be reused for any number of interactions or users without altering those “instructions”.

However, on chat completions, you controlling every single input message to the API call, you don’t have to just have one set system message. You can include personalization and context, such as “the user name is Joe”, or “chat session started March 4 2025”.

additional_instructions, which you can place individually along with a run, gives you a place for a second set of instructions being appended that are per-user, per-thread, or even per-turn that do not persist, such as “Here is knowledge auto-retrieved based on the latest user input {RAG}”.

Assistants didn’t originally come with this parameter, and new run “instructions” then or now completely replaces what the assistant had.

(BTW, if you look at the API calls being made by the playground through the browser, it uses replacement “instructions” for a run taken out of the “instructions” box, completely ignoring the permanent setting of an assistant anyway.)

Thanks for the reply. It is very helpful. :smiling_face_with_halo: