Problem with File Search In Assistant API

Choi 0 Reputation points
2024-09-12T02:22:37.2066667+00:00

I am currently using the Azure OpenAI Assistant API (2024-05-01-preview). I'm trying to use the File Search feature, but the ranking options parameter does not seem to be working in the tools. Has it not been updated yet? Specifically, I want to set a threshold in ranking options, but an error occurs. (No error occurs when using the OpenAI API directly.)

assistant = client.beta.assistants.update(
    assistant_id=assistant_id,
    description = description,
    instructions = instructions,
    tools=[{"type":"file_search",
            "file_search":{
                "max_num_results": 5,
                "ranking_options" : {
                    "score_threshold" : 0.6
                }
                }}],
    tool_resources={"file_search": {"vector_store_ids": [vector_store_id]}},
    temperature=0.00001,
    model="gpt-4o"
)

Additionally, when outputting the run step, the applied ranking options and the returned file search results were displayed when using the OpenAI API directly. However, in Azure OpenAI Assistant, it shows file_search=FileSearch(ranking_options=None, results=None), making it difficult to determine if the file search is functioning correctly.

What could be the issue?

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

1 answer

Sort by: Most helpful
  1. navba-MSFT 23,895 Reputation points Microsoft Employee
    2024-09-17T04:27:00.5833333+00:00

    @Choi Apologies for the late reply. I had reached out to the Product Owners and discussed this internally.

    .

    Ranking options are not yet available, our ETA is end of October month.

    .

    Hope this helps.

    **

    Please do not forget to "Accept the answer” and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.

    0 comments No comments

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.