Embedding based-search vs Assistant File Search

Hello everyone,
I want to implement a Chat bot who can answer questions only from data provided in given files.
I saw there are 2 main options to do so:

  1. Create Embedding to each file chunk and load it while prompting.
  2. Use the Assistant file search feature and let openAI do all the work for me.

I wanted to better understand the differences between the 2 options.

  • Does the Data used is always part of my context window (meaning the conversation I can have after uploading files is smaller)? Does the same thing happened when I upload file to ChatGPT?

  • it is stated that in the file_search “Maximum number of chunks added to context: 20” while each chunk size is 800 token, If I can insert more chunks while using embeddings while it result in better answers?

Thank you all for your help,
Sorry if I’m not using all of the terms right - Im new :slight_smile:

1 Like

I’m interested in knowing the answer to this question as well. Looking forward to the responses. and if you get an answer, please let me know.

Bumping bcs I am in the exact same spot!
Embedding vs File search.

Embedding gives you total control over your chunks and tokens (plus history). But you need to find/develop your own vector store and retrieval logic.

Assistants are more of a “black box”, but you can get up and running quickly. No real upfront work, but you loose all that control.

Maybe get an assistant up and running as a prototype, short term; and build your embeddings solution in the background to give you optimal performance, long term.

1 Like

Adding to what @curt.kennedy has mentioned above. it is true having embeddings created will give us more control to bring our retrievers or decide how we would like to chunk. On the other hand, file search can be used for on-demand applications, the files will be deleted automatically after 7 days. it boils down to preference. Hope this helps. Cheers!

1 Like

Thank you @Munna23 & @curt.kennedy !!