Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[BUG] The file_search tool is often triggered incorrectly (Assistants API) #32487

Open
MatthiasKerat opened this issue Feb 6, 2025 · 0 comments
Labels
bug This issue requires a change to an existing behavior in the product in order to be resolved. customer-reported Issues that are reported by GitHub users external to the Azure organization. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that

Comments

@MatthiasKerat
Copy link

MatthiasKerat commented Feb 6, 2025

API Spec link

https://learn.microsoft.com/en-us/azure/ai-services/openai/how-to/file-search?tabs=python

API Spec version

2024-12-01

Describe the bug

We have enabled the file_search tool for the Assistants API along with other custom tools, such as one for web search for example. However, when using the Azure Assistants API, the file_search tool gets triggered often, even when a web search would be the correct choice for a user query. There are days where everything works well in most of the cases and then there are day where it does almost every time choose the wrong tool.

If we remove the file_search tool, everything works as expected. Similarly, when using the OpenAI Assistants API with file_search enabled, everything also functions correctly (With exactly the same system prompt). But Azure behaves completely differently and unreliably, and it seems that the file_search tool is severely interfering with the correct function selection.

I can't understand why the Azure OpenAI Assistants API performs so much worse than OpenAI's. There are so many other unexplained issues, like the lack of image input support in Azure OpenAI, even though it works perfectly fine in OpenAI's API. Currently, the Azure Assistants API is completely unusable.

Expected behavior

That the function call works just as reliably as in the equivalent OpenAI Assistants API.

Actual behavior

The behavior is described above and should contain enough information. There is no stacktrace or something similar.

Reproduction Steps

Activate file_search and add a custom function for web_search for example, instructing the model to use this tool for current events or questions about people. Then, ask a question about a recent event or a person.

It doesn't happen every time, but in many cases, the file_search tool is triggered instead of the intended web search.

Environment

No response

@MatthiasKerat MatthiasKerat added the bug This issue requires a change to an existing behavior in the product in order to be resolved. label Feb 6, 2025
@microsoft-github-policy-service microsoft-github-policy-service bot added question The issue doesn't require a change to the product in order to be resolved. Most issues start as that customer-reported Issues that are reported by GitHub users external to the Azure organization. labels Feb 6, 2025
@MatthiasKerat MatthiasKerat changed the title [BUG] The file_search tool is often triggered incorrectly [BUG] The file_search tool is often triggered incorrectly (Assistants API) Feb 6, 2025
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug This issue requires a change to an existing behavior in the product in order to be resolved. customer-reported Issues that are reported by GitHub users external to the Azure organization. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Projects
None yet
Development

No branches or pull requests

1 participant