Does Assistant API's file search tool use RAG by default?

There’s a tutorial by OpenAI showing how we could use “file_search” tool to utilize RAG automatically. I uploaded a file on vector store and attached that vector store to an Assistant. Then I created a thread with just prompt attached to it and created a run object on that thread and assistant. The API is working good and is returning a response, but when I inspect run steps, I only get “message_creation” type of run step, not “tool_calls”. Isn’t it supposed to search for files and use RAG to generate augmented response? or do I need to perform additional steps to have RAG up and running?

here’s the article: https://platform.openai.com/docs/assistants/tools/file-search

1 Like

An AI model will call a function when it finds that function useful.

File search is a function for the AI to use. This technique can hardly be called retrieval-augmented generation.

Unfortunately, it provides no information about what you’ve placed in a vector store or when that would be useful. You have to re-instruct the AI about the contents of uploaded files, and that they are not being uploaded by a user.

There’s also been reports recently of gpt-4o just stinking at understanding to call this tool, that model having its own file_search tool description, that like the code interpreter tool, has new internal instructions that reflect the desperation in trying to get this model to follow instructions.

Try variations on:

Instructions: “Part of your skills are files placed by the AI developer into myfiles_browser (or write file_search for latest gpt-4o), on the topic of (pinball machine repairs), which must be queried before answering any questions on this topic…”
Model: gpt-4o-2024-05-13, or gpt-4-turbo

3 Likes

oh I see, I just added words to prompt about thing that’s written into the file that’s attached to assistant. now I get that additional “tool_calls” type of run step and corresponding information extracted from that file. Thanks.

2 Likes