Scope of attached files to Azure OpenAI Assistants on message and thread level

Mohamed Hussein 320 Reputation points
2024-11-12T18:38:27.5766667+00:00

Hi,

May i ask what's the scope of attaching File ID to message / thread level, are there equavalent?

The playground tooltip mentions that files attached on message level are scoped only on Message level. But the API docs does not mention anything about the scope

Does thay mean, if user sent a follow up question to a previously attached file, won't be accessible?

User's image

https://learn.microsoft.com/en-us/azure/ai-services/openai/assistants-reference-threads?tabs=python

https://learn.microsoft.com/en-us/rest/api/azureopenai/files/upload?view=rest-azureopenai-2024-10-21&tabs=HTTP

Azure OpenAI Service
Azure OpenAI Service
An Azure service that provides access to OpenAI’s GPT-3 models with enterprise capabilities.
3,395 questions
0 comments No comments
{count} votes

Accepted answer
  1. YutongTie-MSFT 53,331 Reputation points
    2024-11-12T19:07:37.1266667+00:00

    Hello @Mohamed Hussein

    Thanks for reaching out to us, attaching File ID to message / thread level is different, I attached a structure image below to make it clear. A thread may include up to 100,000 Messages. Thread is the upper level of Message.

    A diagram showing the components of an assistant.

    I will share more description of the difference between Message level and Thread level -

    Message-Level Attachments:

    • Files attached at the message level are accessible only within that specific message context.
    • This means if a user attaches a file to one message, then sends a follow-up message without re-attaching or referencing the file, the assistant won’t have access to that file in the follow-up. This aligns with the tooltip you saw in the playground, which is intended to reinforce that each message is isolated in terms of file access unless explicitly attached again.

    Thread-Level Attachments:

    • If the file is attached at the thread level, it remains accessible throughout the entire conversation thread. This allows the assistant to reference the file across multiple messages within the same thread.
    • For use cases where users may ask follow-up questions about previously provided information in an attachment, attaching at the thread level is generally preferred, as it supports continuity without needing the file re-attached.

    As you mentioned, yes, this is not clear described in Document but only mentioned in the Playground of Azure OpenAI, I will raise a feedback for this document to content team so that we can have a clear and professional explanation there.

    Thanks for your feedback again, I hope this helps.

    Regards,

    Yutong

    -Please kindly accept the answer if you feel helpful to support the community, thanks a lot.

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.